#1333: core lint failures from arrow notation + HPC
-------------------------+--------------------------------------------------
    Reporter:  igloo     |        Owner:                                     
        Type:  bug       |       Status:  new                                
    Priority:  normal    |    Milestone:  6.8                                
   Component:  Compiler  |      Version:  6.7                                
    Severity:  normal    |   Resolution:                                     
    Keywords:            |   Difficulty:  Unknown                            
          Os:  Unknown   |     Testcase:  arrowrun001 arrowrun002 arrowrun003
Architecture:  Unknown   |  
-------------------------+--------------------------------------------------
Comment (by ross):

 This input expression
 {{{
 proc env -> do
         ~(Bl b) <- eval e1 -< env
         if b    then eval e2 -< env
                 else eval e3 -< env
 }}}
 is turned into this prior to desugaring:
 {{{
 proc
   ((env{v auF} [lid] :: [(Id{tc rsH}, Val{tc rsD} a{tv awm} [sk])]))
   ->
   do ~(Bl{d rsF} ((b{v auH} [lid] :: Bool{(w) tc 3c}))) <-
         tick<34>(e1{v auB}
                  [lid]tick<33>(e1{v auB} [lid]eval{v aAK} [lid] e1{v auB}
 [lid]) -<
                  env{v auF} [lid])
        tick<38>(b{v auH} [lid] e2{v auC} [lid] e3{v auD} [lid]
         if tick<35>(b{v auH} [lid]) then
                 tick<36>(e2{v auC} [lid]eval{v aAO} [lid] e2{v auC} [lid])
 -<
                         env{v auF} [lid]
             else
                 tick<37>(e3{v auD} [lid]eval{v aAR} [lid] e3{v auD} [lid])
 -<
                         env{v auF} [lid])
 }}}
 This not legal in arrow notation, for which the bindings of a pattern in
 `do` notation are not in scope for the whole of subsequent statements,
 just the expressions to the right of {{{-<}}}.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1333>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to