Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
It’s sometimes called comma-leading style where you move all the special characters to the front of the line and it is exceedingly common in Haskell, possibly due to how Haskell treats significant whitespace. You’ve surely seen list definitions that look like this:
someList =
[ 1
, 2
, 3
]
or a data definition like this:
data Color
= Red
| Green
| Blue
| RGB Int Int Int
deriving (Show, Eq)
or a list of module exports like this:
module Foo
{ bar
, baz
, quux
}
Or in a long function type declaration where the arrows are moved to the start of the line, or a record definition, etc. etc.
It’s sometimes called comma-leading style where you move all the special characters to the front of the line and it is exceedingly common in Haskell, possibly due to how Haskell treats significant whitespace. You’ve surely seen list definitions that look like this:
or a data definition like this:
or a list of module exports like this:
Or in a long function type declaration where the arrows are moved to the start of the line, or a record definition, etc. etc.