diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-16 23:51:42 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-16 23:51:42 +0000 |
commit | 3b6a4909ff579507a7f9527264e0cb8464fbe555 (patch) | |
tree | c4dc6f11bf6bfe7be470b49f819ddf14f37403d3 /testsuite | |
parent | 9308c736d43b92bf8634babf565048e66e071bd8 (diff) | |
download | haskell-3b6a4909ff579507a7f9527264e0cb8464fbe555.tar.gz |
Add missing T11408.hs
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T11408.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T11408.hs b/testsuite/tests/indexed-types/should_compile/T11408.hs new file mode 100644 index 0000000000..df63c67a7e --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T11408.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE TypeFamilies #-} +module T11408 where + +type family UL a +type family UR a +type family MT a b + +mkMerge :: a -> UL a -> UR a -> Int +mkMerge = undefined + +merger :: a -> b -> MT a b +merger = undefined + +{- +merge :: + forall a b. (UL (MT a b) ~ a, UR (MT a b) ~ b) => a -> b -> Int +or + forall t. (MT (UL t) (UR t) ~ t) => UL t -> UR t -> Int + +These types are equivalent, and in fact neither is ambiguous, +but the solver has to work quite hard to prove that. +-} +merge x y = mkMerge (merger x y) x y |