[GHC] #14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- With the tree at: https://github.com/duog/ghc/tree/trac-14536 Which fixes ticket:14536 With build.mk: {{{ BuildFlavour = validate ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif GhcStage2HcOpts += -dcore-lint -dstg-lint -dcmm-lint }}} building with: {{{ make compiler/stage2/build/Hoopl/Blocks.o }}} I get the following Stg lint error (extracts, full dump attached): {{{ <no location info>: warning: [in body of lambda with binders ds_s4dH :: a_a3as -> b_a3at, ds1_s4dI :: MaybeO ex_a3ao a_a3as] In some algebraic case alternative, number of arguments doesn't match constructor: JustO (arity 2) [a1_s4dK] }}} ... {{{ $fFunctorMaybeO_$cfmap :: forall ex a b. (a -> b) -> MaybeO ex a -> MaybeO ex b [GblId, Arity=2, Caf=NoCafRefs, Str=<L,1*C1(U)><S,1*U>, Unf=OtherCon []] = [] \r [ds_s4dH ds1_s4dI] case ds1_s4dI of { JustO a1_s4dK [Occ=Once] -> let { sat_s4dL [Occ=Once] :: b_a3at [LclId] = [ds_s4dH a1_s4dK] \u [] ds_s4dH a1_s4dK; } in JustO [sat_s4dL]; NothingO -> $WNothingO; }; }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by duog): * Attachment "ticket-dump-14541.txt" added. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by duog): It seems that `dataConRepArity` is returning 2 for Just0. Shouldn't one of those be being discarded as an "existential dictionary"? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by duog): * keywords: => stg-lint -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): This is another example of how, after the unarisation pass, we have discarded void argument. (A void argument is one of zero width.) The type of `JustO` is {{{ JustO :: forall ex t. (ex ~# O) => t -> MaybeO ex t }}} So it does take two value arguments, one of zero width. After unarisation these void arguments are gone; so the Lint check will have to account for that. I suppose there could be a flag passed in to STG-Lint to tell it whether or not those void args are there. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: duog Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by duog): * owner: (none) => duog Comment: In retrospect that's quite unsurprising. I'll see about folding a fix into Phab:D4242 since this is really the same problem. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: duog Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by duog: Old description:
With the tree at: https://github.com/duog/ghc/tree/trac-14536 Which fixes ticket:14536 With build.mk: {{{ BuildFlavour = validate
ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif
GhcStage2HcOpts += -dcore-lint -dstg-lint -dcmm-lint }}} building with: {{{ make compiler/stage2/build/Hoopl/Blocks.o }}}
I get the following Stg lint error (extracts, full dump attached): {{{ <no location info>: warning: [in body of lambda with binders ds_s4dH :: a_a3as -> b_a3at, ds1_s4dI :: MaybeO ex_a3ao a_a3as] In some algebraic case alternative, number of arguments doesn't match constructor: JustO (arity 2) [a1_s4dK] }}} ... {{{ $fFunctorMaybeO_$cfmap :: forall ex a b. (a -> b) -> MaybeO ex a -> MaybeO ex b [GblId, Arity=2, Caf=NoCafRefs, Str=<L,1*C1(U)><S,1*U>, Unf=OtherCon []] = [] \r [ds_s4dH ds1_s4dI] case ds1_s4dI of { JustO a1_s4dK [Occ=Once] -> let { sat_s4dL [Occ=Once] :: b_a3at [LclId] = [ds_s4dH a1_s4dK] \u [] ds_s4dH a1_s4dK; } in JustO [sat_s4dL]; NothingO -> $WNothingO; }; }}}
New description: With the tree at: https://github.com/duog/ghc/tree/trac-14536 Which fixes ticket:14536 With build.mk: {{{ BuildFlavour = validate ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif GhcStage2HcOpts += -dcore-lint -dstg-lint -dcmm-lint }}} building with: {{{ make compiler/stage2/build/Hoopl/Block.o }}} I get the following Stg lint error (extracts, full dump attached): {{{ <no location info>: warning: [in body of lambda with binders ds_s4dH :: a_a3as -> b_a3at, ds1_s4dI :: MaybeO ex_a3ao a_a3as] In some algebraic case alternative, number of arguments doesn't match constructor: JustO (arity 2) [a1_s4dK] }}} ... {{{ $fFunctorMaybeO_$cfmap :: forall ex a b. (a -> b) -> MaybeO ex a -> MaybeO ex b [GblId, Arity=2, Caf=NoCafRefs, Str=<L,1*C1(U)><S,1*U>, Unf=OtherCon []] = [] \r [ds_s4dH ds1_s4dI] case ds1_s4dI of { JustO a1_s4dK [Occ=Once] -> let { sat_s4dL [Occ=Once] :: b_a3at [LclId] = [ds_s4dH a1_s4dK] \u [] ds_s4dH a1_s4dK; } in JustO [sat_s4dL]; NothingO -> $WNothingO; }; }}} -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: duog Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: fixed | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * status: new => closed * resolution: => fixed Comment: Fixed via #14787. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o -------------------------------------+------------------------------------- Reporter: duog | Owner: duog Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: fixed | Keywords: stg-lint Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14787 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * related: => #14787 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14541#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC