std.lazyt

Monad transformer version of Lazy

Types

type LazyT m a = Lazy (m a)

Values

let force_t : forall a m . LazyT m a -> m a

#[implicit]
let functor : forall m . [Functor m] -> Functor (LazyT m)

A Functor represents an action on a parameterized type which does not change the structure with the mapped type.

The following laws should hold:

  • map id == id
  • map (f << g) == map f << map g

#[implicit]
let applicative : forall m . [Applicative m] -> Applicative (LazyT m)

A Functor with application.

The following laws should hold:

  • wrap id <*> v = v
  • wrap (<<) <> u <> v <> w = u <> (v <*> w)
  • wrap f <*> wrap x = wrap (f x)
  • u <> wrap y = wrap (\g -> g x) <> u

#[implicit]
let monad : forall m . [Monad m] -> Monad (LazyT m)

A generalised interface for imperatively sequencing actions

#[implicit]
let transformer : Transformer LazyT