| ||||||||||
| ||||||||||
| ||||||||||
| Description | ||||||||||
A library for safe functions, based on standard functions that may crash. This module reexports versions which produce exceptions in an arbitrary MonadFailure monad. | ||||||||||
| Synopsis | ||||||||||
| List Functions | ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
lookupJust key = fromJust . lookup key | ||||||||||
| Maybe functions | ||||||||||
| ||||||||||
| Other Prelude functions | ||||||||||
| ||||||||||
| Useful combinators | ||||||||||
| ||||||||||
def, use it to return a default value in the event of an error. E.g. you can define a version of tail which returns a default value when the list is empty tailDef defaultValue = def defaultValue . tail | ||||||||||
| ||||||||||
| note, use it to fail with an annotated runtime error | ||||||||||
| Assertions | ||||||||||
| ||||||||||
| Assert a value to be true. If true, returns the first value as a succss. Otherwise, returns the second value as a failure. | ||||||||||
| IO functions | ||||||||||
| ||||||||||
| The standard readFile function with any IOExceptions returned as a failure instead of a runtime exception. | ||||||||||
| Exceptions | ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| Produced by Haddock version 2.6.0 |