#Req Source

newtype Req a

Denotes a required record field, the opposite of Opt. Note that using this type is only required for polymorphic fields, due to complicated type system reasons. Fields that have concrete types are not required to use Req. For example:

type Args a =
  { polymorphicField :: Req a  -- `Req` is needed here
  , optionalField :: Opt a
  , concreteTypedField :: Int  -- no need for `Req` here



#Opt Source

data Opt t0

Denotes an optional value, typically a record field, allowing the consumer to omit such field when passing the parameter, but still allowing the receiving function to work with the field.


#undefined Source

undefined :: forall a. Opt a

#opt Source

opt :: forall a. a -> Opt a

#fromOpt Source

fromOpt :: forall a. a -> Opt a -> a

Let's be consistent with fromMaybe args order here

#fromOptFlipped Source

fromOptFlipped :: forall a. Opt a -> a -> a

#(!) Source

Operator alias for Data.Undefined.NoProblem.fromOptFlipped (left-associative / precedence 9)

#toMaybe Source

toMaybe :: forall a. Opt a -> Maybe a

#fromMaybe Source

fromMaybe :: forall a. Maybe a -> Opt a

#isUndefined Source

isUndefined :: forall a. Opt a -> Boolean

#unsafeUnwrap Source

unsafeUnwrap :: forall a. Opt a -> a

#pseudoBind Source

pseudoBind :: forall a b. Opt a -> (a -> Opt b) -> Opt b

This is not dedicated for providing bind. We are not able to have Monad here.

It is only to provide nice operator: (coerce {}) ? .a ? .b ? _.c.d ! "default"

#(?) Source

Operator alias for Data.Undefined.NoProblem.pseudoBind (left-associative / precedence 9)

#pseudoMap Source

pseudoMap :: forall a b. (a -> b) -> Opt a -> Opt b

#type (<>) Source

Operator alias for Prim.TypeError.Beside (right-associative / precedence 2)

Ripped from typelevel-eval

#type (|>) Source

Operator alias for Prim.TypeError.Above (right-associative / precedence 1)

#SList Source

data SList

Ripped from record-extra

#SCons Source

data SCons :: Symbol -> SList -> SListdata SCons t0 t1


#SNil Source

data SNil :: SListdata SNil


#type (:::) Source

Operator alias for Data.Undefined.NoProblem.SCons (right-associative / precedence 6)

#RenderPath Source

class RenderPath :: SList -> Doc -> Constraintclass RenderPath (path :: SList) (render :: Doc) | path -> render


#TypeMismatchErr Source

class TypeMismatchErr :: Type -> Type -> SList -> Doc -> Constraintclass TypeMismatchErr (given :: Type) (expected :: Type) (path :: SList) (msg :: Doc) | path expected given -> msg