Re: [GHC] #8026: DatatypeContexts should be fixed, not deprecated

Consider isaacdupree's `equal (undefined :: Pair (() -> ()))`. Surely
#8026: DatatypeContexts should be fixed, not deprecated -------------------------------------+------------------------------------ Reporter: gidyn | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by gidyn): Replying to [comment:9 monoidal]: this should be legal: `undefined` inhabits every type. Yet attempting to evaluate it leads to using `==` from `Eq (() -> ())` which does not exist. The use of DatatypeContexts would make this equivalent to `equal (undefined :: Eq ? => Pair (() -> ()))`, so the type he's asking about couldn't (and shouldn't) be constructed when using this extension. Excluding some nefarious uses of undefined seems like a reasonable price to pay for turning on a useful extension. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8026#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC