@hackage / located-base

Location-aware variants of partial functions

Latest0.1.1.1

About

Metadata

  • Last updated , by EricSeidel
  • License BSD-3-Clause
  • Categories Development
  • Maintained by: eric@seidel.io

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 8.0.2
  2. 7.10.3

Readme

This library provides variants of standard partial functions that include their call-site in the error message when they crash.

For example:

ghci> Data.List.Located.head []
*** Exception: Prelude.head: empty list
Callstack:
  error, called at src/Data/List/Located.hs:19:14 in locat_KhGZ7Rz1bn9DKFeFxhawNB:Data.List.Located
  head, called at <interactive>:6:1 in interactive:Ghci1