HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduledec-0.0.6Haskell2010

Data.Type.Dec

Contents
  1. Types
  2. Neg combinators
  3. Dec combinators
  4. Boring
Synopsis
  • Packagedec-0.0.6
  • Exports13
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDec.hs

Types

datadata Dec a

Decidable (nullary) relations.

Constructors

Instances3Eq, Ord, Boring
  • Eq a => Eq (Dec a)Defined in dec-0.0.6 · Data.Type.Dec
  • Ord a => Ord (Dec a)Defined in dec-0.0.6 · Data.Type.Dec

    decToBool respects this ordering.

    Note: yet if you have p :: a and p :: Neg a, something is wrong.

  • Decidable a => Boring (Dec a)Defined in dec-0.0.6 · Data.Type.Dec

    This relies on the fact that a is proposition in h-Prop sense.

classclass Decidable a where

Class of decidable types.

Law

a should be a Proposition, i.e. the Yes answers should be unique.

Note: We'd want to have decidable equality :~: here too, but that seems to be a deep dive into singletons.

Methods

Instances3Decidable

Neg combinators

valuetoNegNeg :: a -> Neg (Neg a)

We can negate anything twice.

Double-negation elimination is inverse of toNegNeg and generally impossible.

Dec combinators

valuedecShow :: Show a => Dec a -> String

Show Dec.

Example1 expression
decShow $ Yes ()"Yes ()"
Example1 expression
decShow $ No id"No <toVoid>"

Boring

Dec a can be Boring in two ways: When a is Boring or Absurd.