
Hello Tyson, Thus quoth Tyson Whitehead at 19:41 on Tue, Apr 18 2017:
I've been unable to get the following (simplified) code to be accepted by GHCi (8.0.1 and 8.0.2)
Prelude> let (x, y) = (1, return 2)
[...]
and I don't seem to be able to provide a type signatures that GHCi is okay with
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.) Anyway, I put the following in tuple.hs: func :: Monad m => (Int, m Int) func = (1, return 2) Then, ghci tuple.hs swallows the file no problem and allows me to do *Main> func :: (Int, Maybe Int) (1, Just 2) (I have GHCi 8.0.2.) -- Sergiu