
#11715: Constraint vs * -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | 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 Iceland_jack): Replying to [comment:9 simonpj]:
* If we were to silence `checkValidType` (with a language extension), it would also allow functions like {{{ reify :: c => c with :: c -> (c => r) -> r }}}
This was one of my use cases for #11441, this would be an interesting solution and may supersede that part of the proposal. Would this be enabled for each module or as a pragma: {{{#!hs {-# ALLOWINVALIDTYPE f #-} f :: Int => Int f = undefined }}} Heck, it could go as far as *require* an ill-kinded type — `{-# INVALIDTYPE f #-}` — such that this would not compile: {{{#!hs {-# INVALIDTYPE f #-} f :: Int -> Int f = undefined }}} What would be the use of that? It's machine checkable and who knows what changed during refactoring, a reader won't have to guess if there is some funny business going on. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11715#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler