acme-smuggler: Smuggle arbitrary values in ()

[ acme, bsd3, library ] [ Propose Tags ]

Please see README.md


[Skip to Readme]
Versions 0.1.0.1
Dependencies base (>=4.7 && <5) [details]
License BSD-3-Clause
Copyright 2016 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 Sun Dec 11 11:27:11 UTC 2016
Distributions NixOS:0.1.0.1
Downloads 280 total (5 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 2016-12-11 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for acme-smuggler-0.1.0.1

[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:

> 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