Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No -XNoMonomorphismRestriction: GHC.Prim.Any * types show up #2

Open
xnyhps opened this issue May 4, 2012 · 0 comments
Open

No -XNoMonomorphismRestriction: GHC.Prim.Any * types show up #2

xnyhps opened this issue May 4, 2012 · 0 comments
Assignees

Comments

@xnyhps
Copy link
Owner

xnyhps commented May 4, 2012

Without -XNoMonomorphismRestriction, the type of the module:

f = _?h >>= _?g

is found to be:

f :: GHC.Prim.Any (* -> *) (GHC.Prim.Any *)

(Even when interpreting GHC.Prim.Any * as forall a. a, this is incorrect as the Monad constraint is not on the first * -> *)

With -XNoMonomorphismRestriction, the type is correctly:

f :: Monad m => m b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant