diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-12 15:09:37 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-13 09:23:53 +0100 |
commit | 0ae72512255ba66ef89bdfeea65a23ea6eb35124 (patch) | |
tree | a21ffcb040c1f53cfb8a1f548a8c284208dd623d /testsuite/tests/partial-sigs/should_compile/T13482.hs | |
parent | 037c2495d83bb7da7f15c8e076df2c575500d0fd (diff) | |
download | haskell-0ae72512255ba66ef89bdfeea65a23ea6eb35124.tar.gz |
Yet more work on TcSimplify.simplifyInfer
The proximate cause for this patch is Trac #13482, which pointed out
further subtle interactions between
- Inferring the most general type of a function
- A partial type signature for that function
That led me into /further/ changes to the shiny new stuff in
TcSimplify.simplifyInfer, decideQuantification, decideMonoTyVars,
and related functions.
Happily, I was able to make some of it quite a bit simpler,
notably the bit about promoting free tyvars. I'm happy with
the result.
Moreover I fixed Trac #13524 at the same time. Happy days.
Diffstat (limited to 'testsuite/tests/partial-sigs/should_compile/T13482.hs')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T13482.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T13482.hs b/testsuite/tests/partial-sigs/should_compile/T13482.hs new file mode 100644 index 0000000000..3af3a74231 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T13482.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE PartialTypeSignatures #-} +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE KindSignatures #-} + +module T12382 where + +minimal1_noksig :: forall m. ( _ ) => Int -> Bool +minimal1_noksig _ = (mempty :: m) == (mempty :: m) + +minimal1 :: forall (m :: *). _ => Bool +minimal1 = (mempty :: m) == (mempty :: m) + +minimal2 :: forall m. (Eq m, _) => Bool +minimal2 = (mempty :: m) == (mempty :: m) + +minimal3 :: forall m. (Monoid m, _) => Bool +minimal3 = (mempty :: m) == (mempty :: m) + +minimal4 :: forall m. (Monoid m, Eq m) => Bool +minimal4 = (mempty :: m) == (mempty :: m) + |