summaryrefslogtreecommitdiff
path: root/testsuite/tests/quantified-constraints/T19921.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/quantified-constraints/T19921.hs')
-rw-r--r--testsuite/tests/quantified-constraints/T19921.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/quantified-constraints/T19921.hs b/testsuite/tests/quantified-constraints/T19921.hs
new file mode 100644
index 0000000000..a0ed436784
--- /dev/null
+++ b/testsuite/tests/quantified-constraints/T19921.hs
@@ -0,0 +1,29 @@
+{-# LANGUAGE
+ QuantifiedConstraints
+ , StandaloneKindSignatures
+ , TypeOperators
+ , GADTs
+ , ConstraintKinds
+ , RankNTypes
+ , UndecidableInstances
+ , ImpredicativeTypes
+#-}
+module Typelevel.Constraint.Repro where
+
+import Data.Kind (Constraint, Type)
+
+type Dict :: Constraint -> Type
+data Dict c
+ where
+ Dict :: c => Dict c
+
+type (⇒) :: Constraint -> Constraint -> Constraint
+type c ⇒ d = c => d
+infixr 0 ⇒
+
+type (\/) :: Constraint -> Constraint -> Constraint
+type a \/ b = (forall r. (a ⇒ r, b ⇒ r) ⇒ r)
+infixr 5 \/
+
+dict :: Dict ((x \/ y) \/ z ⇒ x \/ y \/ z)
+dict = Dict