filterGt (JustS b) t = filter' b t
  where filter' _   Tip = Tip
        filter' b' (Bin _ x l r) =
          case compare b' x of LT -> join x (filter' b' l) r
                               EQ -> r
                               GT -> filter' b' r
#if __GLASGOW_HASKELL__ >= 700

filterGt (JustS b) t = filter' b t
  where filter' _   Tip = Tip
        filter' b' (Bin _ x l r) =
          case compare b' x of LT -> join x (filter' b' l) r
                               EQ -> r
                               GT -> filter' b' r
#if __GLASGOW_HASKELL__ >= 700

filterGt (JustS b) t = filter' b t
  where filter' _   Tip = Tip
        filter' b' (Bin _ x l r) =
          case compare b' x of LT -> join x (filter' b' l) r
                               EQ -> r
                               GT -> filter' b' r
#if __GLASGOW_HASKELL__ >= 700
