acme-smuggler: Smuggle arbitrary values in arbitrary types

[ acme, bsd3, library ] [ Propose Tags ] [ Report a vulnerability ]

Please see README.md


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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 2018-10-02T09:57:31Z
Distributions NixOS:1.1.1.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1789 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-10-02 [all 1 reports]

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