Skip to content

Addition to Manual: elif construction with pipe #990

@martin-d2

Description

@martin-d2

Hi Galois! :-)

Sorry if this is the wrong place for requests for the manual.

I encountered the following code:

state = 
 if foo then bar
  | foo2 then bar2
  | foo3 then bar3
  else bar4

where it wasn't clear that the pipe was an extension of elif or similar. Grepping through the manual didn't produce anything apart from scratching of heads, even though I was certain it was a different usage to || for logical OR, and the 'such that' comprehension notation in e.g. [f x | x <- xs].

Really sorry if it's a common construction or usage, but neither my colleague or I had come across it before: would you be able to add this to the manual? I think very minimal (if any) explanation will be needed.

Thanks!

Martin

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsLaTeX, markdown, literate haskell, or in-REPL documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions