Created
October 6, 2014 01:37
-
-
Save hughfdjackson/562edfe4df711074fd91 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Building dust-0.1.0.0... | |
Preprocessing executable 'dust' for dust-0.1.0.0... | |
Preprocessing test suite 'tests' for dust-0.1.0.0... | |
[2 of 4] Compiling Language.Parse ( src/Language/Parse.hs, dist/build/tests/tests-tmp/Language/Parse.o ) | |
src/Language/Parse.hs:17:12: | |
No instance for (Stream s m Char) arising from a use of ‘oneOf’ | |
In a stmt of a 'do' block: first <- oneOf alpha | |
In the expression: | |
do { first <- oneOf alpha; | |
rest <- many $ oneOf alphaNumericSymbol; | |
return $ first : rest } | |
In an equation for ‘expr’: | |
expr | |
= do { first <- oneOf alpha; | |
rest <- many $ oneOf alphaNumericSymbol; | |
return $ first : rest } |
This file contains hidden or 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
expr :: ParsecT s u m String | |
expr = do | |
first <- oneOf alpha | |
rest <- many $ oneOf alphaNumericSymbol | |
return $ first : rest | |
-- charsets | |
numeric = ['0'..'9'] | |
alpha = ['a'..'z'] ++ ['A'..'Z'] | |
alphaNumeric = alpha ++ numeric | |
symbol = "'" | |
alphaNumericSymbol :: String | |
alphaNumericSymbol = alpha ++ numeric ++ symbol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment