unwitch: converts between primitives
Removes the magic from witch. This provides safe conversions like witch does. But it doesn't use type classes or exceptions. This has a couple of advantages:
No need to use type application for function selection.
Functions get names that describe what they do. This allows ctags to work as well.
No trouble with orphans.
Custom errors instead of the prelude based ones allow client code to recover with typesafety even on partial conversions.
[Skip to Readme]
Modules
[Index] [Quick Jump]
- Unwitch
- Convert
- Unwitch.Convert.ByteString
- Unwitch.Convert.Char
- Unwitch.Convert.Double
- Unwitch.Convert.Fixed
- Unwitch.Convert.Float
- Unwitch.Convert.Int
- Unwitch.Convert.Int16
- Unwitch.Convert.Int32
- Unwitch.Convert.Int64
- Unwitch.Convert.Int8
- Unwitch.Convert.Integer
- Unwitch.Convert.LazyByteString
- Unwitch.Convert.LazyText
- Unwitch.Convert.Natural
- Unwitch.Convert.Ratio
- Unwitch.Convert.ShortByteString
- Unwitch.Convert.Text
- Unwitch.Convert.Word
- Unwitch.Convert.Word16
- Unwitch.Convert.Word32
- Unwitch.Convert.Word64
- Unwitch.Convert.Word8
- Unwitch.Errors
- Convert
Downloads
- unwitch-2.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 1.0.0, 2.0.0, 2.0.1, 2.0.2 |
|---|---|
| Change log | Changelog.md |
| Dependencies | base (>=4.18.0.0 && <4.23), bytestring (>=0.10 && <0.13), ghc-bignum (<2), text (>=1.2 && <2.2) [details] |
| License | MIT |
| Copyright | 2026 Jappie Klooster |
| Author | Jappie Klooster |
| Maintainer | jappieklooster@hotmail.com |
| Uploaded | by Jappie at 2026-03-09T18:58:03Z |
| Category | Data |
| Home page | https://github.com/jappeace/unwitch#readme |
| Bug tracker | https://github.com/jappeace/unwitch/issues |
| Source repo | head: git clone https://github.com/jappeace/unwitch |
| Distributions | Stackage:2.0.2 |
| Downloads | 0 total (0 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |