spago-0.21.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Spago.Dhall

Synopsis

Documentation

type DhallExpr a = Expr Src a #

data ReadError a where #

Spago configuration cannot be read

Constructors

ConfigIsNotRecord :: Typeable a => DhallExpr a -> ReadError a

the toplevel value is not a record

PackagesIsNotRecord :: Typeable a => DhallExpr a -> ReadError a

the "packages" key is not a record

DependenciesIsNotList :: Typeable a => DhallExpr a -> ReadError a

the "dependencies" key is not a list

ExprIsNotTextLit :: Typeable a => DhallExpr a -> ReadError a

the expression is not a Text Literal

CannotParsePackageSet :: Typeable a => DhallExpr a -> ReadError a

the packages.dhall could not be parsed

ImportCannotBeUpdated :: Typeable a => Import -> ReadError a

the Import is not pointing to the right repo

RequiredKeyMissing :: Typeable a => Text -> Map Text (DhallExpr a) -> ReadError a

a key is missing from a Dhall map

Instances

Instances details
(Pretty a, Typeable a) => Exception (ReadError a) # 
Instance details

Defined in Spago.Dhall

Pretty a => Show (ReadError a) # 
Instance details

Defined in Spago.Dhall

format :: MonadIO m => Text -> m () #

Format a Dhall file in ASCII We first check if it's already formatted, if not we reformat it.

prettyWithHeader :: Pretty a => Header -> DhallExpr a -> Text #

Prettyprint a Dhall expression adding a comment on top

readImports :: Text -> IO [Import] #

Return a list of all imports starting from a particular file

toTextLit :: Text -> DhallExpr a #

Returns a Dhall Text literal from a lone string

fromTextLit :: Typeable a => DhallExpr a -> Either (ReadError a) Text #

Casts a Dhall Text literal to a string, or fails

requireKey :: (Typeable b, Pretty b, MonadThrow m) => Map Text (DhallExpr b) -> Text -> (DhallExpr b -> m a) -> m a #

Require a key from a Dhall.Map, and run an action on it if found. If not found, return the name of the key.

requireTypedKey :: (MonadIO m, MonadThrow m) => Map Text (DhallExpr Void) -> Text -> Decoder a -> m a #

Same as requireKey, but we give it a Dhall.Decoder to automagically decode from

maybeTypedKey :: (MonadIO m, MonadThrow m) => Map Text (DhallExpr Void) -> Text -> Decoder a -> m (Maybe a) #

Try to find a key from a Dhall.Map, and automagically decode the value with the given Dhall.Type If not found, return Nothing, if type is incorrect throw error

data Natural #

Instances

Instances details
FromJSON Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data Natural 
Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural #

toConstr :: Natural -> Constr #

dataTypeOf :: Natural -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) #

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

Enum Natural 
Instance details

Defined in GHC.Enum

Num Natural 
Instance details

Defined in GHC.Num

Read Natural 
Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS Natural #

readList :: ReadS [Natural] #

readPrec :: ReadPrec Natural #

readListPrec :: ReadPrec [Natural] #

Integral Natural 
Instance details

Defined in GHC.Real

Real Natural 
Instance details

Defined in GHC.Real

Show Natural 
Instance details

Defined in GHC.Show

Subtractive Natural 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Natural #

NFData Natural 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () #

FromDhall Natural 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall Natural 
Instance details

Defined in Dhall.Marshal.Encode

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

Pretty Natural 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Natural -> Doc ann #

prettyList :: [Natural] -> Doc ann #

UniformRange Natural 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Natural, Natural) -> g -> m Natural #

TestCoercion SNat 
Instance details

Defined in GHC.TypeNats

Methods

testCoercion :: forall (a :: k) (b :: k). SNat a -> SNat b -> Maybe (Coercion a b)

TestEquality SNat 
Instance details

Defined in GHC.TypeNats

Methods

testEquality :: forall (a :: k) (b :: k). SNat a -> SNat b -> Maybe (a :~: b)

Lift Natural 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Natural -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Natural -> Code m Natural #

HasPosition i s t a b => HasAny (i :: Nat) s t a b 
Instance details

Defined in Data.Generics.Product.Any

Methods

the :: Lens s t a b #

type Difference Natural 
Instance details

Defined in Basement.Numerical.Subtractive

type Compare (a :: Natural) (b :: Natural) 
Instance details

Defined in Data.Type.Ord

type Compare (a :: Natural) (b :: Natural) = CmpNat a b

data Result (f :: Type -> Type) #

This type is exactly the same as Fix except with a different FromDhall instance. This intermediate type simplifies the implementation of the inner loop for the FromDhall instance for Fix.

Instances

Instances details
FromDhall (f (Result f)) => FromDhall (Result f) 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall (f (Result f)) => ToDhall (Result f) 
Instance details

Defined in Dhall.Marshal.Encode

class Generic a #

Minimal complete definition

from, to

Instances

Instances details
Generic Value 
Instance details

Defined in Data.Aeson.Types.Internal

Associated Types

type Rep Value :: Type -> Type #

Methods

from :: Value -> Rep Value x #

to :: Rep Value x -> Value #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type #

Methods

from :: Fingerprint -> Rep Fingerprint x #

to :: Rep Fingerprint x -> Fingerprint #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type #

Methods

from :: Associativity -> Rep Associativity x #

to :: Rep Associativity x -> Associativity #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Methods

from :: DecidedStrictness -> Rep DecidedStrictness x #

to :: Rep DecidedStrictness x -> DecidedStrictness #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type #

Methods

from :: SourceStrictness -> Rep SourceStrictness x #

to :: Rep SourceStrictness x -> SourceStrictness #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Methods

from :: SourceUnpackedness -> Rep SourceUnpackedness x #

to :: Rep SourceUnpackedness x -> SourceUnpackedness #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic CCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep CCFlags :: Type -> Type #

Methods

from :: CCFlags -> Rep CCFlags x #

to :: Rep CCFlags x -> CCFlags #

Generic ConcFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ConcFlags :: Type -> Type #

Methods

from :: ConcFlags -> Rep ConcFlags x #

to :: Rep ConcFlags x -> ConcFlags #

Generic DebugFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DebugFlags :: Type -> Type #

Methods

from :: DebugFlags -> Rep DebugFlags x #

to :: Rep DebugFlags x -> DebugFlags #

Generic DoCostCentres 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoCostCentres :: Type -> Type #

Methods

from :: DoCostCentres -> Rep DoCostCentres x #

to :: Rep DoCostCentres x -> DoCostCentres #

Generic DoHeapProfile 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoHeapProfile :: Type -> Type #

Methods

from :: DoHeapProfile -> Rep DoHeapProfile x #

to :: Rep DoHeapProfile x -> DoHeapProfile #

Generic DoTrace 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoTrace :: Type -> Type #

Methods

from :: DoTrace -> Rep DoTrace x #

to :: Rep DoTrace x -> DoTrace #

Generic GCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GCFlags :: Type -> Type #

Methods

from :: GCFlags -> Rep GCFlags x #

to :: Rep GCFlags x -> GCFlags #

Generic GiveGCStats 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GiveGCStats :: Type -> Type #

Methods

from :: GiveGCStats -> Rep GiveGCStats x #

to :: Rep GiveGCStats x -> GiveGCStats #

Generic MiscFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep MiscFlags :: Type -> Type #

Methods

from :: MiscFlags -> Rep MiscFlags x #

to :: Rep MiscFlags x -> MiscFlags #

Generic ParFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ParFlags :: Type -> Type #

Methods

from :: ParFlags -> Rep ParFlags x #

to :: Rep ParFlags x -> ParFlags #

Generic ProfFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ProfFlags :: Type -> Type #

Methods

from :: ProfFlags -> Rep ProfFlags x #

to :: Rep ProfFlags x -> ProfFlags #

Generic RTSFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep RTSFlags :: Type -> Type #

Methods

from :: RTSFlags -> Rep RTSFlags x #

to :: Rep RTSFlags x -> RTSFlags #

Generic TickyFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TickyFlags :: Type -> Type #

Methods

from :: TickyFlags -> Rep TickyFlags x #

to :: Rep TickyFlags x -> TickyFlags #

Generic TraceFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TraceFlags :: Type -> Type #

Methods

from :: TraceFlags -> Rep TraceFlags x #

to :: Rep TraceFlags x -> TraceFlags #

Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc :: Type -> Type #

Methods

from :: SrcLoc -> Rep SrcLoc x #

to :: Rep SrcLoc x -> SrcLoc #

Generic GCDetails 
Instance details

Defined in GHC.Stats

Associated Types

type Rep GCDetails :: Type -> Type #

Methods

from :: GCDetails -> Rep GCDetails x #

to :: Rep GCDetails x -> GCDetails #

Generic RTSStats 
Instance details

Defined in GHC.Stats

Associated Types

type Rep RTSStats :: Type -> Type #

Methods

from :: RTSStats -> Rep RTSStats x #

to :: Rep RTSStats x -> RTSStats #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type #

Generic Author 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep Author :: Type -> Type #

Methods

from :: Author -> Rep Author x #

to :: Rep Author x -> Author #

Generic BowerError 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep BowerError :: Type -> Type #

Generic ModuleType 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep ModuleType :: Type -> Type #

Generic PackageMeta 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep PackageMeta :: Type -> Type #

Generic PackageName 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep PackageName :: Type -> Type #

Generic PackageNameError 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep PackageNameError :: Type -> Type #

Generic Repository 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep Repository :: Type -> Type #

Generic Version 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic VersionRange 
Instance details

Defined in Web.Bower.PackageMeta.Internal

Associated Types

type Rep VersionRange :: Type -> Type #

Generic Clock 
Instance details

Defined in System.Clock

Associated Types

type Rep Clock :: Type -> Type #

Methods

from :: Clock -> Rep Clock x #

to :: Rep Clock x -> Clock #

Generic TimeSpec 
Instance details

Defined in System.Clock

Associated Types

type Rep TimeSpec :: Type -> Type #

Methods

from :: TimeSpec -> Rep TimeSpec x #

to :: Rep TimeSpec x -> TimeSpec #

Generic SHA256Digest 
Instance details

Defined in Dhall.Crypto

Associated Types

type Rep SHA256Digest :: Type -> Type #

Generic CharacterSet 
Instance details

Defined in Dhall.Pretty.Internal

Associated Types

type Rep CharacterSet :: Type -> Type #

Generic Src 
Instance details

Defined in Dhall.Src

Associated Types

type Rep Src :: Type -> Type #

Methods

from :: Src -> Rep Src x #

to :: Rep Src x -> Src #

Generic Const 
Instance details

Defined in Dhall.Syntax.Const

Associated Types

type Rep Const :: Type -> Type #

Methods

from :: Const -> Rep Const x #

to :: Rep Const x -> Const #

Generic Directory 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Directory :: Type -> Type #

Generic File 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep File :: Type -> Type #

Methods

from :: File -> Rep File x #

to :: Rep File x -> File #

Generic FilePrefix 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep FilePrefix :: Type -> Type #

Generic Import 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Import :: Type -> Type #

Methods

from :: Import -> Rep Import x #

to :: Rep Import x -> Import #

Generic ImportHashed 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportHashed :: Type -> Type #

Generic ImportMode 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportMode :: Type -> Type #

Generic ImportType 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportType :: Type -> Type #

Generic Scheme 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Scheme :: Type -> Type #

Methods

from :: Scheme -> Rep Scheme x #

to :: Rep Scheme x -> Scheme #

Generic URL 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep URL :: Type -> Type #

Methods

from :: URL -> Rep URL x #

to :: Rep URL x -> URL #

Generic DhallDouble 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep DhallDouble :: Type -> Type #

Generic PreferAnnotation 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep PreferAnnotation :: Type -> Type #

Generic WithComponent 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep WithComponent :: Type -> Type #

Generic Var 
Instance details

Defined in Dhall.Syntax.Var

Associated Types

type Rep Var :: Type -> Type #

Methods

from :: Var -> Rep Var x #

to :: Rep Var x -> Var #

Generic OsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsChar :: Type -> Type #

Methods

from :: OsChar -> Rep OsChar x #

to :: Rep OsChar x -> OsChar #

Generic OsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsString :: Type -> Type #

Methods

from :: OsString -> Rep OsString x #

to :: Rep OsString x -> OsString #

Generic PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixChar :: Type -> Type #

Methods

from :: PosixChar -> Rep PosixChar x #

to :: Rep PosixChar x -> PosixChar #

Generic PosixString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixString :: Type -> Type #

Methods

from :: PosixString -> Rep PosixString x #

to :: Rep PosixString x -> PosixString #

Generic WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsChar :: Type -> Type #

Methods

from :: WindowsChar -> Rep WindowsChar x #

to :: Rep WindowsChar x -> WindowsChar #

Generic WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsString :: Type -> Type #

Methods

from :: WindowsString -> Rep WindowsString x #

to :: Rep WindowsString x -> WindowsString #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Methods

from :: ForeignSrcLang -> Rep ForeignSrcLang x #

to :: Rep ForeignSrcLang x -> ForeignSrcLang #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type #

Methods

from :: Extension -> Rep Extension x #

to :: Rep Extension x -> Extension #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Half 
Instance details

Defined in Numeric.Half.Internal

Associated Types

type Rep Half :: Type -> Type #

Methods

from :: Half -> Rep Half x #

to :: Rep Half x -> Half #

Generic IP 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IP :: Type -> Type #

Methods

from :: IP -> Rep IP x #

to :: Rep IP x -> IP #

Generic IPv4 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IPv4 :: Type -> Type #

Methods

from :: IPv4 -> Rep IPv4 x #

to :: Rep IPv4 x -> IPv4 #

Generic IPv6 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IPv6 :: Type -> Type #

Methods

from :: IPv6 -> Rep IPv6 x #

to :: Rep IPv6 x -> IPv6 #

Generic IPRange 
Instance details

Defined in Data.IP.Range

Associated Types

type Rep IPRange :: Type -> Type #

Methods

from :: IPRange -> Rep IPRange x #

to :: Rep IPRange x -> IPRange #

Generic InvalidPosException 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep InvalidPosException :: Type -> Type #

Generic Pos 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep Pos :: Type -> Type #

Methods

from :: Pos -> Rep Pos x #

to :: Rep Pos x -> Pos #

Generic SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep SourcePos :: Type -> Type #

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI :: Type -> Type #

Methods

from :: URI -> Rep URI x #

to :: Rep URI x -> URI #

Generic URIAuth 
Instance details

Defined in Network.URI

Associated Types

type Rep URIAuth :: Type -> Type #

Methods

from :: URIAuth -> Rep URIAuth x #

to :: Rep URIAuth x -> URIAuth #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type #

Methods

from :: TextDetails -> Rep TextDetails x #

to :: Rep TextDetails x -> TextDetails #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Generic RetryAction 
Instance details

Defined in Control.Retry

Associated Types

type Rep RetryAction :: Type -> Type #

Generic RetryStatus 
Instance details

Defined in Control.Retry

Associated Types

type Rep RetryStatus :: Type -> Type #

Generic PrereleaseTag 
Instance details

Defined in Data.SemVer.Types

Associated Types

type Rep PrereleaseTag :: Type -> Type #

Generic PrereleaseTags 
Instance details

Defined in Data.SemVer.Types

Associated Types

type Rep PrereleaseTags :: Type -> Type #

Generic SemVer 
Instance details

Defined in Data.SemVer.Types

Associated Types

type Rep SemVer :: Type -> Type #

Methods

from :: SemVer -> Rep SemVer x #

to :: Rep SemVer x -> SemVer #

Generic BuildEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep BuildEnv :: Type -> Type #

Methods

from :: BuildEnv -> Rep BuildEnv x #

to :: Rep BuildEnv x -> BuildEnv #

Generic Env # 
Instance details

Defined in Spago.Env

Associated Types

type Rep Env :: Type -> Type #

Methods

from :: Env -> Rep Env x #

to :: Rep Env x -> Env #

Generic InstallEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep InstallEnv :: Type -> Type #

Generic PackageSetEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep PackageSetEnv :: Type -> Type #

Generic PublishEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep PublishEnv :: Type -> Type #

Generic PursEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep PursEnv :: Type -> Type #

Methods

from :: PursEnv -> Rep PursEnv x #

to :: Rep PursEnv x -> PursEnv #

Generic VerifyEnv # 
Instance details

Defined in Spago.Env

Associated Types

type Rep VerifyEnv :: Type -> Type #

Generic CommitHash # 
Instance details

Defined in Spago.GlobalCache

Associated Types

type Rep CommitHash :: Type -> Type #

Generic RepoMetadataV1 # 
Instance details

Defined in Spago.GlobalCache

Associated Types

type Rep RepoMetadataV1 :: Type -> Type #

Generic Tag # 
Instance details

Defined in Spago.GlobalCache

Associated Types

type Rep Tag :: Type -> Type #

Methods

from :: Tag -> Rep Tag x #

to :: Rep Tag x -> Tag #

Generic BackendConfig # 
Instance details

Defined in Spago.NewConfig

Associated Types

type Rep BackendConfig :: Type -> Type #

Generic ExtraPackage # 
Instance details

Defined in Spago.NewConfig

Associated Types

type Rep ExtraPackage :: Type -> Type #

Generic NewPublishConfig # 
Instance details

Defined in Spago.NewConfig

Associated Types

type Rep NewPublishConfig :: Type -> Type #

Generic PackageConfig # 
Instance details

Defined in Spago.NewConfig

Associated Types

type Rep PackageConfig :: Type -> Type #

Generic WorkspaceConfig # 
Instance details

Defined in Spago.NewConfig

Associated Types

type Rep WorkspaceConfig :: Type -> Type #

Generic PscPackage # 
Instance details

Defined in Spago.PscPackage

Associated Types

type Rep PscPackage :: Type -> Type #

Generic Config # 
Instance details

Defined in Spago.Types

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Generic MigrateConfig # 
Instance details

Defined in Spago.Types

Associated Types

type Rep MigrateConfig :: Type -> Type #

Generic ModuleGraphNode # 
Instance details

Defined in Spago.Types

Associated Types

type Rep ModuleGraphNode :: Type -> Type #

Generic Package # 
Instance details

Defined in Spago.Types

Associated Types

type Rep Package :: Type -> Type #

Methods

from :: Package -> Rep Package x #

to :: Rep Package x -> Package #

Generic PackageLocation # 
Instance details

Defined in Spago.Types

Associated Types

type Rep PackageLocation :: Type -> Type #

Generic PackageSet # 
Instance details

Defined in Spago.Types

Associated Types

type Rep PackageSet :: Type -> Type #

Generic PublishConfig # 
Instance details

Defined in Spago.Types

Associated Types

type Rep PublishConfig :: Type -> Type #

Generic PursCmd # 
Instance details

Defined in Spago.Types

Associated Types

type Rep PursCmd :: Type -> Type #

Methods

from :: PursCmd -> Rep PursCmd x #

to :: Rep PursCmd x -> PursCmd #

Generic Repo # 
Instance details

Defined in Spago.Types

Associated Types

type Rep Repo :: Type -> Type #

Methods

from :: Repo -> Rep Repo x #

to :: Rep Repo x -> Repo #

Generic ScriptBuildOptions # 
Instance details

Defined in Spago.Types

Associated Types

type Rep ScriptBuildOptions :: Type -> Type #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type #

Methods

from :: AnnLookup -> Rep AnnLookup x #

to :: Rep AnnLookup x -> AnnLookup #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type #

Methods

from :: AnnTarget -> Rep AnnTarget x #

to :: Rep AnnTarget x -> AnnTarget #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bytes :: Type -> Type #

Methods

from :: Bytes -> Rep Bytes x #

to :: Rep Bytes x -> Bytes #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Methods

from :: DecidedStrictness -> Rep DecidedStrictness x #

to :: Rep DecidedStrictness x -> DecidedStrictness #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type #

Methods

from :: DerivClause -> Rep DerivClause x #

to :: Rep DerivClause x -> DerivClause #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type #

Methods

from :: DerivStrategy -> Rep DerivStrategy x #

to :: Rep DerivStrategy x -> DerivStrategy #

Generic DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DocLoc :: Type -> Type #

Methods

from :: DocLoc -> Rep DocLoc x #

to :: Rep DocLoc x -> DocLoc #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type #

Methods

from :: FamilyResultSig -> Rep FamilyResultSig x #

to :: Rep FamilyResultSig x -> FamilyResultSig #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type #

Methods

from :: FixityDirection -> Rep FixityDirection x #

to :: Rep FixityDirection x -> FixityDirection #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type #

Methods

from :: InjectivityAnn -> Rep InjectivityAnn x #

to :: Rep InjectivityAnn x -> InjectivityAnn #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type #

Methods

from :: ModuleInfo -> Rep ModuleInfo x #

to :: Rep ModuleInfo x -> ModuleInfo #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type #

Methods

from :: NameFlavour -> Rep NameFlavour x #

to :: Rep NameFlavour x -> NameFlavour #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type #

Methods

from :: NameSpace -> Rep NameSpace x #

to :: Rep NameSpace x -> NameSpace #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type #

Methods

from :: PatSynArgs -> Rep PatSynArgs x #

to :: Rep PatSynArgs x -> PatSynArgs #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type #

Methods

from :: PatSynDir -> Rep PatSynDir x #

to :: Rep PatSynDir x -> PatSynDir #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type #

Methods

from :: RuleMatch -> Rep RuleMatch x #

to :: Rep RuleMatch x -> RuleMatch #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type #

Methods

from :: SourceStrictness -> Rep SourceStrictness x #

to :: Rep SourceStrictness x -> SourceStrictness #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Methods

from :: SourceUnpackedness -> Rep SourceUnpackedness x #

to :: Rep SourceUnpackedness x -> SourceUnpackedness #

Generic Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Specificity :: Type -> Type #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type #

Methods

from :: TypeFamilyHead -> Rep TypeFamilyHead x #

to :: Rep TypeFamilyHead x -> TypeFamilyHead #

Generic ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Associated Types

type Rep ConcException :: Type -> Type #

Generic Chunk 
Instance details

Defined in Data.Versions

Associated Types

type Rep Chunk :: Type -> Type #

Methods

from :: Chunk -> Rep Chunk x #

to :: Rep Chunk x -> Chunk #

Generic Chunks 
Instance details

Defined in Data.Versions

Associated Types

type Rep Chunks :: Type -> Type #

Methods

from :: Chunks -> Rep Chunks x #

to :: Rep Chunks x -> Chunks #

Generic MChunk 
Instance details

Defined in Data.Versions

Associated Types

type Rep MChunk :: Type -> Type #

Methods

from :: MChunk -> Rep MChunk x #

to :: Rep MChunk x -> MChunk #

Generic Mess 
Instance details

Defined in Data.Versions

Associated Types

type Rep Mess :: Type -> Type #

Methods

from :: Mess -> Rep Mess x #

to :: Rep Mess x -> Mess #

Generic PVP 
Instance details

Defined in Data.Versions

Associated Types

type Rep PVP :: Type -> Type #

Methods

from :: PVP -> Rep PVP x #

to :: Rep PVP x -> PVP #

Generic Release 
Instance details

Defined in Data.Versions

Associated Types

type Rep Release :: Type -> Type #

Methods

from :: Release -> Rep Release x #

to :: Rep Release x -> Release #

Generic SemVer 
Instance details

Defined in Data.Versions

Associated Types

type Rep SemVer :: Type -> Type #

Methods

from :: SemVer -> Rep SemVer x #

to :: Rep SemVer x -> SemVer #

Generic VSep 
Instance details

Defined in Data.Versions

Associated Types

type Rep VSep :: Type -> Type #

Methods

from :: VSep -> Rep VSep x #

to :: Rep VSep x -> VSep #

Generic Version 
Instance details

Defined in Data.Versions

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic Versioning 
Instance details

Defined in Data.Versions

Associated Types

type Rep Versioning :: Type -> Type #

Generic CompressionLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionLevel :: Type -> Type #

Generic CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionStrategy :: Type -> Type #

Generic Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Format :: Type -> Type #

Methods

from :: Format -> Rep Format x #

to :: Rep Format x -> Format #

Generic MemoryLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep MemoryLevel :: Type -> Type #

Generic Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

Generic WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep WindowBits :: Type -> Type #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type #

Methods

from :: Digit a -> Rep (Digit a) x #

to :: Rep (Digit a) x -> Digit a #

Generic (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type #

Methods

from :: Elem a -> Rep (Elem a) x #

to :: Rep (Elem a) x -> Elem a #

Generic (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type #

Methods

from :: FingerTree a -> Rep (FingerTree a) x #

to :: Rep (FingerTree a) x -> FingerTree a #

Generic (Node a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type #

Methods

from :: Node a -> Rep (Node a) x #

to :: Rep (Node a) x -> Node a #

Generic (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type #

Methods

from :: ViewL a -> Rep (ViewL a) x #

to :: Rep (ViewL a) x -> ViewL a #

Generic (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type #

Methods

from :: ViewR a -> Rep (ViewR a) x #

to :: Rep (ViewR a) x -> ViewR a #

Generic (Tree a) 
Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

Generic (Fix f) 
Instance details

Defined in Data.Fix

Associated Types

type Rep (Fix f) :: Type -> Type #

Methods

from :: Fix f -> Rep (Fix f) x #

to :: Rep (Fix f) x -> Fix f #

Generic (Keys a) 
Instance details

Defined in Dhall.Map

Associated Types

type Rep (Keys a) :: Type -> Type #

Methods

from :: Keys a -> Rep (Keys a) x #

to :: Rep (Keys a) x -> Keys a #

Generic (Set a) 
Instance details

Defined in Dhall.Set

Associated Types

type Rep (Set a) :: Type -> Type #

Methods

from :: Set a -> Rep (Set a) x #

to :: Rep (Set a) x -> Set a #

Generic (FieldSelection s) 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep (FieldSelection s) :: Type -> Type #

Generic (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

Associated Types

type Rep (HistoriedResponse body) :: Type -> Type #

Methods

from :: HistoriedResponse body -> Rep (HistoriedResponse body) x #

to :: Rep (HistoriedResponse body) x -> HistoriedResponse body #

Generic (AddrRange a) 
Instance details

Defined in Data.IP.Range

Associated Types

type Rep (AddrRange a) :: Type -> Type #

Methods

from :: AddrRange a -> Rep (AddrRange a) x #

to :: Rep (AddrRange a) x -> AddrRange a #

Generic (ErrorFancy e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ErrorFancy e) :: Type -> Type #

Methods

from :: ErrorFancy e -> Rep (ErrorFancy e) x #

to :: Rep (ErrorFancy e) x -> ErrorFancy e #

Generic (ErrorItem t) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ErrorItem t) :: Type -> Type #

Methods

from :: ErrorItem t -> Rep (ErrorItem t) x #

to :: Rep (ErrorItem t) x -> ErrorItem t #

Generic (PosState s) 
Instance details

Defined in Text.Megaparsec.State

Associated Types

type Rep (PosState s) :: Type -> Type #

Methods

from :: PosState s -> Rep (PosState s) x #

to :: Rep (PosState s) x -> PosState s #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type #

Methods

from :: Doc a -> Rep (Doc a) x #

to :: Rep (Doc a) x -> Doc a #

Generic (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Associated Types

type Rep (Doc ann) :: Type -> Type #

Methods

from :: Doc ann -> Rep (Doc ann) x #

to :: Rep (Doc ann) x -> Doc ann #

Generic (SimpleDocStream ann) 
Instance details

Defined in Prettyprinter.Internal

Associated Types

type Rep (SimpleDocStream ann) :: Type -> Type #

Methods

from :: SimpleDocStream ann -> Rep (SimpleDocStream ann) x #

to :: Rep (SimpleDocStream ann) x -> SimpleDocStream ann #

Generic (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep (TyVarBndr flag) :: Type -> Type #

Methods

from :: TyVarBndr flag -> Rep (TyVarBndr flag) x #

to :: Rep (TyVarBndr flag) x -> TyVarBndr flag #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a) :: Type -> Type #

Methods

from :: (a) -> Rep (a) x #

to :: Rep (a) x -> (a) #

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (Map k v) 
Instance details

Defined in Dhall.Map

Associated Types

type Rep (Map k v) :: Type -> Type #

Methods

from :: Map k v -> Rep (Map k v) x #

to :: Rep (Map k v) x -> Map k v #

Generic (Binding s a) 
Instance details

Defined in Dhall.Syntax.Binding

Associated Types

type Rep (Binding s a) :: Type -> Type #

Methods

from :: Binding s a -> Rep (Binding s a) x #

to :: Rep (Binding s a) x -> Binding s a #

Generic (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

Associated Types

type Rep (Chunks s a) :: Type -> Type #

Methods

from :: Chunks s a -> Rep (Chunks s a) x #

to :: Rep (Chunks s a) x -> Chunks s a #

Generic (Expr s a) 
Instance details

Defined in Dhall.Syntax.Expr

Associated Types

type Rep (Expr s a) :: Type -> Type #

Methods

from :: Expr s a -> Rep (Expr s a) x #

to :: Rep (Expr s a) x -> Expr s a #

Generic (FunctionBinding s a) 
Instance details

Defined in Dhall.Syntax.FunctionBinding

Associated Types

type Rep (FunctionBinding s a) :: Type -> Type #

Methods

from :: FunctionBinding s a -> Rep (FunctionBinding s a) x #

to :: Rep (FunctionBinding s a) x -> FunctionBinding s a #

Generic (RecordField s a) 
Instance details

Defined in Dhall.Syntax.RecordField

Associated Types

type Rep (RecordField s a) :: Type -> Type #

Methods

from :: RecordField s a -> Rep (RecordField s a) x #

to :: Rep (RecordField s a) x -> RecordField s a #

Generic (Gr a b) 
Instance details

Defined in Data.Graph.Inductive.PatriciaTree

Associated Types

type Rep (Gr a b) :: Type -> Type #

Methods

from :: Gr a b -> Rep (Gr a b) x #

to :: Rep (Gr a b) x -> Gr a b #

Generic (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Associated Types

type Rep (Cofree f a) :: Type -> Type #

Methods

from :: Cofree f a -> Rep (Cofree f a) x #

to :: Rep (Cofree f a) x -> Cofree f a #

Generic (Free f a) 
Instance details

Defined in Control.Monad.Free

Associated Types

type Rep (Free f a) :: Type -> Type #

Methods

from :: Free f a -> Rep (Free f a) x #

to :: Rep (Free f a) x -> Free f a #

Generic (ParseError s e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ParseError s e) :: Type -> Type #

Methods

from :: ParseError s e -> Rep (ParseError s e) x #

to :: Rep (ParseError s e) x -> ParseError s e #

Generic (ParseErrorBundle s e) 
Instance details

Defined in Text.Megaparsec.Error

Associated Types

type Rep (ParseErrorBundle s e) :: Type -> Type #

Generic (State s e) 
Instance details

Defined in Text.Megaparsec.State

Associated Types

type Rep (State s e) :: Type -> Type #

Methods

from :: State s e -> Rep (State s e) x #

to :: Rep (State s e) x -> State s e #

Generic (Either a b) 
Instance details

Defined in Data.Strict.Either

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (These a b) 
Instance details

Defined in Data.Strict.These

Associated Types

type Rep (These a b) :: Type -> Type #

Methods

from :: These a b -> Rep (These a b) x #

to :: Rep (These a b) x -> These a b #

Generic (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep (Pair a b) :: Type -> Type #

Methods

from :: Pair a b -> Rep (Pair a b) x #

to :: Rep (Pair a b) x -> Pair a b #

Generic (These a b) 
Instance details

Defined in Data.These

Associated Types

type Rep (These a b) :: Type -> Type #

Methods

from :: These a b -> Rep (These a b) x #

to :: Rep (These a b) x -> These a b #

Generic (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Associated Types

type Rep (Lift f a) :: Type -> Type #

Methods

from :: Lift f a -> Rep (Lift f a) x #

to :: Rep (Lift f a) x -> Lift f a #

Generic (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep (MaybeT m a) :: Type -> Type #

Methods

from :: MaybeT m a -> Rep (MaybeT m a) x #

to :: Rep (MaybeT m a) x -> MaybeT m a #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x #

to :: Rep (Kleisli m a b) x -> Kleisli m a b #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type #

Methods

from :: Join p a -> Rep (Join p a) x #

to :: Rep (Join p a) x -> Join p a #

Generic (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep (FreeF f a b) :: Type -> Type #

Methods

from :: FreeF f a b -> Rep (FreeF f a b) x #

to :: Rep (FreeF f a b) x -> FreeF f a b #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Generic (These1 f g a) 
Instance details

Defined in Data.Functor.These

Associated Types

type Rep (These1 f g a) :: Type -> Type #

Methods

from :: These1 f g a -> Rep (These1 f g a) x #

to :: Rep (These1 f g a) x -> These1 f g a #

Generic (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Associated Types

type Rep (Backwards f a) :: Type -> Type #

Methods

from :: Backwards f a -> Rep (Backwards f a) x #

to :: Rep (Backwards f a) x -> Backwards f a #

Generic (AccumT w m a) 
Instance details

Defined in Control.Monad.Trans.Accum

Associated Types

type Rep (AccumT w m a) :: Type -> Type #

Methods

from :: AccumT w m a -> Rep (AccumT w m a) x #

to :: Rep (AccumT w m a) x -> AccumT w m a #

Generic (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep (ExceptT e m a) :: Type -> Type #

Methods

from :: ExceptT e m a -> Rep (ExceptT e m a) x #

to :: Rep (ExceptT e m a) x -> ExceptT e m a #

Generic (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Associated Types

type Rep (IdentityT f a) :: Type -> Type #

Methods

from :: IdentityT f a -> Rep (IdentityT f a) x #

to :: Rep (IdentityT f a) x -> IdentityT f a #

Generic (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep (ReaderT r m a) :: Type -> Type #

Methods

from :: ReaderT r m a -> Rep (ReaderT r m a) x #

to :: Rep (ReaderT r m a) x -> ReaderT r m a #

Generic (SelectT r m a) 
Instance details

Defined in Control.Monad.Trans.Select

Associated Types

type Rep (SelectT r m a) :: Type -> Type #

Methods

from :: SelectT r m a -> Rep (SelectT r m a) x #

to :: Rep (SelectT r m a) x -> SelectT r m a #

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Associated Types

type Rep (StateT s m a) :: Type -> Type #

Methods

from :: StateT s m a -> Rep (StateT s m a) x #

to :: Rep (StateT s m a) x -> StateT s m a #

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Associated Types

type Rep (StateT s m a) :: Type -> Type #

Methods

from :: StateT s m a -> Rep (StateT s m a) x #

to :: Rep (StateT s m a) x -> StateT s m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Associated Types

type Rep (Constant a b) :: Type -> Type #

Methods

from :: Constant a b -> Rep (Constant a b) x #

to :: Rep (Constant a b) x -> Constant a b #

Generic (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Associated Types

type Rep (Reverse f a) :: Type -> Type #

Methods

from :: Reverse f a -> Rep (Reverse f a) x #

to :: Rep (Reverse f a) x -> Reverse f a #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (Product f g a) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type #

Methods

from :: Product f g a -> Rep (Product f g a) x #

to :: Rep (Product f g a) x -> Product f g a #

Generic (Sum f g a) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic (ContT r m a) 
Instance details

Defined in Control.Monad.Trans.Cont

Associated Types

type Rep (ContT r m a) :: Type -> Type #

Methods

from :: ContT r m a -> Rep (ContT r m a) x #

to :: Rep (ContT r m a) x -> ContT r m a #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type #

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

from :: Flip p a b -> Rep (Flip p a b) x #

to :: Rep (Flip p a b) x -> Flip p a b #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type #

Methods

from :: Joker g a b -> Rep (Joker g a b) x #

to :: Rep (Joker g a b) x -> Joker g a b #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type #

Methods

from :: Product f g a b -> Rep (Product f g a b) x #

to :: Rep (Product f g a b) x -> Product f g a b #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x #

to :: Rep (Sum p q a b) x -> Sum p q a b #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x #

to :: Rep (Tannen f p a b) x -> Tannen f p a b #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) #

Generic (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep (Biff p f g a b) :: Type -> Type #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x #

to :: Rep (Biff p f g a b) x -> Biff p f g a b #

Generic (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) #

Generic (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) #

Generic (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

data Const #

Constants for a pure type system

The axioms are:

⊦ Type : Kind
⊦ Kind : Sort

... and the valid rule pairs are:

⊦ Type ↝ Type : Type  -- Functions from terms to terms (ordinary functions)
⊦ Kind ↝ Type : Type  -- Functions from types to terms (type-polymorphic functions)
⊦ Sort ↝ Type : Type  -- Functions from kinds to terms
⊦ Kind ↝ Kind : Kind  -- Functions from types to types (type-level functions)
⊦ Sort ↝ Kind : Sort  -- Functions from kinds to types (kind-polymorphic functions)
⊦ Sort ↝ Sort : Sort  -- Functions from kinds to kinds (kind-level functions)

Note that Dhall does not support functions from terms to types and therefore Dhall is not a dependently typed language

Constructors

Type 
Kind 
Sort 

Instances

Instances details
Bounded Const 
Instance details

Defined in Dhall.Syntax.Const

Enum Const 
Instance details

Defined in Dhall.Syntax.Const

Generic Const 
Instance details

Defined in Dhall.Syntax.Const

Associated Types

type Rep Const :: Type -> Type #

Methods

from :: Const -> Rep Const x #

to :: Rep Const x -> Const #

type Rep Const 
Instance details

Defined in Dhall.Syntax.Const

type Rep Const = D1 ('MetaData "Const" "Dhall.Syntax.Const" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "Type" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Kind" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sort" 'PrefixI 'False) (U1 :: Type -> Type)))

data Text #

Instances

Instances details
FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Chunk Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text #

FoldCase Text 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

foldCase :: Text -> Text #

foldCaseList :: [Text] -> [Text]

FromDhall Text 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall Text 
Instance details

Defined in Dhall.Marshal.Encode

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Stream Text 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token Text #

type Tokens Text #

TraversableStream Text 
Instance details

Defined in Text.Megaparsec.Stream

VisualStream Text 
Instance details

Defined in Text.Megaparsec.Stream

MonoZip Text 
Instance details

Defined in Data.Containers

GrowingAppend Text 
Instance details

Defined in Data.MonoTraversable

MonoFoldable Text 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element Text -> m) -> Text -> m #

ofoldr :: (Element Text -> b -> b) -> b -> Text -> b #

ofoldl' :: (a -> Element Text -> a) -> a -> Text -> a #

otoList :: Text -> [Element Text] #

oall :: (Element Text -> Bool) -> Text -> Bool #

oany :: (Element Text -> Bool) -> Text -> Bool #

onull :: Text -> Bool #

olength :: Text -> Int #

olength64 :: Text -> Int64 #

ocompareLength :: Integral i => Text -> i -> Ordering #

otraverse_ :: Applicative f => (Element Text -> f b) -> Text -> f () #

ofor_ :: Applicative f => Text -> (Element Text -> f b) -> f () #

omapM_ :: Applicative m => (Element Text -> m ()) -> Text -> m () #

oforM_ :: Applicative m => Text -> (Element Text -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element Text -> m a) -> a -> Text -> m a #

ofoldMap1Ex :: Semigroup m => (Element Text -> m) -> Text -> m #

ofoldr1Ex :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

ofoldl1Ex' :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

headEx :: Text -> Element Text #

lastEx :: Text -> Element Text #

unsafeHead :: Text -> Element Text #

unsafeLast :: Text -> Element Text #

maximumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

minimumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

oelem :: Element Text -> Text -> Bool #

onotElem :: Element Text -> Text -> Bool #

MonoFunctor Text 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element Text -> Element Text) -> Text -> Text #

MonoPointed Text 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element Text -> Text #

MonoTraversable Text 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element Text -> f (Element Text)) -> Text -> f Text #

omapM :: Applicative m => (Element Text -> m (Element Text)) -> Text -> m Text #

IsSequence Text 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element Text] -> Text #

lengthIndex :: Text -> Index Text #

break :: (Element Text -> Bool) -> Text -> (Text, Text) #

span :: (Element Text -> Bool) -> Text -> (Text, Text) #

dropWhile :: (Element Text -> Bool) -> Text -> Text #

takeWhile :: (Element Text -> Bool) -> Text -> Text #

splitAt :: Index Text -> Text -> (Text, Text) #

unsafeSplitAt :: Index Text -> Text -> (Text, Text) #

take :: Index Text -> Text -> Text #

unsafeTake :: Index Text -> Text -> Text #

drop :: Index Text -> Text -> Text #

unsafeDrop :: Index Text -> Text -> Text #

dropEnd :: Index Text -> Text -> Text #

partition :: (Element Text -> Bool) -> Text -> (Text, Text) #

uncons :: Text -> Maybe (Element Text, Text) #

unsnoc :: Text -> Maybe (Text, Element Text) #

filter :: (Element Text -> Bool) -> Text -> Text #

filterM :: Monad m => (Element Text -> m Bool) -> Text -> m Text #

replicate :: Index Text -> Element Text -> Text #

replicateM :: Monad m => Index Text -> m (Element Text) -> m Text #

groupBy :: (Element Text -> Element Text -> Bool) -> Text -> [Text] #

groupAllOn :: Eq b => (Element Text -> b) -> Text -> [Text] #

subsequences :: Text -> [Text] #

permutations :: Text -> [Text] #

tailEx :: Text -> Text #

tailMay :: Text -> Maybe Text #

initEx :: Text -> Text #

initMay :: Text -> Maybe Text #

unsafeTail :: Text -> Text #

unsafeInit :: Text -> Text #

index :: Text -> Index Text -> Maybe (Element Text) #

indexEx :: Text -> Index Text -> Element Text #

unsafeIndex :: Text -> Index Text -> Element Text #

splitWhen :: (Element Text -> Bool) -> Text -> [Text] #

SemiSequence Text 
Instance details

Defined in Data.Sequences

Associated Types

type Index Text #

Textual Text 
Instance details

Defined in Data.Sequences

Methods

words :: Text -> [Text] #

unwords :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

lines :: Text -> [Text] #

unlines :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

toLower :: Text -> Text #

toUpper :: Text -> Text #

toCaseFold :: Text -> Text #

breakWord :: Text -> (Text, Text) #

breakLine :: Text -> (Text, Text) #

Pretty Text

Automatically converts all newlines to line.

>>> pretty ("hello\nworld" :: Text)
hello
world

Note that line can be undone by group:

>>> group (pretty ("hello\nworld" :: Text))
hello world

Manually use hardline if you definitely want newlines.

Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Display Text

Since: rio-0.1.0.0

Instance details

Defined in RIO.Prelude.Display

Semantic Text 
Instance details

Defined in Data.Versions

LazySequence Text Text 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

Stream (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token (NoShareInput Text) #

type Tokens (NoShareInput Text) #

Stream (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token (ShareInput Text) #

type Tokens (ShareInput Text) #

type ChunkElem Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text = Buffer
type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Token Text 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens Text 
Instance details

Defined in Text.Megaparsec.Stream

type Element Text 
Instance details

Defined in Data.MonoTraversable

type Index Text 
Instance details

Defined in Data.Sequences

type Index Text = Int
type Token (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Token (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens (NoShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens (ShareInput Text) 
Instance details

Defined in Text.Megaparsec.Stream

data Vector a #

Boxed vectors, supporting efficient slicing.

Instances

Instances details
FromJSON1 Vector 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Vector a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Vector a] #

liftOmittedField :: Maybe a -> Maybe (Vector a) #

ToJSON1 Vector 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Vector a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Vector a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Vector a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Vector a] -> Encoding #

liftOmitField :: (a -> Bool) -> Vector a -> Bool #

MonadFail Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

MonadFix Vector

This instance has the same semantics as the one for lists.

Since: vector-0.12.2.0

Instance details

Defined in Data.Vector

Methods

mfix :: (a -> Vector a) -> Vector a

MonadZip Vector 
Instance details

Defined in Data.Vector

Methods

mzip :: Vector a -> Vector b -> Vector (a, b)

mzipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c

munzip :: Vector (a, b) -> (Vector a, Vector b)

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Eq1 Vector 
Instance details

Defined in Data.Vector

Methods

liftEq :: (a -> b -> Bool) -> Vector a -> Vector b -> Bool

Ord1 Vector 
Instance details

Defined in Data.Vector

Methods

liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering

Read1 Vector 
Instance details

Defined in Data.Vector

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a)

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a]

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a)

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a]

Show1 Vector 
Instance details

Defined in Data.Vector

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

liftRnf :: (a -> ()) -> Vector a -> ()

Vector Vector a 
Instance details

Defined in Data.Vector

Methods

basicUnsafeFreeze :: Mutable Vector s a -> ST s (Vector a) #

basicUnsafeThaw :: Vector a -> ST s (Mutable Vector s a) #

basicLength :: Vector a -> Int #

basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a #

basicUnsafeIndexM :: Vector a -> Int -> Box a #

basicUnsafeCopy :: Mutable Vector s a -> Vector a -> ST s () #

elemseq :: Vector a -> a -> b -> b #

FromJSON a => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data a => Data (Vector a) 
Instance details

Defined in Data.Vector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Methods

readsPrec :: Int -> ReadS (Vector a) #

readList :: ReadS [Vector a] #

readPrec :: ReadPrec (Vector a) #

readListPrec :: ReadPrec [Vector a] #

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

FromDhall a => FromDhall (Vector a) 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall a => ToDhall (Vector a) 
Instance details

Defined in Dhall.Marshal.Encode

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

GrowingAppend (Vector a) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr :: (Element (Vector a) -> b -> b) -> b -> Vector a -> b #

ofoldl' :: (a0 -> Element (Vector a) -> a0) -> a0 -> Vector a -> a0 #

otoList :: Vector a -> [Element (Vector a)] #

oall :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

oany :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

onull :: Vector a -> Bool #

olength :: Vector a -> Int #

olength64 :: Vector a -> Int64 #

ocompareLength :: Integral i => Vector a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Vector a) -> f b) -> Vector a -> f () #

ofor_ :: Applicative f => Vector a -> (Element (Vector a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Vector a) -> m ()) -> Vector a -> m () #

oforM_ :: Applicative m => Vector a -> (Element (Vector a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Vector a) -> m a0) -> a0 -> Vector a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr1Ex :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

ofoldl1Ex' :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

headEx :: Vector a -> Element (Vector a) #

lastEx :: Vector a -> Element (Vector a) #

unsafeHead :: Vector a -> Element (Vector a) #

unsafeLast :: Vector a -> Element (Vector a) #

maximumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

minimumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

oelem :: Element (Vector a) -> Vector a -> Bool #

onotElem :: Element (Vector a) -> Vector a -> Bool #

MonoFunctor (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a #

MonoPointed (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Vector a) -> Vector a #

MonoTraversable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) #

omapM :: Applicative m => (Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) #

IsSequence (Vector a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Vector a)] -> Vector a #

lengthIndex :: Vector a -> Index (Vector a) #

break :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

span :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

dropWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

takeWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

splitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

unsafeSplitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

take :: Index (Vector a) -> Vector a -> Vector a #

unsafeTake :: Index (Vector a) -> Vector a -> Vector a #

drop :: Index (Vector a) -> Vector a -> Vector a #

unsafeDrop :: Index (Vector a) -> Vector a -> Vector a #

dropEnd :: Index (Vector a) -> Vector a -> Vector a #

partition :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

uncons :: Vector a -> Maybe (Element (Vector a), Vector a) #

unsnoc :: Vector a -> Maybe (Vector a, Element (Vector a)) #

filter :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

filterM :: Monad m => (Element (Vector a) -> m Bool) -> Vector a -> m (Vector a) #

replicate :: Index (Vector a) -> Element (Vector a) -> Vector a #

replicateM :: Monad m => Index (Vector a) -> m (Element (Vector a)) -> m (Vector a) #

groupBy :: (Element (Vector a) -> Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

groupAllOn :: Eq b => (Element (Vector a) -> b) -> Vector a -> [Vector a] #

subsequences :: Vector a -> [Vector a] #

permutations :: Vector a -> [Vector a] #

tailEx :: Vector a -> Vector a #

tailMay :: Vector a -> Maybe (Vector a) #

initEx :: Vector a -> Vector a #

initMay :: Vector a -> Maybe (Vector a) #

unsafeTail :: Vector a -> Vector a #

unsafeInit :: Vector a -> Vector a #

index :: Vector a -> Index (Vector a) -> Maybe (Element (Vector a)) #

indexEx :: Vector a -> Index (Vector a) -> Element (Vector a) #

unsafeIndex :: Vector a -> Index (Vector a) -> Element (Vector a) #

splitWhen :: (Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

SemiSequence (Vector a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Vector a) #

Methods

intersperse :: Element (Vector a) -> Vector a -> Vector a #

reverse :: Vector a -> Vector a #

find :: (Element (Vector a) -> Bool) -> Vector a -> Maybe (Element (Vector a)) #

sortBy :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Vector a #

cons :: Element (Vector a) -> Vector a -> Vector a #

snoc :: Vector a -> Element (Vector a) -> Vector a #

type Key Vector 
Instance details

Defined in Data.Vector.Instances

type Key Vector = Int
type Mutable Vector 
Instance details

Defined in Data.Vector

type Item (Vector a) 
Instance details

Defined in Data.Vector

type Item (Vector a) = a
type Element (Vector a) 
Instance details

Defined in Data.MonoTraversable

type Element (Vector a) = a
type Index (Vector a) 
Instance details

Defined in Data.Sequences

type Index (Vector a) = Int

data Input #

Path to input

Instances

Instances details
Eq Input 
Instance details

Defined in Dhall.Util

Methods

(==) :: Input -> Input -> Bool #

(/=) :: Input -> Input -> Bool #

newtype Header #

A header corresponds to the leading comment at the top of a Dhall file.

The header includes comment characters but is stripped of leading spaces and trailing newlines

Constructors

Header Text 

Instances

Instances details
Show Header 
Instance details

Defined in Dhall.Parser

newtype Directory #

Internal representation of a directory that stores the path components in reverse order

In other words, the directory /foo/bar/baz is encoded as Directory { components = [ "baz", "bar", "foo" ] }

Constructors

Directory 

Fields

Instances

Instances details
Data Directory 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Directory -> c Directory #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Directory #

toConstr :: Directory -> Constr #

dataTypeOf :: Directory -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Directory) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Directory) #

gmapT :: (forall b. Data b => b -> b) -> Directory -> Directory #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Directory -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Directory -> r #

gmapQ :: (forall d. Data d => d -> u) -> Directory -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Directory -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Directory -> m Directory #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Directory -> m Directory #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Directory -> m Directory #

Semigroup Directory 
Instance details

Defined in Dhall.Syntax.Import

Generic Directory 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Directory :: Type -> Type #

Canonicalize Directory
>>> canonicalize (Directory {components = ["..",".."]})
Directory {components = ["..",".."]}
Instance details

Defined in Dhall.Import

type Rep Directory 
Instance details

Defined in Dhall.Syntax.Import

type Rep Directory = D1 ('MetaData "Directory" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'True) (C1 ('MetaCons "Directory" 'PrefixI 'True) (S1 ('MetaSel ('Just "components") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))

data Seq a #

Instances

Instances details
FromJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Seq a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Seq a] #

liftOmittedField :: Maybe a -> Maybe (Seq a) #

ToJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Seq a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Seq a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Seq a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Seq a] -> Encoding #

liftOmitField :: (a -> Bool) -> Seq a -> Bool #

MonadFix Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a

MonadZip Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzip :: Seq a -> Seq b -> Seq (a, b)

mzipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c

munzip :: Seq (a, b) -> (Seq a, Seq b)

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m #

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Eq1 Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool

Ord1 Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering

Read1 Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a)

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a]

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a)

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a]

Show1 Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Alternative Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Applicative Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

UnzipWith Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)

Hashable1 Seq

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Seq a -> Int #

Adjustable Seq 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Seq -> Seq a -> Seq a #

replace :: Key Seq -> a -> Seq a -> Seq a #

FoldableWithKey Seq 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Seq a -> [(Key Seq, a)] #

foldMapWithKey :: Monoid m => (Key Seq -> a -> m) -> Seq a -> m #

foldrWithKey :: (Key Seq -> a -> b -> b) -> b -> Seq a -> b #

foldlWithKey :: (b -> Key Seq -> a -> b) -> b -> Seq a -> b #

Indexable Seq 
Instance details

Defined in Data.Key

Methods

index :: Seq a -> Key Seq -> a #

Keyed Seq 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Seq -> a -> b) -> Seq a -> Seq b #

Lookup Seq 
Instance details

Defined in Data.Key

Methods

lookup :: Key Seq -> Seq a -> Maybe a #

TraversableWithKey Seq 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Seq -> a -> f b) -> Seq a -> f (Seq b) #

mapWithKeyM :: Monad m => (Key Seq -> a -> m b) -> Seq a -> m (Seq b) #

Zip Seq 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

zip :: Seq a -> Seq b -> Seq (a, b) #

zap :: Seq (a -> b) -> Seq a -> Seq b #

ZipWithKey Seq 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Seq -> a -> b -> c) -> Seq a -> Seq b -> Seq c #

zapWithKey :: Seq (Key Seq -> a -> b) -> Seq a -> Seq b #

Lift a => Lift (Seq a :: Type) 
Instance details

Defined in Data.Sequence.Internal

Methods

lift :: Quote m => Seq a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Seq a -> Code m (Seq a) #

FromJSON a => FromJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Seq a -> Value #

toEncoding :: Seq a -> Encoding #

toJSONList :: [Seq a] -> Value #

toEncodingList :: [Seq a] -> Encoding #

omitField :: Seq a -> Bool #

Data a => Data (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) #

toConstr :: Seq a -> Constr #

dataTypeOf :: Seq a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

a ~ Char => IsString (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Semigroup (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) #

Methods

fromList :: [Item (Seq a)] -> Seq a #

fromListN :: Int -> [Item (Seq a)] -> Seq a #

toList :: Seq a -> [Item (Seq a)] #

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

readsPrec :: Int -> ReadS (Seq a) #

readList :: ReadS [Seq a] #

readPrec :: ReadPrec (Seq a) #

readListPrec :: ReadPrec [Seq a] #

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

FromDhall a => FromDhall (Seq a) 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall a => ToDhall (Seq a) 
Instance details

Defined in Dhall.Marshal.Encode

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Hashable v => Hashable (Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int #

Ord a => Stream (Seq a)

Since: megaparsec-9.0.0

Instance details

Defined in Text.Megaparsec.Stream

Associated Types

type Token (Seq a) #

type Tokens (Seq a) #

Methods

tokenToChunk :: Proxy (Seq a) -> Token (Seq a) -> Tokens (Seq a) #

tokensToChunk :: Proxy (Seq a) -> [Token (Seq a)] -> Tokens (Seq a) #

chunkToTokens :: Proxy (Seq a) -> Tokens (Seq a) -> [Token (Seq a)] #

chunkLength :: Proxy (Seq a) -> Tokens (Seq a) -> Int #

chunkEmpty :: Proxy (Seq a) -> Tokens (Seq a) -> Bool #

take1_ :: Seq a -> Maybe (Token (Seq a), Seq a) #

takeN_ :: Int -> Seq a -> Maybe (Tokens (Seq a), Seq a) #

takeWhile_ :: (Token (Seq a) -> Bool) -> Seq a -> (Tokens (Seq a), Seq a) #

GrowingAppend (Seq a) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr :: (Element (Seq a) -> b -> b) -> b -> Seq a -> b #

ofoldl' :: (a0 -> Element (Seq a) -> a0) -> a0 -> Seq a -> a0 #

otoList :: Seq a -> [Element (Seq a)] #

oall :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

oany :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

onull :: Seq a -> Bool #

olength :: Seq a -> Int #

olength64 :: Seq a -> Int64 #

ocompareLength :: Integral i => Seq a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Seq a) -> f b) -> Seq a -> f () #

ofor_ :: Applicative f => Seq a -> (Element (Seq a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Seq a) -> m ()) -> Seq a -> m () #

oforM_ :: Applicative m => Seq a -> (Element (Seq a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Seq a) -> m a0) -> a0 -> Seq a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr1Ex :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

ofoldl1Ex' :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

headEx :: Seq a -> Element (Seq a) #

lastEx :: Seq a -> Element (Seq a) #

unsafeHead :: Seq a -> Element (Seq a) #

unsafeLast :: Seq a -> Element (Seq a) #

maximumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

minimumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

oelem :: Element (Seq a) -> Seq a -> Bool #

onotElem :: Element (Seq a) -> Seq a -> Bool #

MonoFunctor (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a #

MonoPointed (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Seq a) -> Seq a #

MonoTraversable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Seq a) -> f (Element (Seq a))) -> Seq a -> f (Seq a) #

omapM :: Applicative m => (Element (Seq a) -> m (Element (Seq a))) -> Seq a -> m (Seq a) #

IsSequence (Seq a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Seq a)] -> Seq a #

lengthIndex :: Seq a -> Index (Seq a) #

break :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

span :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

dropWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

takeWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

splitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

unsafeSplitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

take :: Index (Seq a) -> Seq a -> Seq a #

unsafeTake :: Index (Seq a) -> Seq a -> Seq a #

drop :: Index (Seq a) -> Seq a -> Seq a #

unsafeDrop :: Index (Seq a) -> Seq a -> Seq a #

dropEnd :: Index (Seq a) -> Seq a -> Seq a #

partition :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

uncons :: Seq a -> Maybe (Element (Seq a), Seq a) #

unsnoc :: Seq a -> Maybe (Seq a, Element (Seq a)) #

filter :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

filterM :: Monad m => (Element (Seq a) -> m Bool) -> Seq a -> m (Seq a) #

replicate :: Index (Seq a) -> Element (Seq a) -> Seq a #

replicateM :: Monad m => Index (Seq a) -> m (Element (Seq a)) -> m (Seq a) #

groupBy :: (Element (Seq a) -> Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

groupAllOn :: Eq b => (Element (Seq a) -> b) -> Seq a -> [Seq a] #

subsequences :: Seq a -> [Seq a] #

permutations :: Seq a -> [Seq a] #

tailEx :: Seq a -> Seq a #

tailMay :: Seq a -> Maybe (Seq a) #

initEx :: Seq a -> Seq a #

initMay :: Seq a -> Maybe (Seq a) #

unsafeTail :: Seq a -> Seq a #

unsafeInit :: Seq a -> Seq a #

index :: Seq a -> Index (Seq a) -> Maybe (Element (Seq a)) #

indexEx :: Seq a -> Index (Seq a) -> Element (Seq a) #

unsafeIndex :: Seq a -> Index (Seq a) -> Element (Seq a) #

splitWhen :: (Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

SemiSequence (Seq a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Seq a) #

Methods

intersperse :: Element (Seq a) -> Seq a -> Seq a #

reverse :: Seq a -> Seq a #

find :: (Element (Seq a) -> Bool) -> Seq a -> Maybe (Element (Seq a)) #

sortBy :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Seq a #

cons :: Element (Seq a) -> Seq a -> Seq a #

snoc :: Seq a -> Element (Seq a) -> Seq a #

type Key Seq 
Instance details

Defined in Data.Key

type Key Seq = Int
type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a
type Token (Seq a) 
Instance details

Defined in Text.Megaparsec.Stream

type Token (Seq a) = a
type Tokens (Seq a) 
Instance details

Defined in Text.Megaparsec.Stream

type Tokens (Seq a) = Seq a
type Element (Seq a) 
Instance details

Defined in Data.MonoTraversable

type Element (Seq a) = a
type Index (Seq a) 
Instance details

Defined in Data.Sequences

type Index (Seq a) = Int

data Decoder a #

A (Decoder a) represents a way to marshal a value of type 'a' from Dhall into Haskell.

You can produce Decoders either explicitly:

example :: Decoder (Vector Text)
example = vector text

... or implicitly using auto:

example :: Decoder (Vector Text)
example = auto

You can consume Decoders using the input function:

input :: Decoder a -> Text -> IO a

Constructors

Decoder 

Fields

Instances

Instances details
Functor Decoder 
Instance details

Defined in Dhall.Marshal.Decode

Methods

fmap :: (a -> b) -> Decoder a -> Decoder b #

(<$) :: a -> Decoder b -> Decoder a #

data Binding s a #

Record the binding part of a let expression.

For example,

let {- A -} x {- B -} : {- C -} Bool = {- D -} True in x

… will be instantiated as follows:

  • bindingSrc0 corresponds to the A comment.
  • variable is "x"
  • bindingSrc1 corresponds to the B comment.
  • annotation is Just a pair, corresponding to the C comment and Bool.
  • bindingSrc2 corresponds to the D comment.
  • value corresponds to True.

Constructors

Binding 

Fields

Instances

Instances details
Generic (Binding s a) 
Instance details

Defined in Dhall.Syntax.Binding

Associated Types

type Rep (Binding s a) :: Type -> Type #

Methods

from :: Binding s a -> Rep (Binding s a) x #

to :: Rep (Binding s a) x -> Binding s a #

type Rep (Binding s a) 
Instance details

Defined in Dhall.Syntax.Binding

type Rep (Binding s a) = D1 ('MetaData "Binding" "Dhall.Syntax.Binding" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "Binding" 'PrefixI 'True) ((S1 ('MetaSel ('Just "bindingSrc0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: (S1 ('MetaSel ('Just "variable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "bindingSrc1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)))) :*: (S1 ('MetaSel ('Just "annotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Maybe s, Expr s a))) :*: (S1 ('MetaSel ('Just "bindingSrc2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))))))

data Import #

Reference to an external resource

Instances

Instances details
Data Import 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Import -> c Import #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Import #

toConstr :: Import -> Constr #

dataTypeOf :: Import -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Import) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Import) #

gmapT :: (forall b. Data b => b -> b) -> Import -> Import #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Import -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Import -> r #

gmapQ :: (forall d. Data d => d -> u) -> Import -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Import -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Import -> m Import #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Import -> m Import #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Import -> m Import #

Semigroup Import 
Instance details

Defined in Dhall.Syntax.Import

Generic Import 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Import :: Type -> Type #

Methods

from :: Import -> Rep Import x #

to :: Rep Import x -> Import #

Canonicalize Import 
Instance details

Defined in Dhall.Import

type Rep Import 
Instance details

Defined in Dhall.Syntax.Import

type Rep Import = D1 ('MetaData "Import" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "Import" 'PrefixI 'True) (S1 ('MetaSel ('Just "importHashed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportHashed) :*: S1 ('MetaSel ('Just "importMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportMode)))

data MultiLet s a #

This type represents 1 or more nested Let bindings that have been coalesced together for ease of manipulation

Constructors

MultiLet (NonEmpty (Binding s a)) (Expr s a) 

class FromDhall a where #

Any value that implements FromDhall can be automatically decoded based on the inferred return type of input.

>>> input auto "[1, 2, 3]" :: IO (Vector Natural)
[1,2,3]
>>> input auto "toMap { a = False, b = True }" :: IO (Map Text Bool)
fromList [("a",False),("b",True)]

This class auto-generates a default implementation for types that implement Generic. This does not auto-generate an instance for recursive types.

The default instance can be tweaked using genericAutoWith/genericAutoWithInputNormalizer and custom InterpretOptions, or using DerivingVia and Codec from Dhall.Deriving.

Minimal complete definition

Nothing

Instances

Instances details
FromDhall Void 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Int16 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Int32 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Int64 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Int8 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Word16 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Word32 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Word64 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Word8 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall ByteString 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall ByteString 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall ShortByteString 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Scientific 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall PackageName # 
Instance details

Defined in Spago.Types

FromDhall Repo # 
Instance details

Defined in Spago.Types

FromDhall SourcePath # 
Instance details

Defined in Spago.Types

FromDhall Text 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Text 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall ShortText 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Day 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall DayOfWeek 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall UTCTime 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall LocalTime 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall TimeOfDay 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall TimeZone 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall ZonedTime 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Integer 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Natural 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall () 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Bool 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Double 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Int 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall Word 
Instance details

Defined in Dhall.Marshal.Decode

ToDhall x => FromDhall (Equivalence x) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (Equivalence x) #

ToDhall x => FromDhall (Predicate x) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (Predicate x) #

FromDhall a => FromDhall (Identity a) 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall a => FromDhall (Seq a) 
Instance details

Defined in Dhall.Marshal.Decode

(FromDhall a, Ord a, Show a) => FromDhall (Set a)

Note that this instance will throw errors in the presence of duplicates in the list. To ignore duplicates, use setIgnoringDuplicates.

Instance details

Defined in Dhall.Marshal.Decode

(Functor f, FromDhall (f (Result f))) => FromDhall (Fix f)

You can use this instance to marshal recursive types from Dhall to Haskell.

Here is an example use of this instance:

{-# LANGUAGE DeriveAnyClass     #-}
{-# LANGUAGE DeriveFoldable     #-}
{-# LANGUAGE DeriveFunctor      #-}
{-# LANGUAGE DeriveTraversable  #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE KindSignatures     #-}
{-# LANGUAGE QuasiQuotes        #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies       #-}
{-# LANGUAGE TemplateHaskell    #-}

import Data.Fix (Fix(..))
import Data.Text (Text)
import Dhall (FromDhall)
import GHC.Generics (Generic)
import Numeric.Natural (Natural)

import qualified Data.Fix                 as Fix
import qualified Data.Functor.Foldable    as Foldable
import qualified Data.Functor.Foldable.TH as TH
import qualified Dhall
import qualified NeatInterpolation

data Expr
    = Lit Natural
    | Add Expr Expr
    | Mul Expr Expr
    deriving (Show)

TH.makeBaseFunctor ''Expr

deriving instance Generic (ExprF a)
deriving instance FromDhall a => FromDhall (ExprF a)

example :: Text
example = [NeatInterpolation.text|
    \(Expr : Type)
->  let ExprF =
          < LitF :
              Natural
          | AddF :
              { _1 : Expr, _2 : Expr }
          | MulF :
              { _1 : Expr, _2 : Expr }
          >

    in      \(Fix : ExprF -> Expr)
        ->  let Lit = \(x : Natural) -> Fix (ExprF.LitF x)

            let Add =
                      \(x : Expr)
                  ->  \(y : Expr)
                  ->  Fix (ExprF.AddF { _1 = x, _2 = y })

            let Mul =
                      \(x : Expr)
                  ->  \(y : Expr)
                  ->  Fix (ExprF.MulF { _1 = x, _2 = y })

            in  Add (Mul (Lit 3) (Lit 7)) (Add (Lit 1) (Lit 2))
|]

convert :: Fix ExprF -> Expr
convert = Fix.foldFix Foldable.embed

main :: IO ()
main = do
    x <- Dhall.input Dhall.auto example :: IO (Fix ExprF)

    print (convert x :: Expr)
Instance details

Defined in Dhall.Marshal.Decode

FromDhall (f (Result f)) => FromDhall (Result f) 
Instance details

Defined in Dhall.Marshal.Decode

(FromDhall a, Hashable a, Ord a, Show a) => FromDhall (HashSet a)

Note that this instance will throw errors in the presence of duplicates in the list. To ignore duplicates, use hashSetIgnoringDuplicates.

Instance details

Defined in Dhall.Marshal.Decode

FromDhall a => FromDhall (Vector a) 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall a => FromDhall (Maybe a) 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall [Char] 
Instance details

Defined in Dhall.Marshal.Decode

FromDhall a => FromDhall [a] 
Instance details

Defined in Dhall.Marshal.Decode

(FromDhall b, ToDhall x) => FromDhall (Op b x) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (Op b x) #

(Ord k, FromDhall k, FromDhall v) => FromDhall (Map k v) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (Map k v) #

(Eq k, Hashable k, FromDhall k, FromDhall v) => FromDhall (HashMap k v) 
Instance details

Defined in Dhall.Marshal.Decode

(FromDhall a, FromDhall b) => FromDhall (a, b) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (a, b) #

(ToDhall a, FromDhall b) => FromDhall (a -> b) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

autoWith :: InputNormalizer -> Decoder (a -> b) #

newtype DhallErrors e #

A newtype suitable for collecting one or more errors.

Constructors

DhallErrors 

Fields

Instances

Instances details
Functor DhallErrors 
Instance details

Defined in Dhall.Marshal.Decode

Methods

fmap :: (a -> b) -> DhallErrors a -> DhallErrors b #

(<$) :: a -> DhallErrors b -> DhallErrors a #

Show ExpectedTypeErrors 
Instance details

Defined in Dhall.Marshal.Decode

Semigroup (DhallErrors e) 
Instance details

Defined in Dhall.Marshal.Decode

(Show (DhallErrors e), Typeable e) => Exception (DhallErrors e) 
Instance details

Defined in Dhall.Marshal.Decode

Eq e => Eq (DhallErrors e) 
Instance details

Defined in Dhall.Marshal.Decode

(Pretty s, Pretty a, Typeable s, Typeable a) => Show (ExtractErrors s a) 
Instance details

Defined in Dhall.Marshal.Decode

data WithComponent #

A path component for a with expression

Constructors

WithLabel Text 
WithQuestion 

Instances

Instances details
Generic WithComponent 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep WithComponent :: Type -> Type #

type Rep WithComponent 
Instance details

Defined in Dhall.Syntax.Types

type Rep WithComponent = D1 ('MetaData "WithComponent" "Dhall.Syntax.Types" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "WithLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "WithQuestion" 'PrefixI 'False) (U1 :: Type -> Type))

data FieldSelection s #

Record the field on a selector-expression

For example,

e . {- A -} x {- B -}

… will be instantiated as follows:

  • fieldSelectionSrc0 corresponds to the A comment
  • fieldSelectionLabel corresponds to x
  • fieldSelectionSrc1 corresponds to the B comment

Given our limitation that not all expressions recover their whitespaces, the purpose of fieldSelectionSrc1 is to save the SourcePos where the fieldSelectionLabel ends, but we still use a 'Maybe Dhall.Src.Src' (s = Src) to be consistent with similar data types such as Binding, for example.

Instances

Instances details
Generic (FieldSelection s) 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep (FieldSelection s) :: Type -> Type #

type Rep (FieldSelection s) 
Instance details

Defined in Dhall.Syntax.Types

type Rep (FieldSelection s) = D1 ('MetaData "FieldSelection" "Dhall.Syntax.Types" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "FieldSelection" 'PrefixI 'True) (S1 ('MetaSel ('Just "fieldSelectionSrc0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: (S1 ('MetaSel ('Just "fieldSelectionLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "fieldSelectionSrc1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)))))

data PreferAnnotation #

Used to record the origin of a // operator (i.e. from source code or a product of desugaring)

Instances

Instances details
Generic PreferAnnotation 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep PreferAnnotation :: Type -> Type #

type Rep PreferAnnotation 
Instance details

Defined in Dhall.Syntax.Types

type Rep PreferAnnotation = D1 ('MetaData "PreferAnnotation" "Dhall.Syntax.Types" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "PreferFromSource" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PreferFromCompletion" 'PrefixI 'False) (U1 :: Type -> Type))

newtype DhallDouble #

This wrapper around Double exists for its Eq instance which is defined via the binary encoding of Dhall Doubles.

Constructors

DhallDouble 

Instances

Instances details
Generic DhallDouble 
Instance details

Defined in Dhall.Syntax.Types

Associated Types

type Rep DhallDouble :: Type -> Type #

type Rep DhallDouble 
Instance details

Defined in Dhall.Syntax.Types

type Rep DhallDouble = D1 ('MetaData "DhallDouble" "Dhall.Syntax.Types" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'True) (C1 ('MetaCons "DhallDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDhallDouble") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

data Var #

Label for a bound variable

The Text field is the variable's name (i.e. "x").

The Int field disambiguates variables with the same name if there are multiple bound variables of the same name in scope. Zero refers to the nearest bound variable and the index increases by one for each bound variable of the same name going outward. The following diagram may help:

                              ┌──refers to──┐
                              │             │
                              v             │
λ(x : Type) → λ(y : Type) → λ(x : Type) → x@0

┌─────────────────refers to─────────────────┐
│                                           │
v                                           │
λ(x : Type) → λ(y : Type) → λ(x : Type) → x@1

This Int behaves like a De Bruijn index in the special case where all variables have the same name.

You can optionally omit the index if it is 0:

                              ┌─refers to─┐
                              │           │
                              v           │
λ(x : Type) → λ(y : Type) → λ(x : Type) → x

Zero indices are omitted when pretty-printing Vars and non-zero indices appear as a numeric suffix.

Constructors

V Text !Int 

Instances

Instances details
IsString Var 
Instance details

Defined in Dhall.Syntax.Var

Methods

fromString :: String -> Var #

Generic Var 
Instance details

Defined in Dhall.Syntax.Var

Associated Types

type Rep Var :: Type -> Type #

Methods

from :: Var -> Rep Var x #

to :: Rep Var x -> Var #

type Rep Var 
Instance details

Defined in Dhall.Syntax.Var

type Rep Var = D1 ('MetaData "Var" "Dhall.Syntax.Var" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "V" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)))

data Chunks s a #

The body of an interpolated Text literal

Constructors

Chunks [(Text, Expr s a)] Text 

Instances

Instances details
IsString (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

Methods

fromString :: String -> Chunks s a #

Monoid (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

Methods

mempty :: Chunks s a #

mappend :: Chunks s a -> Chunks s a -> Chunks s a #

mconcat :: [Chunks s a] -> Chunks s a #

Semigroup (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

Methods

(<>) :: Chunks s a -> Chunks s a -> Chunks s a #

sconcat :: NonEmpty (Chunks s a) -> Chunks s a #

stimes :: Integral b => b -> Chunks s a -> Chunks s a #

Generic (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

Associated Types

type Rep (Chunks s a) :: Type -> Type #

Methods

from :: Chunks s a -> Rep (Chunks s a) x #

to :: Rep (Chunks s a) x -> Chunks s a #

type Rep (Chunks s a) 
Instance details

Defined in Dhall.Syntax.Chunks

type Rep (Chunks s a) = D1 ('MetaData "Chunks" "Dhall.Syntax.Chunks" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "Chunks" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Expr s a)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Expr s a #

Syntax tree for expressions

The s type parameter is used to track the presence or absence of Src spans:

  • If s = Src then the code may contains Src spans (either in a Note constructor or inline within another constructor, like Let)
  • If s = Void then the code has no Src spans

The a type parameter is used to track the presence or absence of imports

Constructors

Const Const
Const c                                  ~  c
Var Var
Var (V x 0)                              ~  x
Var (V x n)                              ~  x@n
Lam (Maybe CharacterSet) (FunctionBinding s a) (Expr s a)
Lam _ (FunctionBinding _ "x" _ _ A) b    ~  λ(x : A) -> b
Pi (Maybe CharacterSet) Text (Expr s a) (Expr s a)
Pi _ "_" A B                               ~        A  -> B
Pi _ x   A B                               ~  ∀(x : A) -> B
App (Expr s a) (Expr s a)
App f a                                  ~  f a
Let (Binding s a) (Expr s a)
Let (Binding _ x _  Nothing  _ r) e      ~  let x     = r in e
Let (Binding _ x _ (Just t ) _ r) e      ~  let x : t = r in e

The difference between

let x = a    let y = b in e

and

let x = a in let y = b in e

is only an additional Note around Let "y" … in the second example.

See MultiLet for a representation of let-blocks that mirrors the source code more closely.

Annot (Expr s a) (Expr s a)
Annot x t                                ~  x : t
Bool
Bool                                     ~  Bool
BoolLit Bool
BoolLit b                                ~  b
BoolAnd (Expr s a) (Expr s a)
BoolAnd x y                              ~  x && y
BoolOr (Expr s a) (Expr s a)
BoolOr  x y                              ~  x || y
BoolEQ (Expr s a) (Expr s a)
BoolEQ  x y                              ~  x == y
BoolNE (Expr s a) (Expr s a)
BoolNE  x y                              ~  x != y
BoolIf (Expr s a) (Expr s a) (Expr s a)
BoolIf x y z                             ~  if x then y else z
Bytes
Bytes                                    ~ Bytes
BytesLit ByteString
BytesLit "\x00\xFF"                      ~ 0x"00FF"
Natural
Natural                                  ~  Natural
NaturalLit Natural
NaturalLit n                             ~  n
NaturalFold
NaturalFold                              ~  Natural/fold
NaturalBuild
NaturalBuild                             ~  Natural/build
NaturalIsZero
NaturalIsZero                            ~  Natural/isZero
NaturalEven
NaturalEven                              ~  Natural/even
NaturalOdd
NaturalOdd                               ~  Natural/odd
NaturalToInteger
NaturalToInteger                         ~  Natural/toInteger
NaturalShow
NaturalShow                              ~  Natural/show
NaturalSubtract
NaturalSubtract                          ~  Natural/subtract
NaturalPlus (Expr s a) (Expr s a)
NaturalPlus x y                          ~  x + y
NaturalTimes (Expr s a) (Expr s a)
NaturalTimes x y                         ~  x * y
Integer
Integer                                  ~  Integer
IntegerLit Integer
IntegerLit n                             ~  ±n
IntegerClamp
IntegerClamp                             ~  Integer/clamp
IntegerNegate
IntegerNegate                            ~  Integer/negate
IntegerShow
IntegerShow                              ~  Integer/show
IntegerToDouble
IntegerToDouble                          ~  Integer/toDouble
Double
Double                                   ~  Double
DoubleLit DhallDouble
DoubleLit n                              ~  n
DoubleShow
DoubleShow                               ~  Double/show
Text
Text                                     ~  Text
TextLit (Chunks s a)
TextLit (Chunks [(t1, e1), (t2, e2)] t3) ~  "t1${e1}t2${e2}t3"
TextAppend (Expr s a) (Expr s a)
TextAppend x y                           ~  x ++ y
TextReplace
TextReplace                              ~ Text/replace
TextShow
TextShow                                 ~  Text/show
Date
Date                                     ~  Date
DateLiteral Day
DateLiteral (fromGregorian _YYYY _MM _DD) ~ YYYY-MM-DD
DateShow
DateShow                                 ~  Date/show
Time
Time                                     ~  Time
TimeLiteral
TimeLiteral (TimeOfDay hh mm ss) _       ~  hh:mm:ss

Fields

TimeShow 
TimeZone
TimeZone                                 ~  TimeZone
TimeZoneLiteral TimeZone
TimeZoneLiteral (TimeZone ( 60 * _HH + _MM) _ _) ~ +HH:MM

| > TimeZoneLiteral (TimeZone (-60 * _HH + _MM) _ _) ~ -HH:MM

TimeZoneShow
TimeZoneShow                             ~  TimeZone/Show
List
List                                     ~  List
ListLit (Maybe (Expr s a)) (Seq (Expr s a))
ListLit (Just t ) []                     ~  [] : t
ListLit  Nothing  [x, y, z]              ~  [x, y, z]

Invariant: A non-empty list literal is always represented as ListLit Nothing xs.

When an annotated, non-empty list literal is parsed, it is represented as

Annot (ListLit Nothing [x, y, z]) t      ~ [x, y, z] : t
ListAppend (Expr s a) (Expr s a)
ListAppend x y                           ~  x # y
ListBuild
ListBuild                                ~  List/build
ListFold
ListFold                                 ~  List/fold
ListLength
ListLength                               ~  List/length
ListHead
ListHead                                 ~  List/head
ListLast
ListLast                                 ~  List/last
ListIndexed
ListIndexed                              ~  List/indexed
ListReverse
ListReverse                              ~  List/reverse
Optional
Optional                                 ~  Optional
Some (Expr s a)
Some e                                   ~  Some e
None
None                                     ~  None
Record (Map Text (RecordField s a))
Record [ (k1, RecordField _ t1)          ~  { k1 : t1, k2 : t1 }
       , (k2, RecordField _ t2)
       ]
RecordLit (Map Text (RecordField s a))
RecordLit [ (k1, RecordField _ v1)       ~  { k1 = v1, k2 = v2 }
          , (k2, RecordField _ v2)
          ]
Union (Map Text (Maybe (Expr s a)))
Union        [(k1, Just t1), (k2, Nothing)] ~  < k1 : t1 | k2 >
Combine (Maybe CharacterSet) (Maybe Text) (Expr s a) (Expr s a)
Combine _ Nothing x y                    ~  x ∧ y

The first field is a Just when the Combine operator is introduced as a result of desugaring duplicate record fields:

RecordLit [ ( k                          ~ { k = x, k = y }
          , RecordField
             _
             (Combine (Just k) x y)
           )]
CombineTypes (Maybe CharacterSet) (Expr s a) (Expr s a)
CombineTypes _ x y                       ~  x ⩓ y
Prefer (Maybe CharacterSet) PreferAnnotation (Expr s a) (Expr s a)
Prefer _ _ x y                           ~  x ⫽ y
RecordCompletion (Expr s a) (Expr s a)
RecordCompletion x y                     ~  x::y
Merge (Expr s a) (Expr s a) (Maybe (Expr s a))
Merge x y (Just t )                      ~  merge x y : t
Merge x y  Nothing                       ~  merge x y
ToMap (Expr s a) (Maybe (Expr s a))
ToMap x (Just t)                         ~  toMap x : t
ToMap x  Nothing                         ~  toMap x
ShowConstructor (Expr s a)
ShowConstructor x                        ~  showConstructor x
Field (Expr s a) (FieldSelection s)
Field e (FieldSelection _ x _)              ~  e.x
Project (Expr s a) (Either [Text] (Expr s a))
Project e (Left xs)                      ~  e.{ xs }
Project e (Right t)                      ~  e.(t)
Assert (Expr s a)
Assert e                                 ~  assert : e
Equivalent (Maybe CharacterSet) (Expr s a) (Expr s a)
Equivalent _ x y                           ~  x ≡ y
With (Expr s a) (NonEmpty WithComponent) (Expr s a)
With x y e                               ~  x with y = e
Note s (Expr s a)
Note s x                                 ~  e
ImportAlt (Expr s a) (Expr s a)
ImportAlt                                ~  e1 ? e2
Embed a
Embed import                             ~  import

Instances

Instances details
IsString (Expr s a) 
Instance details

Defined in Dhall.Syntax.Expr

Methods

fromString :: String -> Expr s a #

Generic (Expr s a) 
Instance details

Defined in Dhall.Syntax.Expr

Associated Types

type Rep (Expr s a) :: Type -> Type #

Methods

from :: Expr s a -> Rep (Expr s a) x #

to :: Rep (Expr s a) x -> Expr s a #

type Rep (Expr s a) 
Instance details

Defined in Dhall.Syntax.Expr

type Rep (Expr s a) = D1 ('MetaData "Expr" "Dhall.Syntax.Expr" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) ((((((C1 ('MetaCons "Const" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Const)) :+: C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Var))) :+: (C1 ('MetaCons "Lam" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunctionBinding s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "Pi" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: C1 ('MetaCons "App" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))))) :+: ((C1 ('MetaCons "Let" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Binding s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: C1 ('MetaCons "Annot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "Bool" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BoolLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "BoolAnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))))))) :+: (((C1 ('MetaCons "BoolOr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: C1 ('MetaCons "BoolEQ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "BoolNE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "BoolIf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: C1 ('MetaCons "Bytes" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "BytesLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "Natural" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NaturalLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)) :+: (C1 ('MetaCons "NaturalFold" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NaturalBuild" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "NaturalIsZero" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NaturalEven" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NaturalOdd" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NaturalToInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NaturalShow" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "NaturalSubtract" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NaturalPlus" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "NaturalTimes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "Integer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntegerLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))))) :+: (((C1 ('MetaCons "IntegerClamp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntegerNegate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IntegerShow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntegerToDouble" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Double" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "DoubleLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DhallDouble)) :+: (C1 ('MetaCons "DoubleShow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Text" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TextLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Chunks s a))) :+: (C1 ('MetaCons "TextAppend" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: C1 ('MetaCons "TextReplace" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "TextShow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Date" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DateLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: (C1 ('MetaCons "DateShow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Time" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TimeLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeOfDay) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :+: C1 ('MetaCons "TimeShow" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TimeZone" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TimeZoneLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeZone)) :+: C1 ('MetaCons "TimeZoneShow" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "List" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Expr s a))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq (Expr s a))))) :+: (C1 ('MetaCons "ListAppend" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "ListBuild" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListFold" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ListLength" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListHead" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ListLast" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ListIndexed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListReverse" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "Optional" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Some" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Record" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text (RecordField s a)))) :+: C1 ('MetaCons "RecordLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text (RecordField s a))))))) :+: ((C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text (Maybe (Expr s a))))) :+: C1 ('MetaCons "Combine" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))))) :+: (C1 ('MetaCons "CombineTypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: (C1 ('MetaCons "Prefer" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreferAnnotation)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: C1 ('MetaCons "RecordCompletion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))))))) :+: (((C1 ('MetaCons "Merge" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Expr s a))))) :+: C1 ('MetaCons "ToMap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Expr s a))))) :+: (C1 ('MetaCons "ShowConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "Field" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FieldSelection s))) :+: C1 ('MetaCons "Project" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either [Text] (Expr s a))))))) :+: ((C1 ('MetaCons "Assert" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "Equivalent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CharacterSet)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))) :+: C1 ('MetaCons "With" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty WithComponent)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)))))) :+: (C1 ('MetaCons "Note" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 s) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: (C1 ('MetaCons "ImportAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :+: C1 ('MetaCons "Embed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))))))

data RecordField s a #

Record the field of a record-type and record-literal expression. The reason why we use the same ADT for both of them is because they store the same information.

For example,

{ {- A -} x {- B -} : {- C -} T }

... or

{ {- A -} x {- B -} = {- C -} T }

will be instantiated as follows:

  • recordFieldSrc0 corresponds to the A comment.
  • recordFieldValue is T
  • recordFieldSrc1 corresponds to the B comment.
  • recordFieldSrc2 corresponds to the C comment.

Although the A comment isn't annotating the T Record Field, this is the best place to keep these comments.

Note that recordFieldSrc2 is always Nothing when the RecordField is for a punned entry, because there is no = sign. For example,

{ {- A -} x {- B -} }

will be instantiated as follows:

  • recordFieldSrc0 corresponds to the A comment.
  • recordFieldValue corresponds to (Var "x")
  • recordFieldSrc1 corresponds to the B comment.
  • recordFieldSrc2 will be Nothing

The labels involved in a record using dot-syntax like in this example:

{ {- A -} a {- B -} . {- C -} b {- D -} . {- E -} c {- F -} = {- G -} e }

will be instantiated as follows:

  • For both the a and b field, recordfieldSrc2 is Nothing
  • For the a field:
  • recordFieldSrc0 corresponds to the A comment
  • recordFieldSrc1 corresponds to the B comment
  • For the b field:
  • recordFieldSrc0 corresponds to the C comment
  • recordFieldSrc1 corresponds to the D comment
  • For the c field:
  • recordFieldSrc0 corresponds to the E comment
  • recordFieldSrc1 corresponds to the F comment
  • recordFieldSrc2 corresponds to the G comment

That is, for every label except the last one the semantics of recordFieldSrc0 and recordFieldSrc1 are the same from a regular record label but recordFieldSrc2 is always Nothing. For the last keyword, all srcs are Just

Instances

Instances details
Generic (RecordField s a) 
Instance details

Defined in Dhall.Syntax.RecordField

Associated Types

type Rep (RecordField s a) :: Type -> Type #

Methods

from :: RecordField s a -> Rep (RecordField s a) x #

to :: Rep (RecordField s a) x -> RecordField s a #

type Rep (RecordField s a) 
Instance details

Defined in Dhall.Syntax.RecordField

type Rep (RecordField s a) = D1 ('MetaData "RecordField" "Dhall.Syntax.RecordField" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "RecordField" 'PrefixI 'True) ((S1 ('MetaSel ('Just "recordFieldSrc0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: S1 ('MetaSel ('Just "recordFieldValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))) :*: (S1 ('MetaSel ('Just "recordFieldSrc1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: S1 ('MetaSel ('Just "recordFieldSrc2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)))))

data FunctionBinding s a #

Record the label of a function or a function-type expression

For example,

λ({- A -} a {- B -} : {- C -} T) -> e

… will be instantiated as follows:

  • functionBindingSrc0 corresponds to the A comment
  • functionBindingVariable is a
  • functionBindingSrc1 corresponds to the B comment
  • functionBindingSrc2 corresponds to the C comment
  • functionBindingAnnotation is T

Instances

Instances details
Generic (FunctionBinding s a) 
Instance details

Defined in Dhall.Syntax.FunctionBinding

Associated Types

type Rep (FunctionBinding s a) :: Type -> Type #

Methods

from :: FunctionBinding s a -> Rep (FunctionBinding s a) x #

to :: Rep (FunctionBinding s a) x -> FunctionBinding s a #

type Rep (FunctionBinding s a) 
Instance details

Defined in Dhall.Syntax.FunctionBinding

type Rep (FunctionBinding s a) = D1 ('MetaData "FunctionBinding" "Dhall.Syntax.FunctionBinding" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "FunctionBinding" 'PrefixI 'True) ((S1 ('MetaSel ('Just "functionBindingSrc0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: S1 ('MetaSel ('Just "functionBindingVariable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "functionBindingSrc1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: (S1 ('MetaSel ('Just "functionBindingSrc2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe s)) :*: S1 ('MetaSel ('Just "functionBindingAnnotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr s a))))))

data ImportHashed #

A ImportType extended with an optional hash for semantic integrity checks

Instances

Instances details
Data ImportHashed 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportHashed -> c ImportHashed #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportHashed #

toConstr :: ImportHashed -> Constr #

dataTypeOf :: ImportHashed -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportHashed) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportHashed) #

gmapT :: (forall b. Data b => b -> b) -> ImportHashed -> ImportHashed #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportHashed -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportHashed -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImportHashed -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportHashed -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportHashed -> m ImportHashed #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportHashed -> m ImportHashed #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportHashed -> m ImportHashed #

Semigroup ImportHashed 
Instance details

Defined in Dhall.Syntax.Import

Generic ImportHashed 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportHashed :: Type -> Type #

Canonicalize ImportHashed 
Instance details

Defined in Dhall.Import

type Rep ImportHashed 
Instance details

Defined in Dhall.Syntax.Import

type Rep ImportHashed = D1 ('MetaData "ImportHashed" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "ImportHashed" 'PrefixI 'True) (S1 ('MetaSel ('Just "hash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SHA256Digest)) :*: S1 ('MetaSel ('Just "importType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportType)))

data ImportMode #

How to interpret the import's contents (i.e. as Dhall code or raw text)

Constructors

Code 
RawText 
Location 
RawBytes 

Instances

Instances details
Data ImportMode 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportMode -> c ImportMode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportMode #

toConstr :: ImportMode -> Constr #

dataTypeOf :: ImportMode -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportMode) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportMode) #

gmapT :: (forall b. Data b => b -> b) -> ImportMode -> ImportMode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportMode -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportMode -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImportMode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportMode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportMode -> m ImportMode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportMode -> m ImportMode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportMode -> m ImportMode #

Generic ImportMode 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportMode :: Type -> Type #

type Rep ImportMode 
Instance details

Defined in Dhall.Syntax.Import

type Rep ImportMode = D1 ('MetaData "ImportMode" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) ((C1 ('MetaCons "Code" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawText" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Location" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawBytes" 'PrefixI 'False) (U1 :: Type -> Type)))

data ImportType #

The type of import (i.e. local vs. remote vs. environment)

Constructors

Local FilePrefix File

Local path

Remote URL

URL of remote resource and optional headers stored in an import

Env Text

Environment variable

Missing 

Instances

Instances details
Data ImportType 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportType -> c ImportType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportType #

toConstr :: ImportType -> Constr #

dataTypeOf :: ImportType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportType) #

gmapT :: (forall b. Data b => b -> b) -> ImportType -> ImportType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportType -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImportType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportType -> m ImportType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportType -> m ImportType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportType -> m ImportType #

Semigroup ImportType 
Instance details

Defined in Dhall.Syntax.Import

Generic ImportType 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep ImportType :: Type -> Type #

Canonicalize ImportType 
Instance details

Defined in Dhall.Import

type Rep ImportType 
Instance details

Defined in Dhall.Syntax.Import

type Rep ImportType = D1 ('MetaData "ImportType" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) ((C1 ('MetaCons "Local" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePrefix) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File)) :+: C1 ('MetaCons "Remote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URL))) :+: (C1 ('MetaCons "Env" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Missing" 'PrefixI 'False) (U1 :: Type -> Type)))

data URL #

This type stores all of the components of a remote import

Constructors

URL 

Instances

Instances details
Data URL 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URL -> c URL #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URL #

toConstr :: URL -> Constr #

dataTypeOf :: URL -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c URL) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URL) #

gmapT :: (forall b. Data b => b -> b) -> URL -> URL #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URL -> r #

gmapQ :: (forall d. Data d => d -> u) -> URL -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URL -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URL -> m URL #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URL -> m URL #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URL -> m URL #

Generic URL 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep URL :: Type -> Type #

Methods

from :: URL -> Rep URL x #

to :: Rep URL x -> URL #

type Rep URL 
Instance details

Defined in Dhall.Syntax.Import

type Rep URL = D1 ('MetaData "URL" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "URL" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Scheme) :*: S1 ('MetaSel ('Just "authority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File) :*: (S1 ('MetaSel ('Just "query") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Expr Src Import)))))))

data Scheme #

The URI scheme

Constructors

HTTP 
HTTPS 

Instances

Instances details
Data Scheme 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scheme -> c Scheme #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Scheme #

toConstr :: Scheme -> Constr #

dataTypeOf :: Scheme -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Scheme) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Scheme) #

gmapT :: (forall b. Data b => b -> b) -> Scheme -> Scheme #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scheme -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scheme -> r #

gmapQ :: (forall d. Data d => d -> u) -> Scheme -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Scheme -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scheme -> m Scheme #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scheme -> m Scheme #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scheme -> m Scheme #

Generic Scheme 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep Scheme :: Type -> Type #

Methods

from :: Scheme -> Rep Scheme x #

to :: Rep Scheme x -> Scheme #

type Rep Scheme 
Instance details

Defined in Dhall.Syntax.Import

type Rep Scheme = D1 ('MetaData "Scheme" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "HTTP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HTTPS" 'PrefixI 'False) (U1 :: Type -> Type))

data FilePrefix #

The beginning of a file path which anchors subsequent path components

Constructors

Absolute

Absolute path

Here

Path relative to .

Parent

Path relative to ..

Home

Path relative to ~

Instances

Instances details
Data FilePrefix 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FilePrefix -> c FilePrefix #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FilePrefix #

toConstr :: FilePrefix -> Constr #

dataTypeOf :: FilePrefix -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FilePrefix) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FilePrefix) #

gmapT :: (forall b. Data b => b -> b) -> FilePrefix -> FilePrefix #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FilePrefix -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FilePrefix -> r #

gmapQ :: (forall d. Data d => d -> u) -> FilePrefix -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FilePrefix -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FilePrefix -> m FilePrefix #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FilePrefix -> m FilePrefix #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FilePrefix -> m FilePrefix #

Generic FilePrefix 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep FilePrefix :: Type -> Type #

type Rep FilePrefix 
Instance details

Defined in Dhall.Syntax.Import

type Rep FilePrefix = D1 ('MetaData "FilePrefix" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) ((C1 ('MetaCons "Absolute" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Here" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Parent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Home" 'PrefixI 'False) (U1 :: Type -> Type)))

data File #

A File is a directory followed by one additional path component representing the file name

Constructors

File 

Fields

Instances

Instances details
Data File 
Instance details

Defined in Dhall.Syntax.Import

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> File -> c File #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c File #

toConstr :: File -> Constr #

dataTypeOf :: File -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c File) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c File) #

gmapT :: (forall b. Data b => b -> b) -> File -> File #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> File -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> File -> r #

gmapQ :: (forall d. Data d => d -> u) -> File -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> File -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> File -> m File #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> File -> m File #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> File -> m File #

Semigroup File 
Instance details

Defined in Dhall.Syntax.Import

Methods

(<>) :: File -> File -> File #

sconcat :: NonEmpty File -> File #

stimes :: Integral b => b -> File -> File #

Generic File 
Instance details

Defined in Dhall.Syntax.Import

Associated Types

type Rep File :: Type -> Type #

Methods

from :: File -> Rep File x #

to :: Rep File x -> File #

Canonicalize File 
Instance details

Defined in Dhall.Import

Methods

canonicalize :: File -> File

type Rep File 
Instance details

Defined in Dhall.Syntax.Import

type Rep File = D1 ('MetaData "File" "Dhall.Syntax.Import" "dhall-1.42.0-KYLP0Bk1OLT52T5U2EOzRV" 'False) (C1 ('MetaCons "File" 'PrefixI 'True) (S1 ('MetaSel ('Just "directory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Directory) :*: S1 ('MetaSel ('Just "file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype ReifiedNormalizer a #

A reified Normalizer, which can be stored in structures without running into impredicative polymorphism.

type Normalizer a = NormalizerM Identity a #

An variation on NormalizerM for pure normalizers

type NormalizerM (m :: Type -> Type) a = forall s. Expr s a -> m (Maybe (Expr s a)) #

Use this to wrap you embedded functions (see normalizeWith) to make them polymorphic enough to be used.

data MultipleCheckFailed #

Exception thrown when the --check flag to a command-line subcommand fails

newtype CheckFailed #

A check failure corresponding to a single input. This type is intended to be used with MultipleCheckFailed for error reporting.

Constructors

CheckFailed Input 

data OutputMode #

Some command-line subcommands can either Write their input or Check that the input has already been modified. This type is shared between them to record that choice.

Constructors

Write 
Check 

data Output #

Path to output

data Transitivity #

Specifies whether or not an input's transitive dependencies should also be processed. Transitive dependencies are restricted to relative file imports.

Constructors

NonTransitive

Do not process transitive dependencies

Transitive

Process transitive dependencies in the same way

data Censor #

Set to Censor if you want to censor error text that might include secrets

Constructors

NoCensor 
Censor 

data SingletonConstructors #

This type specifies how to model a Haskell constructor with 1 field in Dhall

For example, consider the following Haskell datatype definition:

data Example = Foo { x :: Double } | Bar Double

Depending on which option you pick, the corresponding Dhall type could be:

< Foo : Double | Bar : Double >                   -- Bare
< Foo : { x : Double } | Bar : { _1 : Double } >  -- Wrapped
< Foo : { x : Double } | Bar : Double >           -- Smart

Constructors

Bare

Never wrap the field in a record

Wrapped

Always wrap the field in a record

Smart

Only fields in a record if they are named

newtype InputNormalizer #

This is only used by the FromDhall instance for functions in order to normalize the function input before marshaling the input into a Dhall expression.

data InterpretOptions #

Use these options to tweak how Dhall derives a generic implementation of FromDhall.

Constructors

InterpretOptions 

Fields

newtype UnionEncoder a #

UnionEncoder allows you to build an Encoder for a Dhall record.

For example, let's take the following Haskell data type:

>>> :{
data Status = Queued Natural
            | Result Text
            | Errored Text
:}

And assume that we have the following Dhall union that we would like to parse as a Status:

< Result : Text
| Queued : Natural
| Errored : Text
>.Result "Finish successfully"

Our encoder has type Encoder Status, but we can't build that out of any smaller encoders, as Encoders cannot be combined. However, we can use an UnionEncoder to build an Encoder for Status:

>>> :{
injectStatus :: Encoder Status
injectStatus = adapt >$< unionEncoder
  (   encodeConstructorWith "Queued"  inject
  >|< encodeConstructorWith "Result"  inject
  >|< encodeConstructorWith "Errored" inject
  )
  where
    adapt (Queued  n) = Left n
    adapt (Result  t) = Right (Left t)
    adapt (Errored e) = Right (Right e)
:}

Or, since we are simply using the ToDhall instance to inject each branch, we could write

>>> :{
injectStatus :: Encoder Status
injectStatus = adapt >$< unionEncoder
  (   encodeConstructor "Queued"
  >|< encodeConstructor "Result"
  >|< encodeConstructor "Errored"
  )
  where
    adapt (Queued  n) = Left n
    adapt (Result  t) = Right (Left t)
    adapt (Errored e) = Right (Right e)
:}

Constructors

UnionEncoder (Product (Const (Map Text (Expr Src Void)) :: Type -> Type) (Op (Text, Expr Src Void)) a) 

Instances

Instances details
Contravariant UnionEncoder 
Instance details

Defined in Dhall.Marshal.Encode

Methods

contramap :: (a' -> a) -> UnionEncoder a -> UnionEncoder a'

(>$) :: b -> UnionEncoder b -> UnionEncoder a

newtype RecordEncoder a #

The RecordEncoder divisible (contravariant) functor allows you to build an Encoder for a Dhall record.

For example, let's take the following Haskell data type:

>>> :{
data Project = Project
  { projectName :: Text
  , projectDescription :: Text
  , projectStars :: Natural
  }
:}

And assume that we have the following Dhall record that we would like to parse as a Project:

{ name =
    "dhall-haskell"
, description =
    "A configuration language guaranteed to terminate"
, stars =
    289
}

Our encoder has type Encoder Project, but we can't build that out of any smaller encoders, as Encoders cannot be combined (they are only Contravariants). However, we can use an RecordEncoder to build an Encoder for Project:

>>> :{
injectProject :: Encoder Project
injectProject =
  recordEncoder
    ( adapt >$< encodeFieldWith "name" inject
            >*< encodeFieldWith "description" inject
            >*< encodeFieldWith "stars" inject
    )
  where
    adapt (Project{..}) = (projectName, (projectDescription, projectStars))
:}

Or, since we are simply using the ToDhall instance to inject each field, we could write

>>> :{
injectProject :: Encoder Project
injectProject =
  recordEncoder
    ( adapt >$< encodeField "name"
            >*< encodeField "description"
            >*< encodeField "stars"
    )
  where
    adapt (Project{..}) = (projectName, (projectDescription, projectStars))
:}

Constructors

RecordEncoder (Map Text (Encoder a)) 

Instances

Instances details
Contravariant RecordEncoder 
Instance details

Defined in Dhall.Marshal.Encode

Methods

contramap :: (a' -> a) -> RecordEncoder a -> RecordEncoder a'

(>$) :: b -> RecordEncoder b -> RecordEncoder a

Divisible RecordEncoder 
Instance details

Defined in Dhall.Marshal.Encode

Methods

divide :: (a -> (b, c)) -> RecordEncoder b -> RecordEncoder c -> RecordEncoder a #

conquer :: RecordEncoder a #

class GenericToDhall (f :: Type -> Type) where #

This is the underlying class that powers the FromDhall class's support for automatically deriving a generic implementation.

Instances

Instances details
GenericToDhall (U1 :: Type -> Type) 
Instance details

Defined in Dhall.Marshal.Encode

(GenericToDhall (f :*: g), GenericToDhall (h :*: i)) => GenericToDhall ((f :*: g) :*: (h :*: i)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (((f :*: g) :*: (h :*: i)) a)) #

(GenericToDhall (f :*: g), Selector s, ToDhall a) => GenericToDhall ((f :*: g) :*: M1 S s (K1 i a :: Type -> Type)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (((f :*: g) :*: M1 S s (K1 i a)) a0)) #

(Selector s, ToDhall a, GenericToDhall (f :*: g)) => GenericToDhall (M1 S s (K1 i a :: Type -> Type) :*: (f :*: g)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder ((M1 S s (K1 i a) :*: (f :*: g)) a0)) #

(Selector s1, Selector s2, ToDhall a1, ToDhall a2) => GenericToDhall (M1 S s1 (K1 i1 a1 :: Type -> Type) :*: M1 S s2 (K1 i2 a2 :: Type -> Type)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder ((M1 S s1 (K1 i1 a1) :*: M1 S s2 (K1 i2 a2)) a)) #

(GenericToDhall (f :+: g), GenericToDhall (h :+: i)) => GenericToDhall ((f :+: g) :+: (h :+: i)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (((f :+: g) :+: (h :+: i)) a)) #

(Constructor c, GenericToDhall (f :+: g), GenericToDhall h) => GenericToDhall ((f :+: g) :+: M1 C c h) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (((f :+: g) :+: M1 C c h) a)) #

(Constructor c, GenericToDhall f, GenericToDhall (g :+: h)) => GenericToDhall (M1 C c f :+: (g :+: h)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder ((M1 C c f :+: (g :+: h)) a)) #

(Constructor c1, Constructor c2, GenericToDhall f1, GenericToDhall f2) => GenericToDhall (M1 C c1 f1 :+: M1 C c2 f2) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder ((M1 C c1 f1 :+: M1 C c2 f2) a)) #

GenericToDhall f => GenericToDhall (M1 C c f) 
Instance details

Defined in Dhall.Marshal.Encode

GenericToDhall f => GenericToDhall (M1 D d f) 
Instance details

Defined in Dhall.Marshal.Encode

(Selector s, ToDhall a) => GenericToDhall (M1 S s (K1 i a :: Type -> Type)) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

genericToDhallWithNormalizer :: InputNormalizer -> InterpretOptions -> State Int (Encoder (M1 S s (K1 i a) a0)) #

type Inject = ToDhall #

A compatibility alias for ToDhall

class ToDhall a where #

This class is used by FromDhall instance for functions:

instance (ToDhall a, FromDhall b) => FromDhall (a -> b)

You can convert Dhall functions with "simple" inputs (i.e. instances of this class) into Haskell functions. This works by:

  • Marshaling the input to the Haskell function into a Dhall expression (i.e. x :: Expr Src Void)
  • Applying the Dhall function (i.e. f :: Expr Src Void) to the Dhall input (i.e. App f x)
  • Normalizing the syntax tree (i.e. normalize (App f x))
  • Marshaling the resulting Dhall expression back into a Haskell value

This class auto-generates a default implementation for types that implement Generic. This does not auto-generate an instance for recursive types.

The default instance can be tweaked using genericToDhallWith/genericToDhallWithInputNormalizer and custom InterpretOptions, or using DerivingVia and Codec from Dhall.Deriving.

Minimal complete definition

Nothing

Instances

Instances details
ToDhall Void 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Int16 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Int32 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Int64 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Int8 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Word16

Encode a Word16 to a Dhall Natural.

>>> embed inject (12 :: Word16)
NaturalLit 12
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Word32

Encode a Word32 to a Dhall Natural.

>>> embed inject (12 :: Word32)
NaturalLit 12
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Word64

Encode a Word64 to a Dhall Natural.

>>> embed inject (12 :: Word64)
NaturalLit 12
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Word8

Encode a Word8 to a Dhall Natural.

>>> embed inject (12 :: Word8)
NaturalLit 12
Instance details

Defined in Dhall.Marshal.Encode

ToDhall ByteString 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall ByteString 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall ShortByteString 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Scientific 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Text 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Text 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall ShortText 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Day 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall DayOfWeek 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall UTCTime 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall LocalTime 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall TimeOfDay 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall TimeZone 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall ZonedTime 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall String 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Integer 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Natural 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall () 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Bool 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Double 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Int 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall Word

Encode a Word to a Dhall Natural.

>>> embed inject (12 :: Word)
NaturalLit 12
Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall (Seq a) 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall (Set a)

Note that the output list will be sorted.

>>> let x = Data.Set.fromList ["mom", "hi" :: Text]
>>> prettyExpr $ embed inject x
[ "hi", "mom" ]
Instance details

Defined in Dhall.Marshal.Encode

(Functor f, ToDhall (f (Result f))) => ToDhall (Fix f) 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall (f (Result f)) => ToDhall (Result f) 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall (HashSet a)

Note that the output list may not be sorted

Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall (Vector a) 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall (Maybe a) 
Instance details

Defined in Dhall.Marshal.Encode

ToDhall a => ToDhall [a] 
Instance details

Defined in Dhall.Marshal.Encode

(ToDhall k, ToDhall v) => ToDhall (Map k v)

Embed a Map as a Prelude.Map.Type.

>>> prettyExpr $ embed inject (Data.Map.fromList [(1 :: Natural, True)])
[ { mapKey = 1, mapValue = True } ]
>>> prettyExpr $ embed inject (Data.Map.fromList [] :: Data.Map.Map Natural Bool)
[] : List { mapKey : Natural, mapValue : Bool }
Instance details

Defined in Dhall.Marshal.Encode

(ToDhall k, ToDhall v) => ToDhall (HashMap k v)

Embed a HashMap as a Prelude.Map.Type.

>>> prettyExpr $ embed inject (HashMap.fromList [(1 :: Natural, True)])
[ { mapKey = 1, mapValue = True } ]
>>> prettyExpr $ embed inject (HashMap.fromList [] :: HashMap Natural Bool)
[] : List { mapKey : Natural, mapValue : Bool }
Instance details

Defined in Dhall.Marshal.Encode

(ToDhall a, ToDhall b) => ToDhall (a, b) 
Instance details

Defined in Dhall.Marshal.Encode

Methods

injectWith :: InputNormalizer -> Encoder (a, b) #

data Encoder a #

An (Encoder a) represents a way to marshal a value of type 'a' from Haskell into Dhall.

Constructors

Encoder 

Fields

Instances

Instances details
Contravariant Encoder 
Instance details

Defined in Dhall.Marshal.Encode

Methods

contramap :: (a' -> a) -> Encoder a -> Encoder a'

(>$) :: b -> Encoder b -> Encoder a

type ExpectedTypeErrors = DhallErrors ExpectedTypeError #

One or more errors returned when determining the Dhall type of a Haskell expression.

type Expector = Validation ExpectedTypeErrors #

Useful synonym for the Validation type used when marshalling Dhall expressions.

data InvalidDecoder s a #

Every Decoder must obey the contract that if an expression's type matches the expected type then the extract function must not fail with a type error. However, decoding may still fail for other reasons (such as the decoder for Sets rejecting a Dhall List with duplicate elements).

This error type is used to indicate an internal error in the implementation of a Decoder where the expected type matched the Dhall expression, but the expression supplied to the extraction function did not match the expected type. If this happens that means that the Decoder itself needs to be fixed.

Instances

Instances details
(Pretty s, Typeable s, Pretty a, Typeable a) => Exception (InvalidDecoder s a) 
Instance details

Defined in Dhall.Marshal.Decode

(Pretty s, Pretty a, Typeable s, Typeable a) => Show (InvalidDecoder s a) 
Instance details

Defined in Dhall.Marshal.Decode

(Eq s, Eq a) => Eq (InvalidDecoder s a) 
Instance details

Defined in Dhall.Marshal.Decode

type MonadicExtractor s a = Either (ExtractErrors s a) #

Useful synonym for the equivalent Either type used when marshalling Dhall code.

type Extractor s a = Validation (ExtractErrors s a) #

Useful synonym for the Validation type used when marshalling Dhall expressions.

data ExtractError s a #

Extraction of a value can fail for two reasons, either a type mismatch (which should not happen, as expressions are type-checked against the expected type before being passed to extract), or a term-level error, described with a freeform text value.

Instances

Instances details
(Pretty s, Pretty a, Typeable s, Typeable a) => Exception (ExtractError s a) 
Instance details

Defined in Dhall.Marshal.Decode

(Pretty s, Pretty a, Typeable s, Typeable a) => Show (ExtractError s a) 
Instance details

Defined in Dhall.Marshal.Decode

(Pretty s, Pretty a, Typeable s, Typeable a) => Show (ExtractErrors s a) 
Instance details

Defined in Dhall.Marshal.Decode

(Eq s, Eq a) => Eq (ExtractError s a) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

(==) :: ExtractError s a -> ExtractError s a -> Bool #

(/=) :: ExtractError s a -> ExtractError s a -> Bool #

type ExtractErrors s a = DhallErrors (ExtractError s a) #

One or more errors returned from extracting a Dhall expression to a Haskell expression.

newtype UnionDecoder a #

The UnionDecoder monoid allows you to build a Decoder from a Dhall union.

For example, let's take the following Haskell data type:

>>> :{
data Status = Queued Natural
            | Result Text
            | Errored Text
:}

And assume that we have the following Dhall union that we would like to parse as a Status:

< Result : Text
| Queued : Natural
| Errored : Text
>.Result "Finish successfully"

Our decoder has type Decoder Status, but we can't build that out of any smaller decoders, as Decoders cannot be combined (they are only Functors). However, we can use a UnionDecoder to build a Decoder for Status:

>>> :{
status :: Decoder Status
status = union
  (  ( Queued  <$> constructor "Queued"  natural )
  <> ( Result  <$> constructor "Result"  strictText )
  <> ( Errored <$> constructor "Errored" strictText )
  )
:}

Constructors

UnionDecoder (Compose (Map Text) Decoder a) 

Instances

Instances details
Functor UnionDecoder 
Instance details

Defined in Dhall.Marshal.Decode

Methods

fmap :: (a -> b) -> UnionDecoder a -> UnionDecoder b #

(<$) :: a -> UnionDecoder b -> UnionDecoder a #

Monoid (UnionDecoder a) 
Instance details

Defined in Dhall.Marshal.Decode

Semigroup (UnionDecoder a) 
Instance details

Defined in Dhall.Marshal.Decode

newtype RecordDecoder a #

The RecordDecoder applicative functor allows you to build a Decoder from a Dhall record.

For example, let's take the following Haskell data type:

>>> :{
data Project = Project
  { projectName :: Text
  , projectDescription :: Text
  , projectStars :: Natural
  }
:}

And assume that we have the following Dhall record that we would like to parse as a Project:

{ name =
    "dhall-haskell"
, description =
    "A configuration language guaranteed to terminate"
, stars =
    289
}

Our decoder has type Decoder Project, but we can't build that out of any smaller decoders, as Decoders cannot be combined (they are only Functors). However, we can use a RecordDecoder to build a Decoder for Project:

>>> :{
project :: Decoder Project
project =
  record
    ( Project <$> field "name" strictText
              <*> field "description" strictText
              <*> field "stars" natural
    )
:}

Constructors

RecordDecoder (Product (Const (Map Text (Expector (Expr Src Void))) :: Type -> Type) (Compose ((->) (Expr Src Void)) (Extractor Src Void)) a) 

Instances

Instances details
Applicative RecordDecoder 
Instance details

Defined in Dhall.Marshal.Decode

Functor RecordDecoder 
Instance details

Defined in Dhall.Marshal.Decode

Methods

fmap :: (a -> b) -> RecordDecoder a -> RecordDecoder b #

(<$) :: a -> RecordDecoder b -> RecordDecoder a #

class GenericFromDhallUnion (t :: k) (f :: k1 -> Type) where #

This is the underlying class that powers the FromDhall class's support for automatically deriving a generic implementation for a union type.

Instances

Instances details
(GenericFromDhallUnion t f1, GenericFromDhallUnion t f2) => GenericFromDhallUnion (t :: k1) (f1 :+: f2 :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericUnionAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> UnionDecoder ((f1 :+: f2) a) #

(Constructor c1, GenericFromDhall t f1) => GenericFromDhallUnion (t :: k1) (M1 C c1 f1 :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericUnionAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> UnionDecoder (M1 C c1 f1 a) #

class GenericFromDhall (t :: k) (f :: k1 -> Type) where #

This is the underlying class that powers the FromDhall class's support for automatically deriving a generic implementation.

Methods

genericAutoWithNormalizer :: forall (a :: k1). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (f a)) #

Instances

Instances details
GenericFromDhall (t :: k1) (U1 :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (U1 a)) #

GenericFromDhall (t :: k1) (V1 :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (V1 a)) #

GenericFromDhall (a1 :: Type) (M1 S s1 (K1 i1 a1 :: k -> Type) :*: M1 S s2 (K1 i2 a2 :: k -> Type) :: k -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k1). Proxy a1 -> InputNormalizer -> InterpretOptions -> State Int (Decoder ((M1 S s1 (K1 i1 a1) :*: M1 S s2 (K1 i2 a2)) a)) #

GenericFromDhall (a2 :: Type) (M1 S s1 (K1 i1 a1 :: k -> Type) :*: M1 S s2 (K1 i2 a2 :: k -> Type) :: k -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k1). Proxy a2 -> InputNormalizer -> InterpretOptions -> State Int (Decoder ((M1 S s1 (K1 i1 a1) :*: M1 S s2 (K1 i2 a2)) a)) #

(GenericFromDhall t (f :*: g), GenericFromDhall t (h :*: i)) => GenericFromDhall (t :: k1) ((f :*: g) :*: (h :*: i) :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (((f :*: g) :*: (h :*: i)) a)) #

(GenericFromDhall t (f :*: g), Selector s, FromDhall a) => GenericFromDhall (t :: k1) ((f :*: g) :*: M1 S s (K1 i a :: k2 -> Type) :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a0 :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (((f :*: g) :*: M1 S s (K1 i a)) a0)) #

(Selector s, FromDhall a, GenericFromDhall t (f :*: g)) => GenericFromDhall (t :: k1) (M1 S s (K1 i a :: k2 -> Type) :*: (f :*: g) :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a0 :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder ((M1 S s (K1 i a) :*: (f :*: g)) a0)) #

(Selector s1, Selector s2, FromDhall a1, FromDhall a2) => GenericFromDhall (t :: k1) (M1 S s1 (K1 i1 a1 :: k2 -> Type) :*: M1 S s2 (K1 i2 a2 :: k2 -> Type) :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder ((M1 S s1 (K1 i1 a1) :*: M1 S s2 (K1 i2 a2)) a)) #

GenericFromDhallUnion t (f :+: g) => GenericFromDhall (t :: k1) (f :+: g :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder ((f :+: g) a)) #

GenericFromDhall (a :: Type) (M1 S s (K1 i a :: k -> Type) :: k -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a0 :: k1). Proxy a -> InputNormalizer -> InterpretOptions -> State Int (Decoder (M1 S s (K1 i a) a0)) #

GenericFromDhall t f => GenericFromDhall (t :: k1) (M1 C c f :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (M1 C c f a)) #

GenericFromDhall t f => GenericFromDhall (t :: k1) (M1 D d f :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (M1 D d f a)) #

(Selector s, FromDhall a) => GenericFromDhall (t :: k1) (M1 S s (K1 i a :: k2 -> Type) :: k2 -> Type) 
Instance details

Defined in Dhall.Marshal.Decode

Methods

genericAutoWithNormalizer :: forall (a0 :: k10). Proxy t -> InputNormalizer -> InterpretOptions -> State Int (Decoder (M1 S s (K1 i a) a0)) #

type Interpret = FromDhall #

A compatibility alias for FromDhall.

class HasEvaluateSettings s where #

Since: dhall-1.16

data EvaluateSettings #

Since: dhall-1.16

Instances

Instances details
HasEvaluateSettings EvaluateSettings 
Instance details

Defined in Dhall

data InputSettings #

Since: dhall-1.16

Instances

Instances details
HasEvaluateSettings InputSettings 
Instance details

Defined in Dhall

scientific :: Decoder Scientific #

Decode a Scientific.

>>> input scientific "1e100"
1.0e100

vector :: Decoder a -> Decoder (Vector a) #

Decode a Vector.

>>> input (vector natural) "[1, 2, 3]"
[1,2,3]

void :: Decoder Void #

Decode Void from an empty union.

Since <> is uninhabited, input void will always fail.

map :: Ord k => Decoder k -> Decoder v -> Decoder (Map k v) #

Decode a Map from a toMap expression or generally a Prelude.Map.Type.

>>> input (Dhall.map strictText bool) "toMap { a = True, b = False }"
fromList [("a",True),("b",False)]
>>> input (Dhall.map strictText bool) "[ { mapKey = \"foo\", mapValue = True } ]"
fromList [("foo",True)]

If there are duplicate mapKeys, later mapValues take precedence:

>>> let expr = "[ { mapKey = 1, mapValue = True }, { mapKey = 1, mapValue = False } ]"
>>> input (Dhall.map natural bool) expr
fromList [(1,False)]

function :: Encoder a -> Decoder b -> Decoder (a -> b) #

Decode a Dhall function into a Haskell function.

>>> f <- input (function inject bool) "Natural/even" :: IO (Natural -> Bool)
>>> f 0
True
>>> f 1
False

unit :: Decoder () #

Decode () from an empty record.

>>> input unit "{=}"  -- GHC doesn't print the result if it is ()

insert :: Pretty a => a -> Doc Ann #

Function to insert an aligned pretty expression

union :: UnionDecoder a -> Decoder a #

Run a UnionDecoder to build a Decoder.

pair :: Decoder a -> Decoder b -> Decoder (a, b) #

Given a pair of Decoders, decode a tuple-record into their pairing.

>>> input (pair natural bool) "{ _1 = 42, _2 = False }"
(42,False)

bool :: Decoder Bool #

Decode a Bool.

>>> input bool "True"
True

list :: Decoder a -> Decoder [a] #

Decode a list.

>>> input (list natural) "[1, 2, 3]"
[1,2,3]

(>*<) :: Divisible f => f a -> f b -> f (a, b) infixr 5 #

Infix divided

lazyText :: Decoder Text #

Decode lazy Text.

>>> input lazyText "\"Test\""
"Test"

shortText :: Decoder ShortText #

Decode ShortText.

>>> input shortText "\"Test\""
"Test"

string :: Decoder String #

Decode a String

>>> input string "\"ABC\""
"ABC"

int8 :: Decoder Int8 #

Decode an Int8 from a Dhall Integer.

>>> input int8 "-42"
-42

int16 :: Decoder Int16 #

Decode an Int16 from a Dhall Integer.

>>> input int16 "-42"
-42

int32 :: Decoder Int32 #

Decode an Int32 from a Dhall Integer.

>>> input int32 "-42"
-42

int64 :: Decoder Int64 #

Decode an Int64 from a Dhall Integer.

>>> input int64 "-42"
-42

int :: Decoder Int #

Decode an Int from a Dhall Integer.

>>> input int "-42"
-42

word8 :: Decoder Word8 #

Decode a Word8 from a Dhall Natural.

>>> input word8 "42"
42

word16 :: Decoder Word16 #

Decode a Word16 from a Dhall Natural.

>>> input word16 "42"
42

word32 :: Decoder Word32 #

Decode a Word32 from a Dhall Natural.

>>> input word32 "42"
42

word64 :: Decoder Word64 #

Decode a Word64 from a Dhall Natural.

>>> input word64 "42"
42

word :: Decoder Word #

Decode a Word from a Dhall Natural.

>>> input word "42"
42

integer :: Decoder Integer #

Decode an Integer.

>>> input integer "+42"
42

double :: Decoder Double #

Decode a Double.

>>> input double "42.0"
42.0

day :: Decoder Day #

Decode Day

>>> input day "2000-01-01"
2000-01-01

localTime :: Decoder LocalTime #

Decode LocalTime

>>> input localTime "2020-01-01T12:34:56"
2020-01-01 12:34:56

utcTime :: Decoder UTCTime #

Decode UTCTime

>>> input utcTime "2020-01-01T12:34:56+02:00"
2020-01-01 10:34:56 UTC

timeOfDay :: Decoder TimeOfDay #

Decode TimeOfDay

>>> input timeOfDay "00:00:00"
00:00:00

zonedTime :: Decoder ZonedTime #

Decode ZonedTime

>>> input zonedTime "2020-01-01T12:34:56+02:00"
2020-01-01 12:34:56 +0200

normalize :: Eq a => Expr s a -> Expr t a #

Reduce an expression to its normal form, performing beta reduction

normalize does not type-check the expression. You may want to type-check expressions before normalizing them since normalization can convert an ill-typed expression into a well-typed expression.

normalize can also fail with error if you normalize an ill-typed expression

sequence :: Decoder a -> Decoder (Seq a) #

Decode a Seq.

>>> input (sequence natural) "[1, 2, 3]"
fromList [1,2,3]

shift :: Int -> Var -> Expr s a -> Expr s a #

shift is used by both normalization and type-checking to avoid variable capture by shifting variable indices

For example, suppose that you were to normalize the following expression:

λ(a : Type) → λ(x : a) → (λ(y : a) → λ(x : a) → y) x

If you were to substitute y with x without shifting any variable indices, then you would get the following incorrect result:

λ(a : Type) → λ(x : a) → λ(x : a) → x  -- Incorrect normalized form

In order to substitute x in place of y we need to shift x by 1 in order to avoid being misinterpreted as the x bound by the innermost lambda. If we perform that shift then we get the correct result:

λ(a : Type) → λ(x : a) → λ(x : a) → x@1

As a more worked example, suppose that you were to normalize the following expression:

    λ(a : Type)
→   λ(f : a → a → a)
→   λ(x : a)
→   λ(x : a)
→   (λ(x : a) → f x x@1) x@1

The correct normalized result would be:

    λ(a : Type)
→   λ(f : a → a → a)
→   λ(x : a)
→   λ(x : a)
→   f x@1 x

The above example illustrates how we need to both increase and decrease variable indices as part of substitution:

  • We need to increase the index of the outer x@1 to x@2 before we substitute it into the body of the innermost lambda expression in order to avoid variable capture. This substitution changes the body of the lambda expression to (f x@2 x@1)
  • We then remove the innermost lambda and therefore decrease the indices of both xs in (f x@2 x@1) to (f x@1 x) in order to reflect that one less x variable is now bound within that scope

Formally, (shift d (V x n) e) modifies the expression e by adding d to the indices of all variables named x whose indices are greater than (n + m), where m is the number of bound variables of the same name within that scope

In practice, d is always 1 or -1 because we either:

  • increment variables by 1 to avoid variable capture during substitution
  • decrement variables by 1 when deleting lambdas after substitution

n starts off at 0 when substitution begins and increments every time we descend into a lambda or let expression that binds a variable of the same name in order to avoid shifting the bound variables by mistake.

(>$<) :: Contravariant f => (a -> b) -> f b -> f a #

maybe :: Decoder a -> Decoder (Maybe a) #

Decode a Maybe.

>>> input (maybe natural) "Some 1"
Just 1

typeError :: Expector (Expr s a) -> Expr s a -> Extractor s a b #

Generate a type error during extraction by specifying the expected type and the actual type. The expected type is not yet determined.

internalError :: Text -> forall b. b #

Utility function used to throw internal errors that should never happen (in theory) but that are not enforced by the type system

input #

Arguments

:: Decoder a

The decoder for the Dhall value

-> Text

The Dhall program

-> IO a

The decoded value in Haskell

Type-check and evaluate a Dhall program, decoding the result into Haskell

The first argument determines the type of value that you decode:

>>> input integer "+2"
2
>>> input (vector double) "[1.0, 2.0]"
[1.0,2.0]

Use auto to automatically select which type to decode based on the inferred return type:

>>> input auto "True" :: IO Bool
True

This uses the settings from defaultInputSettings.

makeFieldSelection :: Text -> FieldSelection s #

Smart constructor for FieldSelection with no src information

makeRecordField :: Expr s a -> RecordField s a #

Construct a RecordField with no src information

recordFieldExprs :: Applicative f => (Expr s a -> f (Expr s b)) -> RecordField s a -> f (RecordField s b) #

Traverse over the immediate Expr children in a RecordField.

makeFunctionBinding :: Text -> Expr s a -> FunctionBinding s a #

Smart constructor for FunctionBinding with no src information

functionBindingExprs :: Applicative f => (Expr s a -> f (Expr s b)) -> FunctionBinding s a -> f (FunctionBinding s b) #

Traverse over the immediate Expr children in a FunctionBinding.

makeBinding :: Text -> Expr s a -> Binding s a #

Construct a Binding with no source information and no type annotation.

bindingExprs :: Applicative f => (Expr s a -> f (Expr s b)) -> Binding s a -> f (Binding s b) #

Traverse over the immediate Expr children in a Binding.

snip :: Text -> Text #

Utility function to cut out the interior of a large text block

chunkExprs :: Applicative f => (Expr s a -> f (Expr t b)) -> Chunks s a -> f (Chunks t b) #

A traversal over the immediate sub-expressions in Chunks.

multiLet :: Binding s a -> Expr s a -> MultiLet s a #

Generate a MultiLet from the contents of a Let.

In the resulting MultiLet bs e, e is guaranteed not to be a Let, but it might be a (Note … (Let …)).

Given parser output, multiLet consolidates lets that formed a let-block in the original source.

wrapInLets :: Foldable f => f (Binding s a) -> Expr s a -> Expr s a #

Wrap let-Bindings around an Expr.

wrapInLets can be understood as an inverse for multiLet:

let MultiLet bs e1 = multiLet b e0

wrapInLets bs e1 == Let b e0

subExpressions :: Applicative f => (Expr s a -> f (Expr s a)) -> Expr s a -> f (Expr s a) #

A traversal over the immediate sub-expressions of an expression.

subExpressionsWith :: Applicative f => (a -> f (Expr s b)) -> (Expr s a -> f (Expr s b)) -> Expr s a -> f (Expr s b) #

A traversal over the immediate sub-expressions of an expression which allows mapping embedded values

denote :: Expr s a -> Expr t a #

Remove all Note constructors from an Expr (i.e. de-Note)

This also remove CharacterSet annotations.

renote :: Expr Void a -> Expr s a #

The "opposite" of denote, like first absurd but faster

shallowDenote :: Expr s a -> Expr s a #

Remove any outermost Note constructors

This is typically used when you want to get the outermost non-Note constructor without removing internal Note constructors

reservedIdentifiers :: HashSet Text #

The set of reserved identifiers for the Dhall language | Contains also all keywords from "reservedKeywords"

pathCharacter :: Char -> Bool #

Returns True if the given Char is valid within an unquoted path component

This is exported for reuse within the Dhall.Parser.Token module

textShow :: Text -> Text #

Utility that powers the Text/show built-in

judgmentallyEqual :: Eq a => Expr s a -> Expr t a -> Bool #

Returns True if two expressions are α-equivalent and β-equivalent and False otherwise

judgmentallyEqual can fail with an error if you compare ill-typed expressions

subst :: Var -> Expr s a -> Expr s a -> Expr s a #

Substitute all occurrences of a variable with an expression

subst x C B  ~  B[x := C]

alphaNormalize :: Expr s a -> Expr s a #

α-normalize an expression by renaming all bound variables to "_" and using De Bruijn indices to distinguish them

>>> mfb = Syntax.makeFunctionBinding
>>> alphaNormalize (Lam mempty (mfb "a" (Const Type)) (Lam mempty (mfb "b" (Const Type)) (Lam mempty (mfb "x" "a") (Lam mempty (mfb "y" "b") "x"))))
Lam Nothing (FunctionBinding {functionBindingSrc0 = Nothing, functionBindingVariable = "_", functionBindingSrc1 = Nothing, functionBindingSrc2 = Nothing, functionBindingAnnotation = Const Type}) (Lam Nothing (FunctionBinding {functionBindingSrc0 = Nothing, functionBindingVariable = "_", functionBindingSrc1 = Nothing, functionBindingSrc2 = Nothing, functionBindingAnnotation = Const Type}) (Lam Nothing (FunctionBinding {functionBindingSrc0 = Nothing, functionBindingVariable = "_", functionBindingSrc1 = Nothing, functionBindingSrc2 = Nothing, functionBindingAnnotation = Var (V "_" 1)}) (Lam Nothing (FunctionBinding {functionBindingSrc0 = Nothing, functionBindingVariable = "_", functionBindingSrc1 = Nothing, functionBindingSrc2 = Nothing, functionBindingAnnotation = Var (V "_" 1)}) (Var (V "_" 1)))))

α-normalization does not affect free variables:

>>> alphaNormalize "x"
Var (V "x" 0)

normalizeWith :: Eq a => Maybe (ReifiedNormalizer a) -> Expr s a -> Expr t a #

Reduce an expression to its normal form, performing beta reduction and applying any custom definitions.

normalizeWith is designed to be used with function typeWith. The typeWith function allows typing of Dhall functions in a custom typing context whereas normalizeWith allows evaluating Dhall expressions in a custom context.

To be more precise normalizeWith applies the given normalizer when it finds an application term that it cannot reduce by other means.

Note that the context used in normalization will determine the properties of normalization. That is, if the functions in custom context are not total then the Dhall language, evaluated with those functions is not total either.

normalizeWith can fail with an error if you normalize an ill-typed expression

normalizeWithM :: (Monad m, Eq a) => NormalizerM m a -> Expr s a -> m (Expr t a) #

This function generalizes normalizeWith by allowing the custom normalizer to use an arbitrary Monad

normalizeWithM can fail with an error if you normalize an ill-typed expression

isNormalizedWith :: (Eq s, Eq a) => Normalizer a -> Expr s a -> Bool #

Check if an expression is in a normal form given a context of evaluation. Unlike isNormalized, this will fully normalize and traverse through the expression.

It is much more efficient to use isNormalized.

isNormalizedWith can fail with an error if you check an ill-typed expression

isNormalized :: Eq a => Expr s a -> Bool #

Quickly check if an expression is in normal form

Given a well-typed expression e, isNormalized e is equivalent to e == normalize e.

Given an ill-typed expression, isNormalized may fail with an error, or evaluate to either False or True!

freeIn :: Eq a => Var -> Expr s a -> Bool #

Detect if the given variable is free within the given expression

>>> "x" `freeIn` "x"
True
>>> "x" `freeIn` "y"
False
>>> "x" `freeIn` Lam mempty (Syntax.makeFunctionBinding "x" (Const Type)) "x"
False

escapeText :: Text -> Text #

Escape a Text literal using Dhall's escaping rules

Note that the result does not include surrounding quotes

censorExpression :: Expr Src a -> Expr Src a #

Utility used to implement the --censor flag, by:

  • Replacing all Src text with spaces
  • Replacing all Text literals inside type errors with spaces

censorText :: Text -> Text #

Utility used to censor Text by replacing all characters with a space

throws :: (Exception e, MonadIO io) => Either e a -> io a #

Convenience utility for converting Either-based exceptions to IO-based exceptions

snipDoc :: Doc Ann -> Doc a #

Like snip, but for Docs

Note that this has to be opinionated and render ANSI color codes, but that should be fine because we don't use this in a non-interactive context

_ERROR :: IsString string => string #

Prefix used for error messages

handleMultipleChecksFailed :: (Foldable t, Traversable t) => Text -> Text -> (a -> IO (Either CheckFailed ())) -> t a -> IO () #

Run IO for multiple inputs, then collate all the check failures before throwing if there was any failure

getExpression :: Censor -> Input -> IO (Expr Src Import) #

Convenient utility for retrieving an expression

getExpressionAndHeader :: Censor -> Input -> IO (Header, Expr Src Import) #

Convenient utility for retrieving an expression along with its header

getExpressionAndHeaderFromStdinText :: Censor -> String -> Text -> IO (Header, Expr Src Import) #

Convenient utility for retrieving an expression along with its header from | text already read from STDIN (so it's not re-read)

renderExpression :: Pretty a => CharacterSet -> Bool -> Maybe FilePath -> Expr Src a -> IO () #

Convenient utility to output an expression either to a file or to stdout.

defaultInputNormalizer :: InputNormalizer #

Default normalization-related settings (no custom normalization)

defaultInterpretOptions :: InterpretOptions #

Default interpret options for generics-based instances, which you can tweak or override, like this:

genericAutoWith
    (defaultInterpretOptions { fieldModifier = Data.Text.Lazy.dropWhile (== '_') })

inject :: ToDhall a => Encoder a #

Use the default input normalizer for injecting a value.

inject = injectWith defaultInputNormalizer

genericToDhall :: (Generic a, GenericToDhall (Rep a)) => Encoder a #

Use the default options for injecting a value, whose structure is determined generically.

This can be used when you want to use ToDhall on types that you don't want to define orphan instances for.

genericToDhallWith :: (Generic a, GenericToDhall (Rep a)) => InterpretOptions -> Encoder a #

Use custom options for injecting a value, whose structure is determined generically.

This can be used when you want to use ToDhall on types that you don't want to define orphan instances for.

recordEncoder :: RecordEncoder a -> Encoder a #

Convert a RecordEncoder into the equivalent Encoder.

encodeField :: ToDhall a => Text -> RecordEncoder a #

Specify how to encode one field of a record using the default ToDhall instance for that type.

encodeFieldWith :: Text -> Encoder a -> RecordEncoder a #

Specify how to encode one field of a record by supplying an explicit Encoder for that field.

unionEncoder :: UnionEncoder a -> Encoder a #

Convert a UnionEncoder into the equivalent Encoder.

encodeConstructor :: ToDhall a => Text -> UnionEncoder a #

Specify how to encode an alternative by using the default ToDhall instance for that type.

encodeConstructorWith :: Text -> Encoder a -> UnionEncoder a #

Specify how to encode an alternative by providing an explicit Encoder for that alternative.

(>|<) :: UnionEncoder a -> UnionEncoder b -> UnionEncoder (Either a b) infixr 5 #

Combines two UnionEncoder values. See UnionEncoder for usage notes.

Ideally, this matches chosen; however, this allows UnionEncoder to not need a Divisible instance itself (since no instance is possible).

substitutions :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Substitutions Src Void) #

Access the custom substitutions.

Since: dhall-1.30

normalizer :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Maybe (ReifiedNormalizer Void)) #

Access the custom normalizer.

Since: dhall-1.16

startingContext :: (Functor f, HasEvaluateSettings s) => LensLike' f s (Context (Expr Src Void)) #

Access the starting context used for evaluation and type-checking.

Since: dhall-1.16

auto :: FromDhall a => Decoder a #

Use the default input normalizer for interpreting an input.

auto = autoWith defaultInputNormalizer

genericAuto :: (Generic a, GenericFromDhall a (Rep a)) => Decoder a #

genericAuto is the default implementation for auto if you derive FromDhall. The difference is that you can use genericAuto without having to explicitly provide a FromDhall instance for a type as long as the type derives Generic.

natural :: Decoder Natural #

Decode a Natural.

>>> input natural "42"
42

shortBytes :: Decoder ShortByteString #

Decode a ShortByteString

>>> input shortBytes "0x\"00FF\""
"\NUL\255"

lazyBytes :: Decoder ByteString #

Decode a lazy ByteString.

>>> input lazyBytes "0x\"00FF\""
"\NUL\255"

strictBytes :: Decoder ByteString #

Decode a strict ByteString

>>> input strictBytes "0x\"00FF\""
"\NUL\255"

strictText :: Decoder Text #

Decode strict Text.

>>> input strictText "\"Test\""
"Test"

timeZone :: Decoder TimeZone #

Decode TimeZone

>>> input timeZone "+00:00"
+0000

dayOfWeek :: Decoder DayOfWeek #

Decode DayOfWeek

>>> input dayOfWeek "< Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday >.Monday"
Monday

functionWith :: InputNormalizer -> Encoder a -> Decoder b -> Decoder (a -> b) #

Decode a Dhall function into a Haskell function using the specified normalizer.

>>> f <- input (functionWith defaultInputNormalizer inject bool) "Natural/even" :: IO (Natural -> Bool)
>>> f 0
True
>>> f 1
False

setIgnoringDuplicates :: Ord a => Decoder a -> Decoder (Set a) #

Decode a Set from a List.

>>> input (setIgnoringDuplicates natural) "[1, 2, 3]"
fromList [1,2,3]

Duplicate elements are ignored.

>>> input (setIgnoringDuplicates natural) "[1, 1, 3]"
fromList [1,3]

hashSetIgnoringDuplicates :: (Hashable a, Ord a) => Decoder a -> Decoder (HashSet a) #

Decode a HashSet from a List.

>>> input (hashSetIgnoringDuplicates natural) "[1, 2, 3]"
fromList [1,2,3]

Duplicate elements are ignored.

>>> input (hashSetIgnoringDuplicates natural) "[1, 1, 3]"
fromList [1,3]

setFromDistinctList :: (Ord a, Show a) => Decoder a -> Decoder (Set a) #

Decode a Set from a List with distinct elements.

>>> input (setFromDistinctList natural) "[1, 2, 3]"
fromList [1,2,3]

An error is thrown if the list contains duplicates.

>>> input (setFromDistinctList natural) "[1, 1, 3]"
*** Exception: Error: Failed extraction

The expression type-checked successfully but the transformation to the target
type failed with the following error:

One duplicate element in the list: 1
>>> input (setFromDistinctList natural) "[1, 1, 3, 3]"
*** Exception: Error: Failed extraction

The expression type-checked successfully but the transformation to the target
type failed with the following error:

2 duplicates were found in the list, including 1

hashSetFromDistinctList :: (Hashable a, Ord a, Show a) => Decoder a -> Decoder (HashSet a) #

Decode a HashSet from a List with distinct elements.

>>> input (hashSetFromDistinctList natural) "[1, 2, 3]"
fromList [1,2,3]

An error is thrown if the list contains duplicates.

>>> input (hashSetFromDistinctList natural) "[1, 1, 3]"
*** Exception: Error: Failed extraction

The expression type-checked successfully but the transformation to the target
type failed with the following error:

One duplicate element in the list: 1
>>> input (hashSetFromDistinctList natural) "[1, 1, 3, 3]"
*** Exception: Error: Failed extraction

The expression type-checked successfully but the transformation to the target
type failed with the following error:

2 duplicates were found in the list, including 1

hashMap :: (Eq k, Hashable k) => Decoder k -> Decoder v -> Decoder (HashMap k v) #

Decode a HashMap from a toMap expression or generally a Prelude.Map.Type.

>>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "toMap { a = True, b = False }")
[("a",True),("b",False)]
>>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "[ { mapKey = \"foo\", mapValue = True } ]")
[("foo",True)]

If there are duplicate mapKeys, later mapValues take precedence:

>>> let expr = "[ { mapKey = 1, mapValue = True }, { mapKey = 1, mapValue = False } ]"
>>> input (Dhall.hashMap natural bool) expr
fromList [(1,False)]

pairFromMapEntry :: Decoder k -> Decoder v -> Decoder (k, v) #

Decode a tuple from a Prelude.Map.Entry record.

>>> input (pairFromMapEntry strictText natural) "{ mapKey = \"foo\", mapValue = 3 }"
("foo",3)

record :: RecordDecoder a -> Decoder a #

Run a RecordDecoder to build a Decoder.

field :: Text -> Decoder a -> RecordDecoder a #

Parse a single field of a record.

constructor :: Text -> Decoder a -> UnionDecoder a #

Parse a single constructor of a union.

showDhallErrors :: Show e => String -> DhallErrors e -> String #

Render a given prefix and some errors to a string.

extractError :: Text -> Extractor s a b #

Turn a Text message into an extraction failure.

toMonadic :: Extractor s a b -> MonadicExtractor s a b #

Switches from an Applicative extraction result, able to accumulate errors, to a Monad extraction result, able to chain sequential operations.

fromMonadic :: MonadicExtractor s a b -> Extractor s a b #

Switches from a Monad extraction result, able to chain sequential errors, to an Applicative extraction result, able to accumulate errors.

defaultInputSettings :: InputSettings #

Default input settings: resolves imports relative to . (the current working directory), report errors as coming from (input), and default evaluation settings from defaultEvaluateSettings.

Since: dhall-1.16

rootDirectory :: Functor f => LensLike' f InputSettings FilePath #

Access the directory to resolve imports relative to.

Since: dhall-1.16

sourceName :: Functor f => LensLike' f InputSettings FilePath #

Access the name of the source to report locations from; this is only used in error messages, so it's okay if this is a best guess or something symbolic.

Since: dhall-1.16

defaultEvaluateSettings :: EvaluateSettings #

Default evaluation settings: no extra entries in the initial context, and no special normalizer behaviour.

Since: dhall-1.16

newManager :: (Functor f, HasEvaluateSettings s) => LensLike' f s (IO Manager) #

Access the HTTP manager initializer.

Since: dhall-1.36

inputWithSettings #

Arguments

:: InputSettings 
-> Decoder a

The decoder for the Dhall value

-> Text

The Dhall program

-> IO a

The decoded value in Haskell

Extend input with a root directory to resolve imports relative to, a file to mention in errors as the source, a custom typing context, and a custom normalization process.

Since: dhall-1.16

inputFile #

Arguments

:: Decoder a

The decoder for the Dhall value

-> FilePath

The path to the Dhall program.

-> IO a

The decoded value in Haskell.

Type-check and evaluate a Dhall program that is read from the file-system.

This uses the settings from defaultEvaluateSettings.

Since: dhall-1.16

inputFileWithSettings #

Arguments

:: EvaluateSettings 
-> Decoder a

The decoder for the Dhall value

-> FilePath

The path to the Dhall program.

-> IO a

The decoded value in Haskell.

Extend inputFile with a custom typing context and a custom normalization process.

Since: dhall-1.16

inputExpr #

Arguments

:: Text

The Dhall program

-> IO (Expr Src Void)

The fully normalized AST

Similar to input, but without interpreting the Dhall Expr into a Haskell type.

Uses the settings from defaultInputSettings.

inputExprWithSettings #

Arguments

:: InputSettings 
-> Text

The Dhall program

-> IO (Expr Src Void)

The fully normalized AST

Extend inputExpr with a root directory to resolve imports relative to, a file to mention in errors as the source, a custom typing context, and a custom normalization process.

Since: dhall-1.16

rawInput #

Arguments

:: Alternative f 
=> Decoder a

The decoder for the Dhall value

-> Expr s Void

a closed form Dhall program, which evaluates to the expected type

-> f a

The decoded value in Haskell

Use this function to extract Haskell values directly from Dhall AST. The intended use case is to allow easy extraction of Dhall values for making the function normalizeWith easier to use.

For other use cases, use input from Dhall module. It will give you a much better user experience.

detailed :: IO a -> IO a #

Use this to provide more detailed error messages

> input auto "True" :: IO Integer
 *** Exception: Error: Expression doesn't match annotation

 True : Integer

 (input):1:1
> detailed (input auto "True") :: IO Integer
 *** Exception: Error: Expression doesn't match annotation

 Explanation: You can annotate an expression with its type or kind using the
 ❰:❱ symbol, like this:


     ┌───────┐
     │ x : t │  ❰x❱ is an expression and ❰t❱ is the annotated type or kind of ❰x❱
     └───────┘

 The type checker verifies that the expression's type or kind matches the
 provided annotation

 For example, all of the following are valid annotations that the type checker
 accepts:


     ┌─────────────┐
     │ 1 : Natural │  ❰1❱ is an expression that has type ❰Natural❱, so the type
     └─────────────┘  checker accepts the annotation


     ┌───────────────────────┐
     │ Natural/even 2 : Bool │  ❰Natural/even 2❱ has type ❰Bool❱, so the type
     └───────────────────────┘  checker accepts the annotation


     ┌────────────────────┐
     │ List : Type → Type │  ❰List❱ is an expression that has kind ❰Type → Type❱,
     └────────────────────┘  so the type checker accepts the annotation


     ┌──────────────────┐
     │ List Text : Type │  ❰List Text❱ is an expression that has kind ❰Type❱, so
     └──────────────────┘  the type checker accepts the annotation


 However, the following annotations are not valid and the type checker will
 reject them:


     ┌──────────┐
     │ 1 : Text │  The type checker rejects this because ❰1❱ does not have type
     └──────────┘  ❰Text❱


     ┌─────────────┐
     │ List : Type │  ❰List❱ does not have kind ❰Type❱
     └─────────────┘


 You or the interpreter annotated this expression:

 ↳ True

 ... with this type or kind:

 ↳ Integer

 ... but the inferred type or kind of the expression is actually:

 ↳ Bool

 Some common reasons why you might get this error:

 ● The Haskell Dhall interpreter implicitly inserts a top-level annotation
   matching the expected type

   For example, if you run the following Haskell code:


     ┌───────────────────────────────┐
     │ >>> input auto "1" :: IO Text │
     └───────────────────────────────┘


   ... then the interpreter will actually type check the following annotated
   expression:


     ┌──────────┐
     │ 1 : Text │
     └──────────┘


   ... and then type-checking will fail

 ────────────────────────────────────────────────────────────────────────────────

 True : Integer

 (input):1:1