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,321
Issues
4,321
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
387
Merge Requests
387
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
5231445e
Commit
5231445e
authored
Oct 08, 2010
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Trac
#4360
: omitted case in combineCtLoc
parent
debb7b80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
compiler/typecheck/TcInteract.lhs
compiler/typecheck/TcInteract.lhs
+1
-8
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcSMonad.lhs
+8
-7
No files found.
compiler/typecheck/TcInteract.lhs
View file @
5231445e
...
...
@@ -999,14 +999,7 @@ doInteractWithInert
-- Fall-through case for all other situations
doInteractWithInert _ workItem = noInteraction workItem
--------------------------------------------
combineCtLoc :: CtFlavor -> CtFlavor -> WantedLoc
-- Precondition: At least one of them should be wanted
combineCtLoc (Wanted loc) _ = loc
combineCtLoc _ (Wanted loc) = loc
combineCtLoc _ _ = panic "Expected one of wanted constraints (BUG)"
-------------------------
-- Equational Rewriting
rewriteDict :: (CoVar, TcTyVar, Xi) -> (DictId, CtFlavor, Class, [Xi]) -> TcS CanonicalCt
rewriteDict (cv,tv,xi) (dv,gw,cl,xis)
...
...
compiler/typecheck/TcSMonad.lhs
View file @
5231445e
...
...
@@ -10,7 +10,7 @@ module TcSMonad (
makeGivens, makeSolved,
CtFlavor (..), isWanted, isGiven, isDerived, canRewrite,
joinFlavors
, mkGivenFlavor,
combineCtLoc
, mkGivenFlavor,
TcS, runTcS, failTcS, panicTcS, traceTcS, traceTcS0, -- Basic functionality
tryTcS, nestImplicTcS, wrapErrTcS, wrapWarnTcS,
...
...
@@ -298,12 +298,13 @@ canRewrite (Derived {}) (Derived {}) = True
canRewrite (Wanted {}) (Wanted {}) = True
canRewrite _ _ = False
joinFlavors :: CtFlavor -> CtFlavor -> CtFlavor
joinFlavors (Wanted loc) _ = Wanted loc
joinFlavors _ (Wanted loc) = Wanted loc
joinFlavors (Derived loc) _ = Derived loc
joinFlavors _ (Derived loc) = Derived loc
joinFlavors (Given loc) _ = Given loc
combineCtLoc :: CtFlavor -> CtFlavor -> WantedLoc
-- Precondition: At least one of them should be wanted
combineCtLoc (Wanted loc) _ = loc
combineCtLoc _ (Wanted loc) = loc
combineCtLoc (Derived loc) _ = loc
combineCtLoc _ (Derived loc) = loc
combineCtLoc _ _ = panic "combineCtLoc: both given"
mkGivenFlavor :: CtFlavor -> SkolemInfo -> CtFlavor
mkGivenFlavor (Wanted loc) sk = Given (setCtLocOrigin loc sk)
...
...
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