Last active
April 11, 2017 09:28
-
-
Save oleks/9c5cf335a932366fa3c79d46a2d8b9db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Spaces | |
import Lightyear.Char | |
import Lightyear.Combinators | |
import Lightyear.Core | |
import Lightyear.Strings | |
toomany : Either String (List Char) | |
toomany = parse (many $ char ' ') " " | |
{- | |
$ idris -p lightyear | |
Idris> :l Spaces.idr | |
Type checking ./Spaces.idr | |
*Spaces> toomany | |
case case " " of | |
Delay (PT g) => g r (us . f') (cs . f') ue ce of | |
Id r => case r of | |
Success _ x => Right x | |
Failure es => Left (formatError s es) : Either String (List Char) | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment