blob: e3f9e4bbed2a6b29ad0d0d4fef69568c6c13f9c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds, PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE StandaloneKindSignatures #-}
module Bug where
import Data.Kind
data family Sing (a :: k)
type HR :: j -> k -> Type
data HR a b where
HRefl :: HR a a
data instance Sing (z :: HR a b) where
SHRefl :: Sing HRefl
foo :: forall (j :: Type) (k :: Type) (a :: j)
(b :: k) (r :: HR a b)
(p :: forall (z :: Type) (y :: z). HR a y -> Type).
Sing r
-> App p HRefl
-> HRApp p r
foo SHRefl pHRefl = pHRefl
type App f x = f x
type HRApp (f :: forall (z :: Type) (y :: z). HR a y -> Type)
(x :: HR a b) = f x
|