cardano-crypto-1.1.1: Cryptography primitives for cardano
Safe Haskell None
Language Haskell2010

Cardano.Internal.Compat

Synopsis

Documentation

fromRight :: b -> Either a b -> b Source #

Return the contents of a Right -value or a default value otherwise.

Examples

Expand

Basic usage:

>>> fromRight 1 (Right 3)
3
>>> fromRight 1 (Left "foo")
1

Since: base-4.10.0.0