[GHC] #9701: GADTs not specialized properly
GHC
ghc-devs at haskell.org
Sun Oct 19 22:30:38 UTC 2014
#9701: GADTs not specialized properly
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: Runtime | Blocked By:
performance bug | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
I just realized that you might not find that example as convincing as this
one:
{{{#!hs
data Silly a where Silly :: Num a => a -> Silly a
double :: Int -> Int
double n = n + n
oops :: Silly Int -> Int
oops (Silly x) = double x
}}}
Now if `double` gets inlined, it will use the `Num` dictionary from
`Silly`, but if it's not inlined, it will use the usual one.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9701#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list