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,264
Issues
4,264
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
419
Merge Requests
419
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
384c3864
Commit
384c3864
authored
Feb 16, 2012
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of now-outdated zonkTypeCarefully
parent
78e2beb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcBinds.lhs
+2
-2
compiler/typecheck/TcExpr.lhs
compiler/typecheck/TcExpr.lhs
+1
-1
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcPat.lhs
+1
-13
No files found.
compiler/typecheck/TcBinds.lhs
View file @
384c3864
...
...
@@ -371,7 +371,7 @@ tcPolyNoGen tc_sig_fn prag_fn rec_tc bind_list
; return (binds', mono_ids', NotTopLevel) }
where
tc_mono_info (name, _, mono_id)
= do { mono_ty' <- zonkTcType
Carefully
(idType mono_id)
= do { mono_ty' <- zonkTcType (idType mono_id)
-- Zonk, mainly to expose unboxed types to checkStrictBinds
; let mono_id' = setIdType mono_id mono_ty'
; _specs <- tcSpecPrags mono_id' (prag_fn name)
...
...
@@ -471,7 +471,7 @@ mkExport :: PragFun
-- Pre-condition: the qtvs and theta are already zonked
mkExport prag_fn qtvs theta (poly_name, mb_sig, mono_id)
= do { mono_ty <- zonkTcType
Carefully
(idType mono_id)
= do { mono_ty <- zonkTcType (idType mono_id)
; let inferred_poly_ty = mkSigmaTy my_tvs theta mono_ty
my_tvs = filter (`elemVarSet` used_tvs) qtvs
used_tvs = tyVarsOfTypes theta `unionVarSet` tyVarsOfType mono_ty
...
...
compiler/typecheck/TcExpr.lhs
View file @
384c3864
...
...
@@ -892,7 +892,7 @@ tcInferFun fun
-- Zonk the function type carefully, to expose any polymorphism
-- E.g. (( \(x::forall a. a->a). blah ) e)
-- We can see the rank-2 type of the lambda in time to genrealise e
; fun_ty' <- zonkTcType
Carefully
fun_ty
; fun_ty' <- zonkTcType fun_ty
; (wrap, rho) <- deeplyInstantiate AppOrigin fun_ty'
; return (mkLHsWrap wrap fun, rho) }
...
...
compiler/typecheck/TcPat.lhs
View file @
384c3864
...
...
@@ -275,21 +275,9 @@ checkUnboxedTuple :: TcType -> SDoc -> TcM ()
-- (This shows up as a (more obscure) kind error
-- in the 'otherwise' case of tcMonoBinds.)
checkUnboxedTuple ty what
= do { zonked_ty <- zonkTcType
Carefully
ty
= do { zonked_ty <- zonkTcType ty
; checkTc (not (isUnboxedTupleType zonked_ty))
(unboxedTupleErr what zonked_ty) }
-------------------
{- Only needed if we re-add Method constraints
bindInstsOfPatId :: TcId -> TcM a -> TcM (a, TcEvBinds)
bindInstsOfPatId id thing_inside
| not (isOverloadedTy (idType id))
= do { res <- thing_inside; return (res, emptyTcEvBinds) }
| otherwise
= do { (res, lie) <- captureConstraints thing_inside
; binds <- bindLocalMethods lie [id]
; return (res, binds) }
-}
\end{code}
Note [Polymorphism and pattern bindings]
...
...
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