{-# LANGUAGE TypeFamilies #-}
{- |
LLVM counterpart to 'Either' datatype.
-}
module LLVM.Extra.Either (
   Either.T(..),
   Either.run,
   Either.getIsLeft,
   Either.mapLeft,
   Either.mapRight,
   left,
   right,
   ) where

import qualified LLVM.Extra.EitherPrivate as Either
import qualified LLVM.Extra.Tuple as Tuple


left :: (Tuple.Undefined b) => a -> Either.T a b
left :: forall b a. Undefined b => a -> T a b
left = b -> a -> T a b
forall b a. b -> a -> T a b
Either.left b
forall a. Undefined a => a
Tuple.undef

right :: (Tuple.Undefined a) => b -> Either.T a b
right :: forall a b. Undefined a => b -> T a b
right = a -> b -> T a b
forall a b. a -> b -> T a b
Either.right a
forall a. Undefined a => a
Tuple.undef