
#16146: Trivial partial type signature kills type inference in the presence of GADTs -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): '''Forall-or-nothing behaviour'''
Another interesting example has cropped up. Re-consider
Partial type signatures have always had the semantics that you can use a `forall` to bind the type variables you need to mention but the final type signature may have more. E.g. {{{ f :: forall a. _ -> a -> Bool f x y = True }}} Here the final sig is `f :: forall a b. b -> a -> Bool`. It would be possible to say that * If you use a `forall` there must be no more quantifiers (except, `Inferred` ones?), or * There can be extra quantifiers, but they are `Inferred`, so we'd get `f :: forall {b}. forall a. b -> a -> Bool`. (I quite like this.), or * The current behaviour. I don't feel strongly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16146#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler