Module

TypedEnv

The base module for the TypedEnv library

#fromEnv

fromEnv :: forall e r proxy. ReadEnv e r => proxy e -> Object String -> Either EnvError (Record r)

Gets a record of environment variables from a Node environment.

#Variable

data Variable (name :: Symbol) (ty :: Type)

Specifies the name and type of an environment variable.

Instances

#VariableFlipped

type VariableFlipped ty name = Variable name ty

An alias for Variable with the parameters reversed

#type (<:)

Operator alias for TypedEnv.VariableFlipped (right-associative / precedence 5)

An alias for VariableFlipped

#EnvError

data EnvError

An error that can occur while reading an environment variable

Constructors

Instances

#envErrorMessage

envErrorMessage :: EnvError -> String

Gets the error message for a given EnvError value.

#Resolved

type Resolved (name :: Symbol) ty = ty

#ParseValue

class ParseValue ty  where

Parses a String value to the specified type.

Members

Instances

#ReadValue

class ReadValue ty  where

Retrieves and parses an environment variable value.

Members

Instances

#ReadEnv

class ReadEnv (e :: Row Type) (r :: Row Type)  where

Transforms a row of environment variable specifications to a record.

Members

Instances

#ReadEnvFields

class ReadEnvFields (el :: RowList Type) (rl :: RowList Type) (r :: Row Type) | el -> rl where

Transforms a list of environment variable specifications to a record.

Members

Instances

Modules