diff options
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T22715_2.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T22715_2a.hs | 29 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 2 |
3 files changed, 36 insertions, 1 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T22715_2.hs b/testsuite/tests/simplCore/should_compile/T22715_2.hs new file mode 100644 index 0000000000..4001f92c30 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T22715_2.hs @@ -0,0 +1,6 @@ +module T22715_2 where + +import T22715_2a + +debugTerminalKeys :: (forall m. CommandMonad m => m Char) -> Input IO Char +debugTerminalKeys eval = runIdT eval diff --git a/testsuite/tests/simplCore/should_compile/T22715_2a.hs b/testsuite/tests/simplCore/should_compile/T22715_2a.hs new file mode 100644 index 0000000000..d53cccd7aa --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T22715_2a.hs @@ -0,0 +1,29 @@ +{-# OPTIONS_GHC -Wno-missing-methods #-} + +module T22715_2a where + +newtype IdentityT m a = IdentityT (m a) deriving Functor +newtype IdT m a = IdT {runIdT :: m a} deriving Functor + +class Functor m => SillyA m where + unused :: m a -> m a + +class SillyA m => SillyB m where + unused2 :: m a -> m a + +instance SillyA m => SillyA (IdentityT m) where +instance SillyB m => SillyB (IdentityT m) where + +instance SillyA m => SillyA (IdT m) where +instance SillyB m => SillyB (IdT m) where + +instance SillyA IO where +instance SillyB IO where + +class Functor m => Special m +instance Functor m => Special (IdT m) + +type Input m = IdentityT (IdentityT m) + +class (Special m, SillyB m) => CommandMonad m +instance SillyB m => CommandMonad (IdT (Input m)) diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 068b830a51..a07aba3940 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -469,4 +469,4 @@ test('T22662', normal, compile, ['']) test('T22725', normal, compile, ['-O']) test('T22502', normal, compile, ['-O']) test('T22611', [when(wordsize(32), skip), grep_errmsg(r'\$salterF') ], compile, ['-O -ddump-simpl -dsuppress-uniques -dsuppress-all']) - +test('T22715_2', normal, multimod_compile, ['T22715_2', '-v0 -O -fspecialise-aggressively']) |