Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
39549826
Commit
39549826
authored
Sep 29, 2020
by
Sebastian Graf
Committed by
Marge Bot
Sep 30, 2020
Browse files
Pmc: Don't call exprType on type arguments (#18767)
Fixes #18767.
parent
7c98699f
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/GHC/HsToCore/Pmc/Solver/Types.hs
View file @
39549826
...
...
@@ -62,6 +62,7 @@ import GHC.Builtin.Names
import
GHC.Builtin.Types
import
GHC.Builtin.Types.Prim
import
GHC.Tc.Solver.Monad
(
InertSet
,
emptyInert
)
import
GHC.Tc.Utils.TcType
(
isStringTy
)
import
GHC.Driver.Types
(
ConLikeSet
)
import
Numeric
(
fromRat
)
...
...
@@ -562,7 +563,7 @@ coreExprAsPmLit e = case collectArgs e of
(
Var
x
,
args
)
|
is_rebound_name
x
fromStringName
-- See Note [Detecting overloaded literals with -XRebindableSyntax]
,
s
:
_
<-
filter
(
eqType
s
tringTy
.
exprType
)
args
,
s
:
_
<-
filter
(
isS
tringTy
.
exprType
)
$
filter
isValArg
args
-- NB: Calls coreExprAsPmLit and then overloadPmLit, so that we return PmLitOverStrings
->
coreExprAsPmLit
s
>>=
overloadPmLit
(
exprType
e
)
-- These last two cases handle proper String literals
...
...
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