Probably AllowAmbiguousTypes + UndecidableInstances + TypeInType
ghc.exe: panic! (the 'impossible' happened)
(GHC version 8.0.2 for x86_64-unknown-mingw32):
isInjectiveTyCon sees a TcTyCon KLN
{-# LANGUAGE RankNTypes, GADTs, TypeOperators, PolyKinds, DataKinds, TypeFamilies, AllowAmbiguousTypes, UndecidableInstances, TypeInType #-}
module MCS.Function where
import MCS.Core
--import MCS.Value
import Data.Kind -- necessary for *
type family KLN (n :: k) :: Nat where
KLN (f :: v -> k) = S (KLN (forall t. f t))
KLN (f :: *) = Z
type family Reveal (n :: k) (l :: Vect (KLN n) L) :: * where
Reveal (f :: v -> k) (Cons (Label (t :: v)) l) = Reveal (f t) l
Reveal (a :: *) Nil = a
The problem *has* to be somewhere in the KLN / Reveal interaction, so I removed everything else for this. Every other weird area is commented out or unused, and the bug vanished when KLN / Reveal was commented out. KLN shouldn't even work. If it could be interaction with the rest of the document, I'll put that back in.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Windows |
Architecture |