[commit: ghc] master: Test #11254 in typecheck/should_compile/T11254 (bd7ab66)
git at git.haskell.org
git at git.haskell.org
Sat Dec 26 21:02:40 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/bd7ab66875bb567693020279df2f8b5834bd24bb/ghc
>---------------------------------------------------------------
commit bd7ab66875bb567693020279df2f8b5834bd24bb
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Tue Dec 22 13:34:52 2015 -0500
Test #11254 in typecheck/should_compile/T11254
>---------------------------------------------------------------
bd7ab66875bb567693020279df2f8b5834bd24bb
testsuite/tests/typecheck/should_compile/T11254.hs | 19 +++++++++++++++++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
2 files changed, 20 insertions(+)
diff --git a/testsuite/tests/typecheck/should_compile/T11254.hs b/testsuite/tests/typecheck/should_compile/T11254.hs
new file mode 100644
index 0000000..fcaae9c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T11254.hs
@@ -0,0 +1,19 @@
+-- /tmp/panic.hs
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE InstanceSigs #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE UndecidableSuperClasses #-}
+{-# OPTIONS_GHC -fdefer-type-errors #-}
+
+module T11254 where
+
+class (Frac (Frac a) ~ Frac a, Fractional (Frac a), ID (Frac a)) => ID a where
+ type Frac a
+ embed :: a -> Frac a
+
+instance ID Rational where
+ type Frac Rational = Int
+ embed :: Rational -> Rational
+ embed = undefined
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 8002299..20ef3a7 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -485,3 +485,4 @@ test('T10935', normal, compile, [''])
test('T10971a', normal, compile, [''])
test('T11237', normal, compile, [''])
test('T10592', normal, compile, [''])
+test('T11254', expect_broken(11254), compile, [''])
More information about the ghc-commits
mailing list