Unfinished couldBe/shouldBe.

This commit is contained in:
Paweł Nowak 2014-11-13 10:17:32 +01:00
parent d537ee1e37
commit a8fb251d9e

View File

@ -23,3 +23,11 @@ sepBy v s = sepBy1 v s
-- | One or more occurences of v separated by s.
sepBy1 :: SemiIsoAlternative f => f a -> f () -> f [a]
sepBy1 v s = _Cons /$/ v /*/ (s */ sepBy1 v s /|/ sipure _Empty)
-- |
couldBe :: SemiIsoFunctor f => f () -> f ()
couldBe f = undefined
-- | Something that should be, but doesn't have to be.
shouldBe :: SemiIsoAlternative f => f () -> f ()
shouldBe f = constant () /$/ f