[GHC] #13819: GHC Panics
GHC
ghc-devs at haskell.org
Mon Jun 12 20:49:13 UTC 2017
#13819: GHC Panics
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
{-# LANGUAGE DeriveFunctor, TypeApplications #-}
-- {-# Language ViewPatterns #-}
-- {-# Language InstanceSigs, ViewPatterns, TupleSections,
GeneralizedNewtypeDeriving, TemplateHaskell, LambdaCase #-}
module D where
import Data.Coerce
import Control.Applicative
newtype A a = A (IO a)
deriving Functor
instance Applicative A where
pure = pure @(_ -> WrappedMonad A _) @(_ -> A _) pure
instance Monad A where
}}}
causes a panic
{{{
$ ghci -ignore-dot-ghci /tmp/a.hs
GHCi, version 8.3.20170605: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling D ( /tmp/a.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 8.3.20170605 for x86_64-unknown-linux):
repSplitAppTys
w0_a1xc[tau:4]
WrappedMonad A w0_a1xe[tau:4]
[]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
ghc:Outputable
pprPanic, called at compiler/types/Type.hs:809:9 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13819>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list