Module

Data.Monoid.MList

Package
purescript-monoid-extras
Repository
mikesol/purescript-monoid-extras

#type (:::) Source

Operator alias for Data.Monoid.MList.Perhaps (non-associative / precedence 5)

#(*:) Source

Operator alias for Data.Monoid.MList.perhaps (non-associative / precedence 5)

#MList Source

class MList l  where

Type class for heterogeneous monoidal lists, with a single method

Members

  • empty :: l

    The /empty/ heterogeneous list of type @l@. Of course, @empty

Instances

#Includes Source

class Includes l a  where

The relation @l Includes a@ holds when @a@ is the type of an element

Members

  • inj :: a -> l

    Inject a value into an otherwise empty heterogeneous list.

  • get :: l -> Maybe a

    Get the value of type @a@ from a heterogeneous list, if there

  • alt :: (Maybe a -> Maybe a) -> l -> l

    Alter the value of type @a@ by applying the given function to it.

Instances

#Perhaps Source

type Perhaps a l = (Maybe a) /\ l

Instances

#perhaps Source

perhaps :: forall a l. a -> l -> a ::: l

#SM Source

newtype SM m

@SM@, an abbreviation for "single monoid" (as opposed to a

Constructors

Instances