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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Alex D
GHC
Commits
8f66bac9
Commit
8f66bac9
authored
Mar 29, 2016
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments only
parent
24d76153
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
compiler/basicTypes/DataCon.hs
compiler/basicTypes/DataCon.hs
+7
-9
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSimplify.hs
+1
-1
No files found.
compiler/basicTypes/DataCon.hs
View file @
8f66bac9
...
...
@@ -291,10 +291,9 @@ data DataCon
-- dcRepTyCon = T
-- In general, the dcUnivTyVars are NOT NECESSARILY THE SAME AS THE TYVARS
-- FOR THE PARENT TyCon. With GADTs the data con might not even have
-- the same number of type variables!
-- [This is a change (Oct05): previously, vanilla datacons guaranteed to
-- have the same type variables as their parent TyCon, but that seems ugly.]
-- FOR THE PARENT TyCon. (This is a change (Oct05): previously, vanilla
-- datacons guaranteed to have the same type variables as their parent TyCon,
-- but that seems ugly.)
dcVanilla
::
Bool
,
-- True <=> This is a vanilla Haskell 98 data constructor
-- Its type is of form
...
...
@@ -307,12 +306,11 @@ data DataCon
-- The declaration format is held in the TyCon (algTcGadtSyntax)
-- Universally-quantified type vars [a,b,c]
-- INVARIANT: length matches arity of the dcRepTyCon
-- INVARIANT: result type of data con worker is exactly (T a b c)
dcUnivTyVars
::
[
TyVar
],
-- Two linked fields
dcUnivTyBinders
::
[
TyBinder
],
-- see Note [TyBinders in DataCons]
-- INVARIANT: length matches arity of the dcRepTyCon
--
-- INFARIANT: result type of (rep) data con is exactly (T a b c)
-- Existentially-quantified type vars [x,y]
dcExTyVars
::
[
TyVar
],
-- Two linked fields
...
...
@@ -441,8 +439,8 @@ Specifically:
the corresponding tyvar in the TyVars list.
* Each Visibilty flag (va, vb, etc) is Invisible or Specified.
None are Visible. (
See Note [No Visible TyBinder in terms];
a DataCon is a term-level function
.)
None are Visible. (
A DataCon is a term-level function; see
Note [No Visible TyBinder in terms] in TyCoRep
.)
Why store these fields redundantly? Purely convenience. In most
places in GHC, it's just the TyVars that are needed, so that's what's
...
...
compiler/typecheck/TcSimplify.hs
View file @
8f66bac9
...
...
@@ -768,7 +768,7 @@ decideQuantification apply_mr sigs name_taus constraints
-- to *. So, don't grow the kvs.
;
constraints
<-
TcM
.
zonkTcTypes
constraints
-- quantiyTyVars turned some meta tyvars into
-- quanti
f
yTyVars turned some meta tyvars into
-- quantified skolems, so we have to zonk again
;
let
theta
=
pickQuantifiablePreds
(
mkVarSet
qtvs
)
constraints
...
...
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