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
355
Merge Requests
355
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
29b46327
Commit
29b46327
authored
Jan 06, 2016
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline solveTopConstraints
It was only called in one place; easier to inline it
parent
4dda4edb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSimplify.hs
+1
-9
compiler/typecheck/TcSplice.hs
compiler/typecheck/TcSplice.hs
+2
-1
No files found.
compiler/typecheck/TcSimplify.hs
View file @
29b46327
{-# LANGUAGE CPP #-}
module
TcSimplify
(
simplifyInfer
,
solveTopConstraints
,
simplifyInfer
,
growThetaTyVars
,
simplifyAmbiguityCheck
,
simplifyDefault
,
...
...
@@ -187,14 +187,6 @@ defaultCallStacks wanteds
=
return
(
Just
ct
)
-- | Type-check a thing, returning the result and any EvBinds produced
-- during solving. Emits errors -- but does not fail -- if there is trouble.
solveTopConstraints
::
TcM
a
->
TcM
(
a
,
Bag
EvBind
)
solveTopConstraints
thing_inside
=
do
{
(
result
,
wanted
)
<-
captureConstraints
thing_inside
;
ev_binds
<-
simplifyTop
wanted
;
return
(
result
,
ev_binds
)
}
{-
Note [When to do type-class defaulting]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
compiler/typecheck/TcSplice.hs
View file @
29b46327
...
...
@@ -528,7 +528,8 @@ tcTopSpliceExpr isTypedSplice tc_action
-- is expected (Trac #7276)
setStage
(
Splice
isTypedSplice
)
$
do
{
-- Typecheck the expression
(
expr'
,
const_binds
)
<-
solveTopConstraints
tc_action
(
expr'
,
wanted
)
<-
captureConstraints
tc_action
;
const_binds
<-
simplifyTop
wanted
-- Zonk it and tie the knot of dictionary bindings
;
zonkTopLExpr
(
mkHsDictLet
(
EvBinds
const_binds
)
expr'
)
}
...
...
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