[GHC] #14321: -fsolve-constant-dicts is not very robust when dealing with GADTs

GHC ghc-devs at haskell.org
Wed Oct 4 20:29:32 UTC 2017


#14321: -fsolve-constant-dicts is not very robust when dealing with GADTs
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       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:  #9701             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 In `isItSillyIntTA`, if `isItSilly` was inlined..

 {{{
 isItSillyIntTA = (\@a1 -> \(a :: a1) -> \(s :: Silly1 a1) -> case s of
 (Silly1 ($dOrd :: Ord a1) (x :: a1)) -> (< $dOrd) a x) @Int
 }}}

 Then beta reduction on the type argument leaves you with
 {{{
 isItSillyIntTA = (\(a : Int) -> \(s :: Silly1 Int) -> case s of (Silly1
 ($dOrd :: Ord Int) (x :: Int) -> (< $dOrd) a x))
 }}}

 So is the dictionary not statically known here in the same sense that
 -fsolve-constant-dicts is meant to solve? I think I am subtly
 misunderstanding the scope of the flag.

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


More information about the ghc-tickets mailing list