summaryrefslogtreecommitdiff
path: root/compiler/iface/BuildTyCl.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-06-23 16:26:29 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2016-06-25 09:33:56 -0400
commit5fdb854cbad734ed8113ea23485d834156b49df1 (patch)
treea4bf6b4e3cd55f92bdb99571d82b047df4a4ba3a /compiler/iface/BuildTyCl.hs
parenta33b498d5f648a576dac6d219115866f05721196 (diff)
downloadhaskell-5fdb854cbad734ed8113ea23485d834156b49df1.tar.gz
s/Invisible/Inferred/g s/Visible/Required/g
This renames VisibilityFlag from > data VisibilityFlag = Visible | Specified | Invisible to > data ArgFlag = Required | Specified | Inferred The old name was quite confusing, because both Specified and Invisible were invisible! The new names are hopefully clearer.
Diffstat (limited to 'compiler/iface/BuildTyCl.hs')
-rw-r--r--compiler/iface/BuildTyCl.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/iface/BuildTyCl.hs b/compiler/iface/BuildTyCl.hs
index df52b44126..007f458c80 100644
--- a/compiler/iface/BuildTyCl.hs
+++ b/compiler/iface/BuildTyCl.hs
@@ -178,9 +178,9 @@ mkDataConUnivTyVarBinders tc_bndrs
mk_binder (TvBndr tv tc_vis) = mkTyVarBinder vis tv
where
vis = case tc_vis of
- AnonTCB -> Specified
- NamedTCB Visible -> Specified
- NamedTCB vis -> vis
+ AnonTCB -> Specified
+ NamedTCB Required -> Specified
+ NamedTCB vis -> vis
{- Note [Building the TyBinders for a DataCon]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -201,8 +201,8 @@ of the DataCon. Here is an example:
The TyCon has
- tyConTyVars = [ k:*, a:k->*, b:k]
- tyConTyBinders = [ Named (TvBndr (k :: *) Invisible), Anon (k->*), Anon k ]
+ tyConTyVars = [ k:*, a:k->*, b:k]
+ tyConTyBinders = [ Named (TvBndr (k :: *) Inferred), Anon (k->*), Anon k ]
The TyBinders for App line up with App's kind, given above.
@@ -211,7 +211,7 @@ But the DataCon MkApp has the type
That is, its TyBinders should be
- dataConUnivTyVarBinders = [ TvBndr (k:*) Invisible
+ dataConUnivTyVarBinders = [ TvBndr (k:*) Inferred
, TvBndr (a:k->*) Specified
, TvBndr (b:k) Specified ]
@@ -219,12 +219,12 @@ So we want to take the TyCon's TyBinders and the TyCon's TyVars and
merge them, pulling
- variable names from the TyVars
- visibilities from the TyBinders
- - but changing Anon/Visible to Specified
+ - but changing Anon/Required to Specified
-The last part about Visible->Specified comes from this:
+The last part about Required->Specified comes from this:
data T k (a:k) b = MkT (a b)
-Here k is Visible in T's kind, but we don't have Visible binders in
-the TyBinders for a term (see Note [No Visible TyBinder in terms]
+Here k is Required in T's kind, but we don't have Required binders in
+the TyBinders for a term (see Note [No Required TyBinder in terms]
in TyCoRep), so we change it to Specified when making MkT's TyBinders
This merging operation is done by mkDataConUnivTyBinders. In contrast,