[commit: ghc] wip/T2893: Test Trac #14863 (32e8499)

git at git.haskell.org git at git.haskell.org
Fri Mar 2 22:53:42 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T2893
Link       : http://ghc.haskell.org/trac/ghc/changeset/32e8499889d314e9efd0747b4053290a2dc237d5/ghc

>---------------------------------------------------------------

commit 32e8499889d314e9efd0747b4053290a2dc237d5
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Mar 2 22:53:27 2018 +0000

    Test Trac #14863


>---------------------------------------------------------------

32e8499889d314e9efd0747b4053290a2dc237d5
 testsuite/tests/quantified-constraints/T14863.hs | 27 ++++++++++++++++++++++++
 testsuite/tests/quantified-constraints/all.T     |  1 +
 2 files changed, 28 insertions(+)

diff --git a/testsuite/tests/quantified-constraints/T14863.hs b/testsuite/tests/quantified-constraints/T14863.hs
new file mode 100644
index 0000000..c74b818
--- /dev/null
+++ b/testsuite/tests/quantified-constraints/T14863.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE ImpredicativeTypes #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE QuantifiedConstraints #-}
+{-# LANGUAGE UndecidableInstances #-}
+module T14863 where
+
+data Dict c where
+  Dict :: c => Dict c
+
+class    (a => b) => Implies a b
+instance (a => b) => Implies a b
+
+uncurryCImpredic1 :: forall a b c. Implies a (b => c) => Dict (Implies (a, b) c)
+uncurryCImpredic1 = Dict
+
+uncurryCImpredic2 :: forall a b c. a => Implies b c => Dict (Implies (a, b) c)
+uncurryCImpredic2 = Dict
+
+uncurryC1 :: forall a b c. (a => b => c) => Dict (Implies (a, b) c)
+uncurryC1 = Dict
+
+uncurryC2 :: forall a b c. Implies a (Implies b c) => Dict (Implies (a, b) c)
+uncurryC2 = Dict
\ No newline at end of file
diff --git a/testsuite/tests/quantified-constraints/all.T b/testsuite/tests/quantified-constraints/all.T
index db1c6ba..4f63911 100644
--- a/testsuite/tests/quantified-constraints/all.T
+++ b/testsuite/tests/quantified-constraints/all.T
@@ -5,6 +5,7 @@ test('T2893', normal, compile, [''])
 test('T2893a', normal, compile, [''])
 test('T2893c', normal, compile, [''])
 test('T9123', normal, compile, [''])
+test('T14863', normal, compile, [''])
 
 # Not yet
 # test('T9123a', normal, compile, [''])



More information about the ghc-commits mailing list