diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T18406b.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T18406b.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T18406b.hs b/testsuite/tests/typecheck/should_compile/T18406b.hs new file mode 100644 index 0000000000..cf65684eee --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T18406b.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE Haskell2010 #-} + +{-# LANGUAGE ScopedTypeVariables, MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-} + +module Bug where + +class C a b | a -> b where + op :: a -> a + +foo :: forall a b. C a b => a -> b -> a +foo x y = blah x + where + -- GHC should infer + -- blah :: a -> a + -- and not + -- blah :: forall b0. C a b0 => a -> a + blah z = [x,z] `seq` op z |