{-# 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 LLVM.Extra.Class (Undefined, undefTuple, )


left :: (Undefined b) => a -> Either.T a b
left = Either.left undefTuple

right :: (Undefined a) => b -> Either.T a b
right = Either.right undefTuple