Fix #17334 where NCG did not properly update the CFG.
[ghc.git] / testsuite / tests / typecheck / should_compile / T13879.hs
1 {-# LANGUAGE GADTs #-}
2 {-# LANGUAGE RankNTypes #-}
3 {-# LANGUAGE ScopedTypeVariables #-}
4 {-# LANGUAGE TypeFamilies #-}
5 {-# LANGUAGE DataKinds, PolyKinds #-}
6 {-# LANGUAGE TypeOperators #-}
7 module Bug where
8
9 import Data.Kind
10
11 data family Sing (a :: k)
12
13 data HR (a :: j) (b :: k) where
14 HRefl :: HR a a
15
16 data instance Sing (z :: HR a b) where
17 SHRefl :: Sing HRefl
18
19 foo :: forall (j :: Type) (k :: Type) (a :: j)
20 (b :: k) (r :: HR a b)
21 (p :: forall (z :: Type) (y :: z). HR a y -> Type).
22 Sing r
23 -> App p HRefl
24 -> HRApp p r
25 foo SHRefl pHRefl = pHRefl
26
27 type App f x = f x
28 type HRApp (f :: forall (z :: Type) (y :: z). HR a y -> Type)
29 (x :: HR a b) = f x