write-you-a-scheme-v2 / scheme

Write You a Scheme
https://www.wespiser.com/writings/wyas/home.html
MIT License
552 stars 114 forks source link

parse3.hs #6

Closed adamwespiser closed 7 years ago

adamwespiser commented 7 years ago

issue with new parser, parse3.hs

[1 of 1] Compiling Main             ( Parse3.hs, Parse3.o )

Parse3.hs:18:9:
    Couldn't match type ‘[Char]’ with ‘T.Text’
    Expected type: Lang.GenLanguageDef T.Text () Identity
      Actual type: Lang.LanguageDef ()
    In the expression: Lang.emptyDef
    In the expression:
      Lang.emptyDef
        {Tok.commentStart = "{-", Tok.commentEnd = "-}",
         Tok.identStart = letter <|> oneOf "+-/*",
         Tok.identLetter = alphaNum <|> oneOf "_'",
         Tok.reservedOpNames = ["'", "\""],
         Tok.reservedNames = ["true", "false", "let", ....]}
adamwespiser commented 7 years ago

alright, I've gotten the file to work with String, see src/Parse4.hs

adamwespiser commented 7 years ago

ghc -o ~/a.out Parse4.hs && ~/a.out