effect-monad-0.8.0.0: Embeds effect systems and program logics into Haskell using graded monads and parameterised monads

Safe HaskellNone
LanguageHaskell98

Control.Effect.WriteOnceWriter

Synopsis

Documentation

put :: a -> WriteOnce '[a] () Source #

Write a value of type a

data WriteOnce (w :: [*]) a Source #

Provides a kind of writer monad, which can only write an item once (no accumulation), an effect system as a list of the items that have been written

Constructors

W 

Fields

Instances

Effect [*] WriteOnce Source # 

Associated Types

type Unit WriteOnce (m :: WriteOnce -> * -> *) :: k Source #

type Plus WriteOnce (m :: WriteOnce -> * -> *) (f :: WriteOnce) (g :: WriteOnce) :: k Source #

type Inv WriteOnce (m :: WriteOnce -> * -> *) (f :: WriteOnce) (g :: WriteOnce) :: Constraint Source #

Methods

return :: a -> m (Unit WriteOnce m) a Source #

(>>=) :: Inv WriteOnce m f g => m f a -> (a -> m g b) -> m (Plus WriteOnce m f g) b Source #

(>>) :: Inv WriteOnce m f g => m f a -> m g b -> m (Plus WriteOnce m f g) b Source #

type Unit [*] WriteOnce Source # 
type Unit [*] WriteOnce = [] *
type Plus [*] WriteOnce s t Source # 
type Plus [*] WriteOnce s t = (:++) s t
type Inv [*] WriteOnce s t Source # 
type Inv [*] WriteOnce s t = ()