summaryrefslogtreecommitdiff
path: root/compiler/specialise
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-05-27 15:26:46 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-06-15 14:41:49 +0100
commit77bb09270c70455bbd547470c4e995707d19f37d (patch)
tree3dbd57122d9931d2766fa32df0a4a29731f02d2a /compiler/specialise
parente33ca0e54f3c20a8b233a3f7b38e4968a4955300 (diff)
downloadhaskell-77bb09270c70455bbd547470c4e995707d19f37d.tar.gz
Re-add FunTy (big patch)
With TypeInType Richard combined ForAllTy and FunTy, but that was often awkward, and yielded little benefit becuase in practice the two were always treated separately. This patch re-introduces FunTy. Specfically * New type data TyVarBinder = TvBndr TyVar VisibilityFlag This /always/ has a TyVar it. In many places that's just what what we want, so there are /lots/ of TyBinder -> TyVarBinder changes * TyBinder still exists: data TyBinder = Named TyVarBinder | Anon Type * data Type = ForAllTy TyVarBinder Type | FunTy Type Type | .... There are a LOT of knock-on changes, but they are all routine. The Haddock submodule needs to be updated too
Diffstat (limited to 'compiler/specialise')
-rw-r--r--compiler/specialise/SpecConstr.hs2
-rw-r--r--compiler/specialise/Specialise.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index 2b78705755..00c68535f3 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -1643,7 +1643,7 @@ spec_one env fn arg_bndrs body (call_pat@(qvars, pats), rule_number)
-- return ()
-- And build the results
- ; let spec_id = mkLocalIdOrCoVar spec_name (mkPiTypes spec_lam_args body_ty)
+ ; let spec_id = mkLocalIdOrCoVar spec_name (mkLamTypes spec_lam_args body_ty)
-- See Note [Transfer strictness]
`setIdStrictness` spec_str
`setIdArity` count isId spec_lam_args
diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index b69c9140b9..d587eebab9 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -1266,7 +1266,7 @@ specCalls mb_mod env rules_for_me calls_for_me fn rhs
| isUnliftedType body_ty -- C.f. WwLib.mkWorkerArgs
= (poly_tyvars ++ [voidArgId], poly_tyvars ++ [voidPrimId])
| otherwise = (poly_tyvars, poly_tyvars)
- spec_id_ty = mkPiTypes lam_args body_ty
+ spec_id_ty = mkLamTypes lam_args body_ty
; spec_f <- newSpecIdSM fn spec_id_ty
; (spec_rhs, rhs_uds) <- specExpr rhs_env2 (mkLams lam_args body)