Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purescript/purescript-either
Values with two possibilities
https://github.com/purescript/purescript-either
Last synced: 3 months ago
JSON representation
Values with two possibilities
- Host: GitHub
- URL: https://github.com/purescript/purescript-either
- Owner: purescript
- License: bsd-3-clause
- Created: 2014-03-18T19:54:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-09-17T14:13:51.000Z (about 2 years ago)
- Last Synced: 2024-03-26T09:18:37.752Z (8 months ago)
- Language: PureScript
- Homepage:
- Size: 116 KB
- Stars: 26
- Watchers: 9
- Forks: 29
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-purescript - either - Commonly used for error handling. (Essential libraries)
README
# purescript-either
[![Latest release](http://img.shields.io/github/release/purescript/purescript-either.svg)](https://github.com/purescript/purescript-either/releases)
[![Build status](https://github.com/purescript/purescript-either/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-either/actions?query=workflow%3ACI+branch%3Amaster)
[![Pursuit](https://pursuit.purescript.org/packages/purescript-either/badge)](https://pursuit.purescript.org/packages/purescript-either)The `Either` type provides is used to represent values that can be one of two possibilities. For example, `Either Int Number` can be used in a place where either integers or floating point numbers are acceptable.
A common use for this type is error handling, where by convention the `Left` constructor carries error messages and the `Right` constructor carries expected values (“`Right` is right”). This convention is used as the `Functor`, `Applicative`, `Monad`, etc. instances all operate on the `Right` part of the `Either`.
## Installation
```
spago install either
```## Documentation
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-either).