[GHC] #12882: Unexpected constraint when using ExistentialQuantification

GHC ghc-devs at haskell.org
Sun Nov 27 15:03:07 UTC 2016


#12882: Unexpected constraint when using ExistentialQuantification
-------------------------------------+-------------------------------------
        Reporter:  danilo2           |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:  invalid           |             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 danilo2):

 rwbarton, mpickering: very interesting, thanks for clarification! By the
 way, is there any other way to create `Elem`-like newtype, which will just
 ensure GHC that this constraint would be meet? I dont want to pass the
 dictionary in runtime. I just want to tell the type system that if I ever
 created `Elem t`, `t` is Typeable. The reason behind it is that I dont
 want constraint on `t` to appear on functions processing `Elem t`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12882#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list