HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

ModuleAgda-2.8.0.2Haskell2010

Agda.Utils.Boolean

Boolean algebras and types isomorphic to Bool.

There are already solutions for Boolean algebras in the Haskell ecosystem, but they do not offer easy instantiations for types isomorphic to Bool. In particular, if type a is isomorphic to Bool, so it satisfies `IsBool a`, we would like to instantiate 'Boolean a' by just giving true and false. To facilitate this within the limits of the Haskell class system, we define the class Boolean mutually with class IsBool, so that operations not, (&&), and (||) can get default implementations.

Usage: import Prelude hiding ( not, (&&), (||) ) import Agda.Utils.Boolean

Synopsis
  • PackageAgda-2.8.0.2
  • Exports2
  • LanguageHaskell2010
  • LicenceMIT
  • SourceBoolean.hs
classclass Boolean a where

Boolean algebras.

Methods

Instances7Boolean, …
classclass (Boolean a, Eq a) => IsBool a where

Types isomorphic to Bool.

Methods

Instances6IsBool