acme-smuggler: Smuggle arbitrary values in arbitrary types

[ acme, bsd3, library ] [ Propose Tags ]

Please see README.md


[Skip to Readme]
Versions 0.1.0.1, 1.1.1.0
Dependencies base (>=4.7 && <5) [details]
License BSD-3-Clause
Copyright 2016-2018 Ben Clifford
Author Ben Clifford <benc@hawaga.org.uk>
Maintainer Ben Clifford <benc@hawaga.org.uk>
Category ACME
Home page https://github.com/benclifford/acme-smuggler
Source repo head: git clone https://github.com/benclifford/acme-smuggler
Uploaded by benc at Tue Oct 2 09:57:31 UTC 2018
Distributions NixOS:1.1.1.0
Downloads 362 total (36 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-10-02 [all 1 reports]
Hackage Matrix CI

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for acme-smuggler-1.1.1.0

[back to package description]

ACME Smuggler

The () type has only one value, also called () with no internal structure.

Nevertheless, acme-smuggler allows you to smuggle arbitrary values into () and discover them later.

And! Void has no values at all, but acme-smuggler lets you smuggle values into Void. Or into any other Haskell type.

> x = smuggle "hello"
> :t x
x :: ()

> y = smuggle (7 :: Integer)
> :t y
y :: ()

> discover x :: Maybe String
Just "hello"
> discover y :: Maybe Integer
Just 7
> discover x :: Maybe Integer
Nothing