diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-05-27 15:26:46 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-06-15 14:41:49 +0100 |
commit | 77bb09270c70455bbd547470c4e995707d19f37d (patch) | |
tree | 3dbd57122d9931d2766fa32df0a4a29731f02d2a /compiler/codeGen | |
parent | e33ca0e54f3c20a8b233a3f7b38e4968a4955300 (diff) | |
download | haskell-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/codeGen')
-rw-r--r-- | compiler/codeGen/StgCmmClosure.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index ca6b404084..c612366904 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -970,15 +970,15 @@ getTyDescription ty TyVarTy _ -> "*" AppTy fun _ -> getTyDescription fun TyConApp tycon _ -> getOccString tycon - ForAllTy (Anon _) res -> '-' : '>' : fun_result res - ForAllTy (Named {}) ty -> getTyDescription ty + FunTy _ res -> '-' : '>' : fun_result res + ForAllTy _ ty -> getTyDescription ty LitTy n -> getTyLitDescription n CastTy ty _ -> getTyDescription ty CoercionTy co -> pprPanic "getTyDescription" (ppr co) } where - fun_result (ForAllTy (Anon _) res) = '>' : fun_result res - fun_result other = getTyDescription other + fun_result (FunTy _ res) = '>' : fun_result res + fun_result other = getTyDescription other getTyLitDescription :: TyLit -> String getTyLitDescription l = |