Skip to content

Instantly share code, notes, and snippets.

@oleks
Last active April 11, 2017 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleks/9c5cf335a932366fa3c79d46a2d8b9db to your computer and use it in GitHub Desktop.
Save oleks/9c5cf335a932366fa3c79d46a2d8b9db to your computer and use it in GitHub Desktop.
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