I see Haskell multi-line comments that sometimes start with {- |
instead of just {-
.
Does leading with the pipe character inside the comment mean something by convention?
The |
at the start of a comment is Haddock syntax that begins a documentation annotation. An example from the Haddock documentation is:
-- |The 'square' function squares an integer.
square :: Int -> Int
square x = x * x
It also goes on to say
The “-- |” syntax begins a documentation annotation, which applies to the following declaration in the source file. Note that the annotation is just a comment in Haskell — it will be ignored by the Haskell compiler.