[GHC] #8799: Orientation of given `Coercible` constraints

GHC ghc-devs at haskell.org
Tue Feb 18 17:49:45 UTC 2014


#8799: Orientation of given `Coercible` constraints
--------------------------------------------+------------------------------
        Reporter:  nomeata                  |            Owner:
            Type:  feature request          |           Status:  new
        Priority:  normal                   |        Milestone:
       Component:  Compiler (Type checker)  |          Version:  7.6.3
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  None/Unknown             |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:  #8555
--------------------------------------------+------------------------------

Comment (by rwbarton):

 FWIW this works (with !ScopedTypeVariables):
 {{{
 let f :: forall a b. Coercible a b => b -> a; f = coerce (id :: a -> a)
 }}}

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


More information about the ghc-tickets mailing list