[GHC] #14541: Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o

GHC ghc-devs at haskell.org
Mon Jan 15 22:28:50 UTC 2018


#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


More information about the ghc-tickets mailing list