{-# LANGUAGE CPP #-}
module Data.X509.Internal
    ( module Data.ASN1.Parse
    , asn1Container
    , OID
    
    , ErrT
    , runErrT
    ) where
import Data.ASN1.Types
import Data.ASN1.Parse
#if MIN_VERSION_mtl(2,2,1)
import Control.Monad.Except
runErrT :: ExceptT e m a -> m (Either e a)
runErrT = runExceptT
type ErrT = ExceptT
#else
import Control.Monad.Error
runErrT :: ErrorT e m a -> m (Either e a)
runErrT = runErrorT
type ErrT = ErrorT
#endif
asn1Container :: ASN1ConstructionType -> [ASN1] -> [ASN1]
asn1Container ty l = [Start ty] ++ l ++ [End ty]