on master help sign in
Unfinished couldBe/shouldBe.
commita8fb251d9e81b3f141dfcea66fba2e1bd14f33ba authorPaweł Nowak <pawel834@gmail.com> dateThu 13 Nov 2014, 10:17 (12 years ago) parentd537ee1
1 file changed+8
Data/Syntax/Combinator.hs+8
Data/Syntax/Combinator.hs+8
@@ -23,3 +23,11 @@ sepBy v s = sepBy1 v s
2323-- | One or more occurences of v separated by s.
2424sepBy1 :: SemiIsoAlternative f => f a -> f () -> f [a]
2525sepBy1 v s = _Cons /$/ v /*/ (s */ sepBy1 v s /|/ sipure _Empty)
26+
27+-- |
28+couldBe :: SemiIsoFunctor f => f () -> f ()
29+couldBe f = undefined
30+
31+-- | Something that should be, but doesn't have to be.
32+shouldBe :: SemiIsoAlternative f => f () -> f ()
33+shouldBe f = constant () /$/ f