Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sgraf812/data-elevator

Coerce between unlifted boxed and lifted types
https://github.com/sgraf812/data-elevator

Last synced: 3 months ago
JSON representation

Coerce between unlifted boxed and lifted types

Awesome Lists containing this project

README

        

# `data-elevator`

Near zero-cost coercions between lifted and boxed unlifted types.

Turn any lifted type into an unlifted boxed type with `Strict`, eagerly
forcing any wrapped computation in the syntactic binding context.

Turn any unlifted boxed type into a lifted type with `Lazy`, suspending any
wrapped computation until the `Lazy` is matched upon.

Re-use existing code by coercing functions that can be generalised according
to the levity polymorphism subkinding law `Unlifted <: Lifted` with
`levCoerce`.