Skip to content

Add Void: a logically uninhabited data type #193

Description

@jbgi

from https://hackage.haskell.org/package/void-0.7.1/docs/Data-Void.html

with Void you can implements technics like http://www.haskellforall.com/2015/01/total-100-exhaustive-pattern-matching.html

The implementation would be something like:

public abstract class Void {
    private Void() {throw new IllegalStateException("Void cannot be instantiated"); }
    public abstract <X> X absurd();
}

WDYT ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions