#8505 closed bug (fixed)

Arrows example error

Reported by: pdfrod Owned by:
Priority: highest Milestone: 7.8.1
Component: Documentation Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Documentation bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

In the section 7.15.2. Conditional commands of the User's Guide
(http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/arrow-notation.html#idp49515792) it is stated that:

proc (x,y) ->
        if f x y
        then g -< x+1
        else h -< y+2

is translated to:

arr (\ (x,y) -> if f x y then Left x else Right y) >>>
        (arr (\x -> x+1) >>> f) ||| (arr (\y -> y+2) >>> g)

But this translation doesn't seem correct, because the arrows g and h are not being used as in the original code (h doesn't appear at all in the translation).

Attachments (1)

0001-Fix-typo-in-User-s-Guide.patch (890 bytes) - added by pdfrod 17 months ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 17 months ago by pdfrod

  • Priority changed from low to normal

Changed 17 months ago by pdfrod

comment:2 Changed 17 months ago by simonpj

  • Milestone set to 7.8.1
  • Priority changed from normal to highest
  • Status changed from new to patch

Thanks! Patch looks correct to me. Austin, please apply.

Simon

comment:3 Changed 17 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from patch to closed

Merged, thanks!

Note: See TracTickets for help on using tickets.