diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2016-01-13 23:29:17 -0500 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2016-01-27 09:33:26 -0500 |
commit | 00cbbab3362578df44851442408a8b91a2a769fa (patch) | |
tree | c8f79d003510e191adeab0d1b98f20ebde40d914 /testsuite/tests/ado | |
parent | 2899aa580d633103fc551e36c977720b94f5b41c (diff) | |
download | haskell-00cbbab3362578df44851442408a8b91a2a769fa.tar.gz |
Refactor the typechecker to use ExpTypes.
The idea here is described in [wiki:Typechecker]. Briefly,
this refactor keeps solid track of "synthesis" mode vs
"checking" in GHC's bidirectional type-checking algorithm.
When in synthesis mode, the expected type is just an IORef
to write to.
In addition, this patch does a significant reworking of
RebindableSyntax, allowing much more freedom in the types
of the rebindable operators. For example, we can now have
`negate :: Int -> Bool` and
`(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
is in tcSyntaxOp.
This addresses tickets #11397, #11452, and #11458.
Tests:
typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
th/T11452
Diffstat (limited to 'testsuite/tests/ado')
-rw-r--r-- | testsuite/tests/ado/ado004.stderr | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/testsuite/tests/ado/ado004.stderr b/testsuite/tests/ado/ado004.stderr index 6472310ece..6e877617dc 100644 --- a/testsuite/tests/ado/ado004.stderr +++ b/testsuite/tests/ado/ado004.stderr @@ -2,27 +2,27 @@ TYPE SIGNATURES test1 :: forall (f :: * -> *). Applicative f => (Int -> f Int) -> f Int test2 :: - forall (f :: * -> *) b a. - (Applicative f, Num a, Num b) => - (a -> f b) -> f b + forall (f :: * -> *) b t. + (Applicative f, Num t, Num b) => + (t -> f b) -> f b test3 :: - forall (m :: * -> *) a a1 a2. - (Num a2, Monad m) => - (a2 -> m a1) -> (a1 -> a1 -> m a) -> m a + forall (m :: * -> *) a t t1. + (Num t, Monad m) => + (t -> m t1) -> (t1 -> t1 -> m a) -> m a test4 :: - forall (m :: * -> *) a a1 a2. - (Num a2, Monad m) => - (a2 -> m a1) -> (a1 -> a1 -> m a) -> m a + forall (m :: * -> *) a a1 t. + (Num t, Monad m) => + (t -> m a1) -> (a1 -> a1 -> m a) -> m a test5 :: - forall (m :: * -> *) a a1 a2. - (Num a2, Monad m) => - (a2 -> m a1) -> (a1 -> a1 -> m a) -> m a + forall (m :: * -> *) a a1 t. + (Num t, Monad m) => + (t -> m a1) -> (a1 -> a1 -> m a) -> m a test6 :: - forall r (m :: * -> *) a. + forall t (m :: * -> *) a. (Num (m a), Monad m) => - (m a -> m (m a)) -> r -> m a + (m a -> m (m a)) -> t -> m a TYPE CONSTRUCTORS COERCION AXIOMS Dependent modules: [] Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0, - integer-gmp-1.0.0.0] + integer-gmp-1.0.0.1] |