Created
March 5, 2019 10:32
-
-
Save andrevidela/24ec8dd316df132e4b3cba1c310ce6d9 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
import TParsec | |
except : (Alternative mn, Monad mn, Inspect (Toks p) (Tok p), Eq (Tok p)) => | |
Tok p -> All (Parser mn p (Tok p)) | |
except t = guard (\t' => (t /= t')) anyTok | |
notChar : (Alternative mn, Monad mn, Subset Char (Tok p), Eq (Tok p), Inspect (Toks p) (Tok p)) => | |
Char -> All (Parser mn p (Tok p)) | |
notChar = except . into | |
skip : Parser mn p a -> Parser mn p () | |
skip = ?skiphole | |
-- skipMany : ??? | |
-- skipMany = ?skipMany_rhs | |
comments : (Alternative mn, Monad mn, Subset Char (Tok p), Inspect (Toks p) (Tok p), Eq (Tok p)) => | |
All (Parser mn p ()) | |
comments = between (char ';') (char '\n') (skipMany $ notChar '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment