diff options
author | simonpj@microsoft.com <unknown> | 2010-09-13 09:50:48 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-09-13 09:50:48 +0000 |
commit | d2ce0f52d42edf32bb9f13796e6ba6edba8bd516 (patch) | |
tree | 1a0792f7eb186fa3d71a02f4a21da3daae3466bb /compiler/stranal/DmdAnal.lhs | |
parent | 0084ab49ab3c0123c4b7f9523d092af45bccfd41 (diff) | |
download | haskell-d2ce0f52d42edf32bb9f13796e6ba6edba8bd516.tar.gz |
Super-monster patch implementing the new typechecker -- at last
This major patch implements the new OutsideIn constraint solving
algorithm in the typecheker, following our JFP paper "Modular type
inference with local assumptions".
Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
Diffstat (limited to 'compiler/stranal/DmdAnal.lhs')
-rw-r--r-- | compiler/stranal/DmdAnal.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs index 2a160cde39..32986e56fb 100644 --- a/compiler/stranal/DmdAnal.lhs +++ b/compiler/stranal/DmdAnal.lhs @@ -186,7 +186,7 @@ dmdAnal sigs dmd (App fun arg) -- Non-type arguments (res_ty `bothType` arg_ty, App fun' arg') dmdAnal sigs dmd (Lam var body) - | isTyVar var + | isTyCoVar var = let (body_ty, body') = dmdAnal sigs dmd body in @@ -765,7 +765,7 @@ annotateBndr :: DmdType -> Var -> (DmdType, Var) -- The returned var is annotated with demand info -- No effect on the argument demands annotateBndr dmd_ty@(DmdType fv ds res) var - | isTyVar var = (dmd_ty, var) + | isTyCoVar var = (dmd_ty, var) | otherwise = (DmdType fv' ds res, setIdDemandInfo var dmd) where (fv', dmd) = removeFV fv var res |