diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-22 17:25:17 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-22 17:25:17 +0100 |
commit | 0faa6024686ea3f5ad30cfdb5b091a2afc6eaf40 (patch) | |
tree | b32d5f992847126768afde9f01baa90527ab272b /testsuite/tests/polykinds/T7176.hs | |
parent | 433f7a65ce39951406ac01aa74acc7a7b5da1eab (diff) | |
download | haskell-0faa6024686ea3f5ad30cfdb5b091a2afc6eaf40.tar.gz |
Test Trac #7176
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 _) = () + |