[Haskell-cafe] The 13-line example in Text.Megaparsec.Expr

Jeffrey Brown jeffbrown.the at gmail.com
Sat Feb 27 06:10:29 UTC 2016


In my previous email I perhaps should have also reported a second type of
error:

    example.hs:26:21:
        Couldn't match expected type ‘Text.Parsec.Token.GenTokenParser
                                        s0 u0 m0’
                    with actual type ‘[Char]’
        In the first argument of ‘prefix’, namely ‘"-"’
        In the expression: prefix "-" negate
        In the expression: [prefix "-" negate, prefix "+" id]

On Fri, Feb 26, 2016 at 10:05 PM, Jeffrey Brown <jeffbrown.the at gmail.com>
wrote:

> Thanks, Will. I had tried that, and got a lot of errors like this:
>
>     example.hs:20:26:
>         Couldn't match type ‘Char’ with ‘()’
>         Expected type: [()]
>           Actual type: [Char]
>         In the first argument of ‘symbol’, namely ‘"("’
>         In the first argument of ‘between’, namely ‘(symbol "(")’
>         In the expression: between (symbol "(") (symbol ")")
>
>
> On Fri, Feb 26, 2016 at 8:20 PM, William Yager <will.yager at gmail.com>
> wrote:
>
>>
>> https://hackage.haskell.org/package/parsec-3.1.9/docs/Text-Parsec-Token.html#v:reservedOp
>> ?
>>
>> --Will
>>
>> On Fri, Feb 26, 2016 at 10:08 PM, Jeffrey Brown <jeffbrown.the at gmail.com>
>> wrote:
>>
>>>
>>> That still won't compile, because GHC does not know what reservedOp
>>> means. Does reservedOp refer to something that no longer exists, or have I
>>> just not found it?
>>>
>>>
>
>
> --
> Jeffrey Benjamin Brown
>



-- 
Jeffrey Benjamin Brown
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160226/1a1aeb2d/attachment.html>


More information about the Haskell-Cafe mailing list