summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-01-30 22:45:16 -0500
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-01-30 22:45:16 -0500
commitb6558d80072257b9bd41fb6099a86e7411c8ba97 (patch)
tree0baddc726f613cb229a3a52f113b603c7091800d /compiler/coreSyn
parente554ac3e19eec3bb738caa74d74609b05b312a7e (diff)
downloadhaskell-wip/t11715.tar.gz
Checkpoint after renamingwip/t11715
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreSyn.hs6
-rw-r--r--compiler/coreSyn/MkCore.hs6
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs
index 2a5752ccb7..00b778a253 100644
--- a/compiler/coreSyn/CoreSyn.hs
+++ b/compiler/coreSyn/CoreSyn.hs
@@ -439,12 +439,12 @@ The levity-polymorphism invariants are these:
* The type of a term-binder must not be levity-polymorphic
* The type of the argument of an App must not be levity-polymorphic.
-A type (t::TYPE v r) is "levity polymorphic" if 'r' has any free variables.
+A type (t::TYPEV v r) is "levity polymorphic" if 'r' has any free variables.
(It's OK from the code generator's point-of-view if v has free variables.)
For example
- \(r::RuntimeRep). \(a::TYPEvis r). \(x::a). e
-is illegal because x's type has kind (TYPEvis r), which has 'r' free.
+ \(r::RuntimeRep). \(a::TYPE r). \(x::a). e
+is illegal because x's type has kind (TYPE r), which has 'r' free.
See Note [Levity polymorphism checking] in DsMonad to see where these
invariants are established for user-written code.
diff --git a/compiler/coreSyn/MkCore.hs b/compiler/coreSyn/MkCore.hs
index 0795f1840d..faf32d9375 100644
--- a/compiler/coreSyn/MkCore.hs
+++ b/compiler/coreSyn/MkCore.hs
@@ -725,7 +725,7 @@ tYPE_ERROR_ID = mkRuntimeErrorId typeErrorName
mkRuntimeErrorId :: Name -> Id
-- Error function
--- with type: forall (r:RuntimeRep) (a:TYPEvis r). Addr# -> a
+-- with type: forall (r:RuntimeRep) (a:TYPE r). Addr# -> a
-- with arity: 1
-- which diverges after being given one argument
-- The Addr# is expected to be the address of
@@ -757,8 +757,8 @@ mkRuntimeErrorId name
{- Note [Error and friends have an "open-tyvar" forall]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'error' and 'undefined' have types
- error :: forall (v :: RuntimeRep) (a :: TYPEvis v). String -> a
- undefined :: forall (v :: RuntimeRep) (a :: TYPEvis v). a
+ error :: forall (v :: RuntimeRep) (a :: TYPE v). String -> a
+ undefined :: forall (v :: RuntimeRep) (a :: TYPE v). a
Notice the levity polymorphism. This ensures that
"error" can be instantiated at unboxed as well as boxed types.
This is OK because it never returns, so the return type is irrelevant.