Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. tokenize :: Parser String
  2. tokenize =do op <- many1 $ letter <|>
  3. char '+' <|>
  4. char '^' <|>
  5. char '-' <|>
  6. char '>' <|>
  7. char '*'
  8. return op
  9.  
  10. curveOpt inval = case tokenize of
  11. (Parser "++") ->
  12. (do c <- curve
  13. curveOpt $ Connect inval c)
  14.  
  15. Couldn't match type `[Char]'
  16. with `ParsecT String () Data.Functor.Identity.Identity String'
  17. Expected type: Parser String
  18. Actual type: [Char]
  19. In the pattern: "++"
  20. In a case alternative:
  21. "++"
  22. -> (do { c <- curve;
  23. curveOpt $ Connect inval c })
  24. In the expression:
  25. case tokenize of {
  26. "++"
  27. -> (do { c <- curve;
  28. curveOpt $ Connect inval c }) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement