summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_tf3.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/TH_tf3.hs')
-rw-r--r--tests/examples/ghc86/TH_tf3.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/examples/ghc86/TH_tf3.hs b/tests/examples/ghc86/TH_tf3.hs
new file mode 100644
index 0000000..aaa59f5
--- /dev/null
+++ b/tests/examples/ghc86/TH_tf3.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeFamilies, FlexibleInstances, UndecidableInstances #-}
+
+module TH_tf3 where
+
+type family T a
+
+$( [d| foo :: T [a] ~ Bool => a -> a
+ foo x = x |] )
+
+$( [d| class C a
+ instance a ~ Int => C a |] )