generic-type-asserts-0.3.0: Structural assertions on generic type representations.
Safe HaskellSafe-Inferred
LanguageGHC2021

Generic.Type.Assert

Description

Structural assertions on generic type representation.

Synopsis

Documentation

type GAssertNotVoid a = Assert (IsNotVoid (StripD1 (Rep a))) (GAssertErrorVoid a) Source #

Type is not void i.e. has at least one constructor.

type GAssertNotSum a = Assert (IsNotSum (StripD1 (Rep a))) (GAssertErrorSum a) Source #

Type is not a sum type i.e. has at most one constructor.

Permits void types.

type GAssertSum a = Assert (IsSum (StripD1 (Rep a))) (GAssertErrorNotSum a) Source #

Type is a sum type i.e. has >=2 constructors.

Permits void types.

type GAssertEnum a = Assert (IsEnum (StripD1 (Rep a))) (GAssertErrorNotEnum a) Source #

Type has only empty constructors.

Permits void types.