diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-05 14:24:54 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-05 16:50:41 +0100 |
commit | 953648127cea2836ec134b03a966695ac0b36434 (patch) | |
tree | 6b5721dc6f0133b54af97c60f396e9207ef223ae /testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr | |
parent | ab98860871cfac17417d5b55e590445064d21111 (diff) | |
download | haskell-953648127cea2836ec134b03a966695ac0b36434.tar.gz |
Tidy up and refactor wildcard handling
When examining #10615, I found the wildcard handling hard
to understand. This patch refactors quite a bit, but with
no real change in behaviour.
* Split out TcIdSigInfo from TcSigInfo, as a separate type,
like TcPatSynInfo.
* Make TcIdSigInfo express more invariants by pushing the
wildard info into TcIdSigBndr
* Remove all special treatment of unification variables that arise
from wildcards; so the TauTv of TcType.MetaInfo loses its Bool
argument.
A ton of konck on changes. The result is significantly simpler, I think.
Diffstat (limited to 'testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr | 100 |
1 files changed, 53 insertions, 47 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr index b259e32757..3037db7666 100644 --- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr +++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr @@ -1,47 +1,53 @@ -TYPE SIGNATURES - bar :: forall w_ w_1. w_ -> (w_ -> w_1) -> w_1 - foo :: forall w_a. (Show w_a, Enum w_a) => w_a -> String -TYPE CONSTRUCTORS -COERCION AXIOMS -Dependent modules: [] -Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0, - integer-gmp-1.0.0.0] - -WarningWildcardInstantiations.hs:5:14: warning: - Found type wildcard ‘_a’ standing for ‘w_a’ - Where: ‘w_a’ is a rigid type variable bound by - the inferred type of foo :: (Enum w_a, Show w_a) => w_a -> String - at WarningWildcardInstantiations.hs:6:1 - In the type signature for ‘foo’: (Show _a, _) => _a -> _ - -WarningWildcardInstantiations.hs:5:18: warning: - Found hole ‘_’ with inferred constraints: Enum w_a - In the type signature for ‘foo’: (Show _a, _) => _a -> _ - -WarningWildcardInstantiations.hs:5:30: warning: - Found type wildcard ‘_’ standing for ‘String’ - In the type signature for ‘foo’: (Show _a, _) => _a -> _ - -WarningWildcardInstantiations.hs:8:8: warning: - Found type wildcard ‘_’ standing for ‘w_’ - Where: ‘w_’ is a rigid type variable bound by - the inferred type of bar :: w_ -> (w_ -> w_1) -> w_1 - at WarningWildcardInstantiations.hs:9:1 - In the type signature for ‘bar’: _ -> _ -> _ - -WarningWildcardInstantiations.hs:8:13: warning: - Found type wildcard ‘_’ standing for ‘w_ -> w_1’ - Where: ‘w_’ is a rigid type variable bound by - the inferred type of bar :: w_ -> (w_ -> w_1) -> w_1 - at WarningWildcardInstantiations.hs:9:1 - ‘w_1’ is a rigid type variable bound by - the inferred type of bar :: w_ -> (w_ -> w_1) -> w_1 - at WarningWildcardInstantiations.hs:9:1 - In the type signature for ‘bar’: _ -> _ -> _ - -WarningWildcardInstantiations.hs:8:18: warning: - Found type wildcard ‘_’ standing for ‘w_1’ - Where: ‘w_1’ is a rigid type variable bound by - the inferred type of bar :: w_ -> (w_ -> w_1) -> w_1 - at WarningWildcardInstantiations.hs:9:1 - In the type signature for ‘bar’: _ -> _ -> _ +TYPE SIGNATURES
+ bar :: forall t t1. t -> (t -> t1) -> t1
+ foo :: forall a. (Show a, Enum a) => a -> String
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.8.2.0, ghc-prim-0.4.0.0,
+ integer-gmp-1.0.0.0]
+
+WarningWildcardInstantiations.hs:5:14: warning:
+ Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum a, Show a) => a -> String
+ at WarningWildcardInstantiations.hs:6:1
+ In the type signature for:
+ foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:18: warning:
+ Found hole ‘_’ with inferred constraints: Enum a
+ In the type signature for:
+ foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:30: warning:
+ Found type wildcard ‘_’ standing for ‘String’
+ In the type signature for:
+ foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:8:8: warning:
+ Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ In the type signature for:
+ bar :: _ -> _ -> _
+
+WarningWildcardInstantiations.hs:8:13: warning:
+ Found type wildcard ‘_’ standing for ‘t -> t1’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ In the type signature for:
+ bar :: _ -> _ -> _
+
+WarningWildcardInstantiations.hs:8:18: warning:
+ Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ In the type signature for:
+ bar :: _ -> _ -> _
|