Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
3d4c49bb
Commit
3d4c49bb
authored
May 12, 2004
by
simonpj
Browse files
[project @ 2004-05-12 13:01:30 by simonpj]
Tidy-up only; behaviour unchanged
parent
825fba2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/typecheck/TcSimplify.lhs
View file @
3d4c49bb
...
...
@@ -1054,7 +1054,7 @@ because the scsel will mess up matching. Instead we want
forall dIntegralInt, dNumInt.
fromIntegral Int Int dIntegralInt dNumInt = id Int
Hence "
DontReduce No
SCs"
Hence "
Without
SCs"
\begin{code}
tcSimplifyToDicts :: [Inst] -> TcM (TcDictBinds)
...
...
@@ -1070,7 +1070,7 @@ tcSimplifyToDicts wanteds
doc = text "tcSimplifyToDicts"
-- Reduce methods and lits only; stop as soon as we get a dictionary
try_me inst | isDict inst =
DontReduce No
SCs -- See notes above
for why No
SCs
try_me inst | isDict inst =
KeepDictWithout
SCs -- See notes above
re "Without
SCs
"
| otherwise = ReduceMe
\end{code}
...
...
@@ -1214,7 +1214,8 @@ data WhatToDo
-- produce an error message of any kind.
-- It might be quite legitimate such as (Eq a)!
| DontReduce WantSCs -- Return as irreducible
| KeepDictWithoutSCs -- Return as irreducible; don't add its superclasses
-- Rather specialised: see notes with tcSimplifyToDicts
| DontReduceUnlessConstant -- Return as irreducible unless it can
-- be reduced to a constant in one step
...
...
@@ -1617,7 +1618,7 @@ reduce stack try_me wanted avails
| otherwise
= case try_me wanted of {
DontReduce want_sc
s -> addIrred
want_sc
s avails wanted
KeepDictWithoutSC
s -> addIrred
NoSC
s avails wanted
; DontReduceUnlessConstant -> -- It's irreducible (or at least should not be reduced)
-- First, see if the inst can be reduced to a constant in one step
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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