Skip to content
Jeremy W. Sherman edited this page Aug 10, 2015 · 9 revisions

Guidelines for writing programs in Idris.

  1. Written not assuming Laziness

Naming Conventions

In general, names should be in camelCase. Different kinds of names use slightly different styles, though:

  • Type and data constructors: TitleCamelCase like Pair and MkPair.
  • Functions: lowerCamelCase like isHexDigit.
    • Exception: Private or special functions may be in snake_case, like maybe_bind, believe_me and assert_total.
  • Effects: UPPER_CASE like STDIO.
  • Metavariables: End in snake_case like ?myAppend_rhs

Layout Guidelines

Case Statements

IfThenElse Statements

Documentation Guidelines

Classes and Instances

Haddock Style Comments

Inline Comments

Clone this wiki locally