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

GHC ghc-devs at haskell.org
Fri Jul 19 11:11:41 CEST 2013


#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]:
 > Consider isaacdupree's `equal (undefined :: Pair (() -> ()))`. Surely
 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




More information about the ghc-tickets mailing list