Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERT failure in TyCoRep #34

Open
goldfirere opened this issue Jun 23, 2015 · 0 comments
Open

ASSERT failure in TyCoRep #34

goldfirere opened this issue Jun 23, 2015 · 0 comments

Comments

@goldfirere
Copy link
Owner

From @RafaelBocquet, extracted from #31:

data family Sing (k :: *) :: k -> *
type Sing' (x :: k) = Sing k x
data TyArr' (a :: *) (b :: *) :: *
type TyArr (a :: *) (b :: *) = TyArr' a b -> *
type family (a :: TyArr k1 k2) @@ (b :: k1) :: k2
data TyPi' (a :: *) (b :: TyArr a *) :: *
type TyPi (a :: *) (b :: TyArr a *) = TyPi' a b -> *
type family (a :: TyPi k1 k2) @@@ (b :: k1) :: k2 @@ b
$(return [])
data T (a :: *) (b :: *) where
  T1 :: forall a. T a a
  T2 :: forall a b. T a b -> T a (b, b)

data A (a :: *) (x :: TyArr' * *)
$(return [])
data B (a :: *) (x :: TyPi' * (A a))
$(return [])
data C (x :: TyArr' * *)
$(return [])
data D (x :: TyPi' * C)
$(return [])
type instance A a @@ x  = *
$(return [])
type instance B a @@@ x = T a x
$(return [])
type instance C @@ a = TyPi * (A a)
$(return [])
type instance D @@@ a = B a 
$(return [])

data instance Sing (T a b) x where
  ST1 :: forall a. Sing (T a a) 'T1
  ST2 :: forall (a :: *) (b :: *) (c :: D @@@ a @@@ b). Sing (T a (b, b)) ('T2 c)

produces

ghc: panic! (the 'impossible' happened)
  (GHC version 7.11.20150527 for x86_64-unknown-linux):
    ASSERT failed! file compiler/types/TyCoRep.hs, line 1817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant