Module

Justifill

#justifill

justifill :: forall from via to. Fillable (Record via) (Record to) => Justifiable (Record from) (Record via) => Record from -> Record to

Completes records by wrapping provided optional keys in Just and filling out non-provided keys with Nothings Example: x :: { name :: Maybe String, age :: Maybe Int, id :: Int } x = justifill { name: "Mark", id: 12 } -- { name: Just "Mark", age: Nothing, id: 12 }

#justifillVia

justifillVia :: forall from via to. Fillable (Record via) (Record to) => Justifiable (Record from) (Record via) => Proxy (Record via) -> Record from -> Record to

A version of justifill that helps type inference along by receiving a Proxy of the thru type This is useful if you write a wrapper around justifill because it allows to write simpler type annotations

Modules