https://github.com/purescript/purescript-unsafe-coerce
Unsafe coercion of values
https://github.com/purescript/purescript-unsafe-coerce
Last synced: 4 months ago
JSON representation
Unsafe coercion of values
- Host: GitHub
- URL: https://github.com/purescript/purescript-unsafe-coerce
- Owner: purescript
- License: bsd-3-clause
- Created: 2015-07-04T23:29:33.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-04-27T14:16:24.000Z (about 3 years ago)
- Last Synced: 2024-10-29T21:05:44.066Z (8 months ago)
- Language: PureScript
- Homepage:
- Size: 35.2 KB
- Stars: 9
- Watchers: 6
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-unsafe-coerce
[](https://github.com/purescript/purescript-unsafe-coerce/releases)
[](https://github.com/purescript/purescript-unsafe-coerce/actions?query=workflow%3ACI+branch%3Amaster)
[](https://pursuit.purescript.org/packages/purescript-unsafe-coerce)A _highly unsafe_ function, which can be used to persuade the type system that any type is the same as any other type. When using this function, it is your (that is, the caller's) responsibility to ensure that the underlying representation for both types is the same.
There are few situations where it is acceptable to use this function, it should only ever appear as an internal implementation detail of a library, never as a function used in a "normal" codebase.
## Installation
```
spago install unsafe-coerce
```## Documentation
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-unsafe-coerce).