[Haskell-cafe] Problem with tuple with one element constrained

Tyson Whitehead twhitehead at gmail.com
Thu Apr 20 02:19:15 UTC 2017


Thanks Sergiu,

I know there was some defaulting, but didn't think much of it beyond that. Special GHCi handling makes sense. Maybe I'll open a ticket just in case this is an unintended effect.

Interesting observation about loading it from a file via typing it in.  My code is actually a test case for use with the doctest package that I was just running manually to work out.  I'm not sure if it does the equivalent of loading it from a file or not.

Ultimately I wound up doing the binding via a case statement instead of let.  It seems GHCi is okay with that.

Cheers!  -Tyon

On Tue, Apr 18, 2017, 17:01 Sergiu Ivanov <sivanov at colimite.fr <mailto:sivanov at colimite.fr>> wrote:

    GHCi handles polymorphic types of interactive expressions somewhat
    differently from the polymorphic types of expressions loaded from
    files. (I'd be happy if someone could reproduce the explanation which I
    saw a couple times but which I cannot find any more.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170419/87bf07cf/attachment.html>


More information about the Haskell-Cafe mailing list