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

Sergiu Ivanov sivanov at colimite.fr
Thu Apr 20 10:03:47 UTC 2017


Thus quoth  Tyson Whitehead  at 02:19 on Thu, Apr 20 2017:
>
> Interesting observation about loading it from a file via typing it in.

Initially I suspected the culprit was the monomorphism restriction being
turned off by default (:showi language in GHCi, (great thanks to Brandon
Allbery who mentioned this command on another thread)), but I don't
really see a difference when I turn it off.

> 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.

Oh, I see.

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

That's kind of funny.  Seems somewhat inconsistent to my eye.

--
Sergiu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170420/31f6a2fe/attachment.sig>


More information about the Haskell-Cafe mailing list