summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/SynDataRec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/SynDataRec.hs')
-rw-r--r--testsuite/tests/gadt/SynDataRec.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/SynDataRec.hs b/testsuite/tests/gadt/SynDataRec.hs
new file mode 100644
index 0000000000..021ed0ba17
--- /dev/null
+++ b/testsuite/tests/gadt/SynDataRec.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE KindSignatures, DataKinds, GADTs #-}
+
+module SynDataRec where
+
+-- This mutual recursion betwen a data type and
+-- a type synonym is a little delicate. See
+-- Note [GADT return types] in GHC.Tc.TyCl
+
+data Pass = Parsed | Renamed
+
+data GhcPass (c :: Pass) where
+ GhcPs :: GhcPs
+ GhcRn :: GhcRn
+
+type GhcPs = GhcPass 'Parsed
+type GhcRn = GhcPass 'Renamed