cardano-crypto-1.3.0: Cryptography primitives for cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Internal.Compat

Synopsis

Documentation

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

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