Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rewrote Data.List.Split.condensing for compatibility with split-0.2.2

  • Loading branch information...
commit 0fed2e8d8527fde1962d18f1f661c5c511ed8777 1 parent f512fc2
@arkeet arkeet authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/Data/List/Split/Lens.hs
View
8 src/Data/List/Split/Lens.hs
@@ -166,12 +166,8 @@ delimiting f s@Splitter { delimPolicy = p } = f p <&> \p' -> s { delimPolicy = p
{-# INLINE delimiting #-}
-- | Modify or retrieve the policy for what a 'Splitter' should about consecutive delimiters.
-condensing :: Lens' (Splitter a) Bool
-condensing f s@Splitter { condensePolicy = p } = f (o p) <&> \p' -> s { condensePolicy = i p' } where
- i True = Condense
- i False = KeepBlankFields
- o Condense = True
- o KeepBlankFields = False
+condensing :: Lens' (Splitter a) CondensePolicy
+condensing f s@Splitter { condensePolicy = p } = f p <&> \p' -> s { condensePolicy = p' }
{-# INLINE condensing #-}
-- | Modify or retrieve the policy for whether a 'Splitter' should drop an initial blank.
Please sign in to comment.
Something went wrong with that request. Please try again.