[GHC] #14236: Typeable App pattern doesn't match function types

GHC ghc-devs at haskell.org
Thu Sep 14 23:12:36 UTC 2017


#14236: Typeable App pattern doesn't match function types
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2369
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * differential:   => Phab:D2369


Old description:

> Consider the type representation,
> {{{#!hs
> rep = typeRep @(Int -> Char)
> }}}
>
> We would expect this to match the pattern,
> {{{#!hs
> (App (App arrowRep intRep) charRep)
> }}}
>
> However, this is currently not the case. Fix this.

New description:

 Consider the type representation,
 {{{#!hs
 rep = typeRep @(Int -> Char)
 }}}

 We would expect this to match the pattern,
 {{{#!hs
 (App (App arrowRep intRep) charRep)
 }}}
 where
 {{{#!hs
 arrowRep :: TypeRep ((->) :: Type -> Type -> Type)
 intRep   :: TypeRep Int
 charRep  :: TypeRep Char
 }}}
 However, this is currently not the case. Fix this.

--

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


More information about the ghc-tickets mailing list