hello
i'm getting inconsistent monomorphism behavior with the same code only
depending on whether or not -XTypeFamilies is enabled:
----
{-# LANGUAGE TypeFamilies #-}
snda :: a -> b -> b
snda ba = id
main = do
let ma = (return () :: IO ())
mBox bb = snda ma bb
mBox $ return (4 :: Int)
mBox $ return "G"
return ()
----
in the preceding example, if -XTypeFamilies is enabled then "mBox" is
monomorphic and the program will terminate early, otherwise,
it's polymorphic and the program will complete successfully.
i think i understand why this is the case but i couldn't find documentation on
this inconsistency anywhere. is this expected behavior or is this a bug in GHC?
thanks!
rian
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe