... |
... |
@@ -96,7 +96,7 @@ Some notes relative to the paper |
96
|
96
|
variables. We keep track of which variables are instantiation variables
|
97
|
97
|
by giving them a TcLevel of QLInstVar, which is like "infinity".
|
98
|
98
|
|
99
|
|
- See Note [QuickLook instantation varaibles] in GHC.Tc.Types.TcType.
|
|
99
|
+ See Note [QuickLook instantiation variables] in GHC.Tc.Types.TcType.
|
100
|
100
|
|
101
|
101
|
(QL2) When we learn what an instantiation variable must be, we simply unify
|
102
|
102
|
it with that type; this is done in qlUnify, which is the function mgu_ql(t1,t2)
|
... |
... |
@@ -114,7 +114,7 @@ Some notes relative to the paper |
114
|
114
|
Note [Instantiation variables are short lived]
|
115
|
115
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
116
|
116
|
* An instantation variable is a mutable meta-type-variable, whose level number
|
117
|
|
- is QLInstVar. See Note [QuickLook instantation varaibles] in GHC.Tc.Utils.TcType.
|
|
117
|
+ is QLInstVar. See Note [QuickLook instantiation variables] in GHC.Tc.Utils.TcType.
|
118
|
118
|
|
119
|
119
|
* Ordinary unification variables always stand for monotypes; only instantiation
|
120
|
120
|
variables can be unified with a polytype (by `qlUnify`).
|
... |
... |
@@ -909,7 +909,7 @@ addArgCtxt ctxt (L arg_loc arg) thing_inside |
909
|
909
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
910
|
910
|
During QuickLook, when we instantiate a function's type (specifically, in
|
911
|
911
|
`tcInstFun`), we must instantiate it with so-called "instantiation variables".
|
912
|
|
-See Note [QuickLook instantation variables] in GHC.Tc.Utils.TcType.
|
|
912
|
+See Note [QuickLook instantiation variables] in GHC.Tc.Utils.TcType.
|
913
|
913
|
|
914
|
914
|
So `tcInstFun` uses a family of specialised functions, defined below, like
|
915
|
915
|
instantiateSigmaQL
|