[GHC] #14765: Levity polymorphism panic
GHC
ghc-devs at haskell.org
Mon Feb 5 22:16:18 UTC 2018
#14765: Levity polymorphism panic
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.5
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time
Unknown/Multiple | crash or panic
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I imagine I have made a mistake, but GHC shouldn't panic!
{{{#!hs
{-# language TypeInType, ScopedTypeVariables, MagicHash #-}
import GHC.Exts (TYPE, Proxy#, proxy#)
fold :: forall rep a (r :: TYPE rep).
(r -> a -> Proxy# r -> r) -> (Proxy# r -> r) -> [a] -> r
fold f k [] = k proxy#
fold f k (x : xs) = fold f (f (k proxy#) x) xs
}}}
This gives me
{{{
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.5.20171211 for x86_64-unknown-linux):
splitFunTy
()
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in
ghc:Outputable
pprPanic, called at compiler/types/Type.hs:921:30 in ghc:Type
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14765>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list