Module

TypedEnv

Package
purescript-typedenv
Repository
nsaunders/purescript-typedenv

The base module for the TypedEnv library

#fromEnv Source

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

Gets a record of environment variables from a Node environment.

#Variable Source

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

Specifies the name and type of an environment variable.

Instances

#VariableFlipped Source

type VariableFlipped ty name = Variable name ty

An alias for Variable with the parameters reversed

#type (<:) Source

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

An alias for VariableFlipped

#EnvError Source

data EnvError

An error that can occur while reading an environment variable

Constructors

Instances

#envErrorMessage Source

envErrorMessage :: EnvError -> String

Gets the error message for a given EnvError value.

#Resolved Source

type Resolved (name :: Symbol) ty = ty

Useful for a type alias representing a resolved environment

#ParseValue Source

class ParseValue ty  where

Parses a String value to the specified type.

Members

Instances

#ReadValue Source

class ReadValue ty  where

Retrieves and parses an environment variable value.

Members

Instances

#ReadEnv Source

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

Transforms a row of environment variable specifications to a record.

Members

Instances

#ReadEnvFields Source

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

Transforms a list of environment variable specifications to a record.

Members

Instances

Modules
TypedEnv