summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_abstractFamily.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/TH_abstractFamily.hs')
-rw-r--r--tests/examples/ghc86/TH_abstractFamily.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/examples/ghc86/TH_abstractFamily.hs b/tests/examples/ghc86/TH_abstractFamily.hs
new file mode 100644
index 0000000..921dfaa
--- /dev/null
+++ b/tests/examples/ghc86/TH_abstractFamily.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TemplateHaskell #-}
+module TH_abstractFamily where
+
+import Language.Haskell.TH
+
+-- Empty closed type families are okay...
+ds1 :: Q [Dec]
+ds1 = [d| type family F a where |]
+
+-- ...but abstract ones should result in a type error
+ds2 :: Q [Dec]
+ds2 = [d| type family G a where .. |]
+