diff options
Diffstat (limited to 'testsuite/tests/polykinds/T7176.hs')
-rw-r--r-- | testsuite/tests/polykinds/T7176.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T7176.hs b/testsuite/tests/polykinds/T7176.hs new file mode 100644 index 0000000000..e3416d1420 --- /dev/null +++ b/testsuite/tests/polykinds/T7176.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, GADTs, RankNTypes #-} + +module T7176 where + +type family Sing (a :: b) + +data SMaybe (a :: Maybe c) where + SNothing :: SMaybe Nothing + SJust :: Sing a -> SMaybe (Just a) +type instance Sing (a :: Maybe d) = SMaybe a + +sIsJust :: forall (a :: Maybe e). Sing a -> () +sIsJust SNothing = () +sIsJust (SJust _) = () + |