Guest User

Parsec error

a guest
Dec 16th, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1.  
  2. ex.hs:11:36:
  3. Couldn't match type ‘Text.Parsec.Prim.ParsecT s0 u0 m0 [Char]’
  4. with ‘[Char]’
  5. Expected type: Text.Parsec.Prim.ParsecT
  6. String () Data.Functor.Identity.Identity [Char]
  7. Actual type: Text.Parsec.Prim.ParsecT
  8. String
  9. ()
  10. Data.Functor.Identity.Identity
  11. (Text.Parsec.Prim.ParsecT s0 u0 m0 [Char])
  12. Relevant bindings include
  13. withPrefix :: forall u u1.
  14. Text.Parsec.Prim.ParsecT
  15. String
  16. u
  17. Data.Functor.Identity.Identity
  18. (Text.Parsec.Prim.ParsecT s0 u1 m0 [Char])
  19. (bound at ex.hs:14:21)
  20. In the second argument of ‘(<|>)’, namely ‘withPrefix’
  21. In a stmt of a 'do' block: x <- noPrefix <|> withPrefix
  22.  
  23. ex.hs:17:54:
  24. No instance for (Text.Parsec.Prim.Stream s0 m0 Char)
  25. arising from a use of ‘digit’
  26. The type variables ‘s0’, ‘m0’ are ambiguous
  27. Relevant bindings include
  28. withPrefix :: Text.Parsec.Prim.ParsecT
  29. String
  30. u
  31. Data.Functor.Identity.Identity
  32. (Text.Parsec.Prim.ParsecT s0 u1 m0 [Char])
  33. (bound at ex.hs:14:21)
  34. Note: there are several potential instances:
  35. instance Monad m =>
  36. Text.Parsec.Prim.Stream Data.ByteString.Internal.ByteString m Char
  37. -- Defined in ‘Text.Parsec.Prim’
  38. instance Monad m =>
  39. Text.Parsec.Prim.Stream
  40. Data.ByteString.Lazy.Internal.ByteString m Char
  41. -- Defined in ‘Text.Parsec.Prim’
  42. instance Monad m =>
  43. Text.Parsec.Prim.Stream Data.Text.Internal.Lazy.Text m Char
  44. -- Defined in ‘Text.Parsec.Prim’
  45. ...plus two others
  46. In the first argument of ‘many1’, namely ‘digit’
  47. In the expression: many1 digit
  48. In a case alternative: 'd' -> many1 digit
  49.  
  50. ex.hs:18:54:
  51. No instance for (Show b0) arising from a use of ‘show’
  52. The type variable ‘b0’ is ambiguous
  53. Note: there are several potential instances:
  54. instance Show a => Show (ZipList a)
  55. -- Defined in ‘Control.Applicative’
  56. instance Show Data.Text.Internal.Text -- Defined in ‘Data.Text’
  57. instance Show Data.Text.Internal.Lazy.Text
  58. -- Defined in ‘Data.Text.Lazy’
  59. ...plus 28 others
  60. In the first argument of ‘(.)’, namely ‘show’
  61. In the first argument of ‘fmap’, namely
  62. ‘(show . fst . head . readOct)’
  63. In the expression:
  64. fmap (show . fst . head . readOct) (many1 octDigit)
  65.  
  66. ex.hs:18:74:
  67. No instance for (Num b0) arising from a use of ‘readOct’
  68. The type variable ‘b0’ is ambiguous
  69. Note: there are several potential instances:
  70. instance Num Double -- Defined in ‘GHC.Float’
  71. instance Num Float -- Defined in ‘GHC.Float’
  72. instance Integral a => Num (GHC.Real.Ratio a)
  73. -- Defined in ‘GHC.Real’
  74. ...plus three others
  75. In the second argument of ‘(.)’, namely ‘readOct’
  76. In the second argument of ‘(.)’, namely ‘head . readOct’
  77. In the second argument of ‘(.)’, namely ‘fst . head . readOct’
  78.  
  79. ex.hs:19:54:
  80. No instance for (Show b1) arising from a use of ‘show’
  81. The type variable ‘b1’ is ambiguous
  82. Note: there are several potential instances:
  83. instance Show a => Show (ZipList a)
  84. -- Defined in ‘Control.Applicative’
  85. instance Show Data.Text.Internal.Text -- Defined in ‘Data.Text’
  86. instance Show Data.Text.Internal.Lazy.Text
  87. -- Defined in ‘Data.Text.Lazy’
  88. ...plus 28 others
  89. In the first argument of ‘(.)’, namely ‘show’
  90. In the first argument of ‘fmap’, namely
  91. ‘(show . fst . head . readHex)’
  92. In the expression:
  93. fmap (show . fst . head . readHex) (many1 hexDigit)
  94.  
  95. ex.hs:19:74:
  96. No instance for (Num b1) arising from a use of ‘readHex’
  97. The type variable ‘b1’ is ambiguous
  98. Note: there are several potential instances:
  99. instance Num Double -- Defined in ‘GHC.Float’
  100. instance Num Float -- Defined in ‘GHC.Float’
  101. instance Integral a => Num (GHC.Real.Ratio a)
  102. -- Defined in ‘GHC.Real’
  103. ...plus three others
  104. In the second argument of ‘(.)’, namely ‘readHex’
  105. In the second argument of ‘(.)’, namely ‘head . readHex’
  106. In the second argument of ‘(.)’, namely ‘fst . head . readHex’
Add Comment
Please, Sign In to add comment