smash: Smash products - like 'These', but with a unit!

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Smash products are like the These datatype, only with a unit. You can think of this type as isomorphic to 'Maybe (These a b)'.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.1.0, 0.1.1.0, 0.1.2, 0.1.3
Change log CHANGELOG.md
Dependencies base (>=4.10 && <5.0), bifunctors (>=5.5 && <5.6), binary (>=0.8 && <0.9), deepseq (>=1.4 && <1.5), hashable (>=1.3 && <1.4) [details]
License BSD-3-Clause
Copyright (c) 2020 Emily Pillmore <emilypi@cohomolo.gy>
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Category Data
Home page https://github.com/emilypi/smash
Bug tracker https://github.com/emilypi/smash/issues
Source repo head: git clone https://github.com/emilypi/smash.git
Uploaded by topos at 2020-04-07T16:10:40Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for smash-0.1.1.0

[back to package description]

smash: Combinators for Maybe types

Hackage

This package consists of 3 datatypes: Wedge, Can, and Smash.

You can imagine these three types as Maybe (Either a b), Maybe (Either a (Either b (a,b)), and Maybe (These a b) respectively. It turns out that that each of these datatypes has spcial properties:

Pictorially, these datatypes look like this:

'Can':
        a
        |
Non +---+---+ (a,b)
        |
        b

'Wedge':
                a
                |
Nowhere +-------+
                |
                b


'Smash':


Nada +--------+ (a,b)