hnix-store-core-0.8.0.0: Core types used for interacting with the Nix store.
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Nix.Base

Synopsis

Documentation

data BaseEncoding Source #

Constructors to indicate the base encodings

Constructors

NixBase32 
Base16

^ Nix has a special map of Base32 encoding Placed first, since it determines Haskell optimizations of pattern matches, & NixBase seems be the most widely used in Nix.

Base64 

Instances

Instances details
Bounded BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

Enum BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

Generic BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

Associated Types

type Rep BaseEncoding :: Type -> Type #

Show BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

Eq BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

Ord BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

type Rep BaseEncoding Source # 
Instance details

Defined in System.Nix.Base

type Rep BaseEncoding = D1 ('MetaData "BaseEncoding" "System.Nix.Base" "hnix-store-core-0.8.0.0-2YQUX8JlMxk93e1fw1Y66G" 'False) (C1 ('MetaCons "NixBase32" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Base16" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Base64" 'PrefixI 'False) (U1 :: Type -> Type)))

encodeWith :: BaseEncoding -> ByteString -> Text Source #

Encode ByteString with Base encoding, produce Text.

decodeWith :: BaseEncoding -> Text -> Either String ByteString Source #

Take the input & Base encoding witness -> decode into Text.