Skip to content

Commit

Permalink
add 'drop (Prefix a) a >>= uncons = Nothing' law
Browse files Browse the repository at this point in the history
  • Loading branch information
safareli committed Jun 11, 2017
1 parent ad4a76c commit 3a7d083
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Parsing/Parser/String.purs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ instance charHasUpdatePosition :: HasUpdatePosition Char where

-- | This class exists to abstract over streams which support the string-like
-- | operations which this modules needs.
-- |
-- |
-- | Instances must satisfy the following laws:
-- |
-- | - `drop (Prefix a) a >>= uncons = Nothing`
class StreamLike f c | f -> c where
uncons :: f -> Maybe { head :: c, tail :: f, updatePos :: Position -> Position }
drop :: Prefix f -> f -> Maybe { rest :: f, updatePos :: Position -> Position }
Expand Down

0 comments on commit 3a7d083

Please sign in to comment.