Skip to content

Instantly share code, notes, and snippets.

@ClaireNeveu
Last active August 29, 2015 14:07
Show Gist options
  • Save ClaireNeveu/2e8d55b52c344a153d39 to your computer and use it in GitHub Desktop.
Save ClaireNeveu/2e8d55b52c344a153d39 to your computer and use it in GitHub Desktop.
Haskell Style Guide

ADT fields should be strict in the general case. This usually reduces memory usage without impacting CPU usage. There are exceptions.

The standard indentation level is 4; indentation should always be done with spaces.

The following ADT definitions are acceptable.

data Foo 
  = Bar Int Int Int
  | Baz String String String
  | Qux Int String

data Post =
  { headline :: Text
  , title :: Text
  , body :: Text
  }

data Maybe a = Just a | Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment