Which Haskell (GHC) extensions should users use/avoid? [closed]

An ad hoc list of morally “good” extensions, and morally “bad” ones – this is an aesthetic judgement!

The Good

  • GADTs
  • Parallel list comprehensions
  • Pattern guards
  • Monad comprehensions
  • Tuple sections
  • Record wild cards
  • Empty data decls
  • Existential types
  • Generalized new type deriving
  • MPTCs + FDs
  • Type families
  • Explicit quantification
  • Higher rank polymorphism
  • Lexically scoped tyvars
  • Bang Patterns

The Bad

  • SQL comprehensions
  • Implicit parameters

The Ugly (but necessary)

  • Template Haskell
  • Unboxed types and tuples
  • Undecidable, overlapping and incoherent instances — usually means you have a misdesign.

Not sure

  • Arrow notation
  • View patterns

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)