Haskell

Guides for Haskell code. Use when writing Haskell code. Use when this capability is needed.

tomevault-io Updated

File contents

  • Avoid defining functions by cases on their last argument, use LambdaCase
  • Avoid list indexing (!!)
  • Avoid partial functions (head, undefined) except in tests
  • Instead of nesting Either, Maybe, and tuples, make a new data type
  • LambdaCase now supports \cases for multiple arguments
  • Never return tuples of arity higher than 2, just make a new data type
  • Never use unsafeCoerce or unsafePerformIO
  • Only use Either for error handling, otherwise make a new data type
  • Use Data.Text.IO for I/O

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/langston-barrett--dots--haskell commit f7b4ebfcc8

Frequently asked questions

npx skillmds@latest add tomevault-io/haskell