Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
4e9dc3d7
Commit
4e9dc3d7
authored
Sep 18, 2006
by
simonpj@microsoft.com
Browse files
Comments only
parent
f9f4a028
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcUnify.lhs
View file @
4e9dc3d7
...
...
@@ -339,7 +339,7 @@ withBox kind thing_inside
\begin{code}
preSubType :: [TcTyVar] -- Quantified type variables
-> TcTyVarSet -- Subset of quantified type variables
--
that can be instantiated with boxy types
--
see Note [Pre-sub boxy]
-> TcType -- The rho-type part; quantified tyvars scopes over this
-> BoxySigmaType -- Matching type from the context
-> TcM [TcType] -- Types to instantiate the tyvars
...
...
@@ -348,13 +348,17 @@ preSubType :: [TcTyVar] -- Quantified type variables
-- info from the pre-subsumption, if there is any
-- a boxy type variable otherwise
--
-- The 'btvs' are a subset of 'qtvs'. They are the ones we can
-- instantiate to a boxy type variable, because they'll definitely be
-- filled in later. This isn't always the case; sometimes we have type
-- variables mentioned in the context of the type, but not the body;
-- f :: forall a b. C a b => a -> a
-- Then we may land up with an unconstrained 'b', so we want to
-- instantiate it to a monotype (non-boxy) type variable
-- Note [Pre-sub boxy]
-- The 'btvs' are a subset of 'qtvs'. They are the ones we can
-- instantiate to a boxy type variable, because they'll definitely be
-- filled in later. This isn't always the case; sometimes we have type
-- variables mentioned in the context of the type, but not the body;
-- f :: forall a b. C a b => a -> a
-- Then we may land up with an unconstrained 'b', so we want to
-- instantiate it to a monotype (non-boxy) type variable
--
-- The 'qtvs' that are *neither* fixed by the pre-subsumption, *nor* are in 'btvs',
-- are instantiated to TauTv meta variables.
preSubType qtvs btvs qty expected_ty
= do { tys <- mapM inst_tv qtvs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment