Module

Data.Lens.Barlow.Construction

Package
purescript-barlow-lens
Repository
sigma-andex/purescript-barlow-lens

#ConstructBarlowGeneric Source

class ConstructBarlowGeneric :: TList -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Constraintclass ConstructBarlowGeneric (lenses :: TList) p s t a b | lenses s -> t a b where

Members

Instances

#ConstructProduct Source

class ConstructProduct :: Int -> Int -> TList -> (Type -> Type -> Type) -> Type -> Type -> Constraintclass ConstructProduct (original :: Int) (n :: Int) (lenses :: TList) p s a | n lenses s -> a where

Selects the n-th argument of a product with %n. original is the index the user wrote, for error messages.

Members

Instances

#ConstructBarlow Source

class ConstructBarlow :: TList -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Constraintclass ConstructBarlow (lenses :: TList) p s t a b | lenses s -> t a b where

Members

Instances

#CheckConstructor Source

class CheckConstructor :: TList -> Type -> Type -> Constraintclass CheckConstructor (lenses :: TList) (s :: Type) (rep :: Type) 

Fails with a readable message (listing the available constructors) if %Name names a constructor that doesn't exist.

Instances

#HasConstructor Source

class HasConstructor :: Symbol -> Type -> Boolean -> Constraintclass HasConstructor (sym :: Symbol) (rep :: Type) (found :: Boolean) | sym rep -> found

Instances

#CheckConstructorFound Source

class CheckConstructorFound :: Boolean -> Symbol -> Type -> Type -> Constraintclass CheckConstructorFound (found :: Boolean) (sym :: Symbol) (s :: Type) (rep :: Type) 

Instances

#ConstructorNames Source

class ConstructorNames :: Type -> Doc -> Constraintclass ConstructorNames (rep :: Type) (names :: Doc) | rep -> names

Instances

#IsBuiltin Source

class IsBuiltin :: Type -> Boolean -> Constraintclass IsBuiltin (s :: Type) (builtin :: Boolean) | s -> builtin

True for built-in types that can never be newtypes, so selecting a field on them is definitely a mistake.

Instances

#ConstructNonRecord Source

class ConstructNonRecord :: Boolean -> TList -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Constraintclass ConstructNonRecord (builtin :: Boolean) (lenses :: TList) p s t a b | builtin lenses s -> t a b where

A field step (name or {...}) on something that isn't a record.

Members

Instances