Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,320
Issues
4,320
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
360
Merge Requests
360
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
7c122851
Commit
7c122851
authored
Jan 16, 2020
by
Simon Peyton Jones
Committed by
Ben Gamari
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments only
parent
5541b87c
Pipeline
#15546
failed with stages
in 800 minutes and 40 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
compiler/types/TyCoFVs.hs
compiler/types/TyCoFVs.hs
+28
-0
No files found.
compiler/types/TyCoFVs.hs
View file @
7c122851
...
...
@@ -67,6 +67,31 @@ import Panic
%************************************************************************
-}
{- Note [Shallow and deep free variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Definitions
* Shallow free variables of a type: the variables
affected by substitution. Specifically, the (TyVarTy tv)
and (CoVar cv) that appear
- In the type and coercions appearing in the type
- In shallow free variables of the kind of a Forall binder
but NOT in the kind of the /occurrences/ of a type variable.
* Deep free variables of a type: shallow free variables, plus
the deep free variables of the kinds of those variables.
That is, deepFVs( t ) = closeOverKinds( shallowFVs( t ) )
Examples:
Type Shallow Deep
---------------------------------
(a : (k:Type)) {a} {a,k}
forall (a:(k:Type)). a {k} {k}
(a:k->Type) (b:k) {a,b} {a,b,k}
-}
{- Note [Free variables of types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The family of functions tyCoVarsOfType, tyCoVarsOfTypes etc, returns
...
...
@@ -247,6 +272,7 @@ noView _ = Nothing
{- *********************************************************************
* *
Deep free variables
See Note [Shallow and deep free variables]
* *
********************************************************************* -}
...
...
@@ -293,9 +319,11 @@ deepTcvFolder = TyCoFolder { tcf_view = noView
{- *********************************************************************
* *
Shallow free variables
See Note [Shallow and deep free variables]
* *
********************************************************************* -}
shallowTyCoVarsOfType
::
Type
->
TyCoVarSet
-- See Note [Free variables of types]
shallowTyCoVarsOfType
ty
=
runTyCoVars
(
shallow_ty
ty
)
...
...
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