Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sgraf812/data-elevator
- Owner: sgraf812
- License: mit
- Created: 2022-07-31T19:15:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T11:04:17.000Z (4 months ago)
- Last Synced: 2024-09-17T12:43:03.974Z (4 months ago)
- Language: Haskell
- Size: 28.3 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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`.