[GHC] #9025: Core Lint warning with -O (Demand type has 4 arguments ...)

#9025: Core Lint warning with -O (Demand type has 4 arguments ...)
------------------------------------+-------------------------------------
Reporter: conal | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
The attached small program triggers a Core Lint warning when compiled with
`-O`:
{{{
bash-3.2$ ghc LintBomb.hs -fforce-recomp -dcore-lint
[1 of 1] Compiling LintBomb ( LintBomb.hs, LintBomb.o )
bash-3.2$ ghc LintBomb.hs -fforce-recomp -dcore-lint -O
[1 of 1] Compiling LintBomb ( LintBomb.hs, LintBomb.o )
*** Core Lint errors : in result of CorePrep ***
{-# LINE 13 "LintBomb.hs #-}: Warning:
[RHS of LintBomb.$fEncodable(->)_$cencode :: forall a_arW b_arX.
(LintBomb.Encodable
a_arW,
LintBomb.Encodable
b_arX) =>
(a_arW -> b_arX) ->
LintBomb.Enc (a_arW -> b_arX)]
Demand type has 4 arguments, rhs has 3 arguments,
LintBomb.$fEncodable(->)_$cencode
Binder's strictness signature: DmdType
,
Unf=OtherCon [],
RULES: Built in rule for LintBomb.encode: "Class op encode"]
LintBomb.encode =
\ (@ a_arV) (tpl_sOv [Occ=Once!] :: LintBomb.Encodable a_arV) ->
case tpl_sOv
of _ [Occ=Dead]
{ LintBomb.D:Encodable tpl_sOx [Occ=Once] _ [Occ=Dead] ->
tpl_sOx
}
LintBomb.decode [InlPrag=[NEVER]]
:: forall a_arV.
LintBomb.Encodable a_arV =>
LintBomb.Enc a_arV -> a_arV
[GblId[ClassOp],
Arity=1,
Caf=NoCafRefs,
Str=DmdType ,
Unf=OtherCon [],
RULES: Built in rule for LintBomb.decode: "Class op decode"]
LintBomb.decode =
\ (@ a_arV) (tpl_sOz [Occ=Once!] :: LintBomb.Encodable a_arV) ->
case tpl_sOz
of _ [Occ=Dead]
{ LintBomb.D:Encodable _ [Occ=Dead] tpl_sOC [Occ=Once] ->
tpl_sOC
}
LintBomb.$fEncodable(->)_$cdecode
:: forall a_arW b_arX.
(LintBomb.Encodable a_arW, LintBomb.Encodable b_arX) =>
LintBomb.Enc (a_arW -> b_arX) -> a_arW -> b_arX
[GblId,
Arity=4,
Caf=NoCafRefs,
Str=DmdType

#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): Oddly this works for me. I'm not using precisely 7.8, but close. (In parallel I'm trying to check out a 7.8 branch.) Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by goldfire): I can reproduce on 7.8.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Oddly this works for me. I'm not using precisely 7.8, but close. (In
#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by darchon): Replying to [comment:1 simonpj]: parallel I'm trying to check out a 7.8 branch.)
Simon
Perhaps due to 848f595266268f578480ceb4ab1ce4938611c97e ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * status: new => merge Comment: I think drachon is right. Please merge that commit to 7.8. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * milestone: => 7.8.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9025: Core Lint warning with -O (Demand type has 4 arguments ...) -------------------------------------+------------------------------------ Reporter: conal | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9025#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC