[GHC] #7880: Require "forall" in definitions of polymorphic types
GHC
cvs-ghc at haskell.org
Thu May 2 18:35:52 CEST 2013
#7880: Require "forall" in definitions of polymorphic types
---------------------------------+------------------------------------------
Reporter: monoidal | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: GHC accepts invalid program
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonpj):
I have some sympathy with this, but what about
{{{
f :: (Num a => a -> a) -> Int
}}}
Which of these does it mean?
{{{
f :: (forall a. Num a => a -> a) -> Int
f :: forall a. (Num a => a -> a) -> Int
}}}
Your proposal is (in effect) that "=>" does not trigger an implicit
"forall"; only the top level of a type does that. I think that's probably
very sensible, but it's a breaking change, and I don't know how much code,
if any, would break.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7880#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list