cond

Basic conditional and boolean operators with monadic variants.

https://github.com/jcranch/cond

LTS Haskell 22.40:0.5.1
Stackage Nightly 2024-11-04:0.5.1
Latest on Hackage:0.5.1

See all snapshots cond appears in

BSD-3-Clause licensed by Adam Curtis
This version can be pinned in stack with:cond-0.5.1@sha256:e3f31bdac10c7f3c632a684e4c29978d0c9251ec682c52ceee811e83dcd5a00f,1412

Module documentation for 0.5.1

Depends on 1 package(full list with versions):
Used by 1 package in lts-22.6(full list with versions):

Description

A library of boolean operations, lifted in a typeclass for boolean values. Also includes:

  • Lifted monadic variants of those operations.
  • Hoare’s conditional choice operator.
  • A typeclass for boolean algebras.

See annotated documentation in code for information about individual entities.

Changes

0.5.1 [2023-11-19]

  • Corrected bug in XorB and EquivB

0.5.0 [2023-11-19]

  • Four monoid structures for a boolean algebra (AnyB, AllB, XorB, EquivB)
  • Typeclass altered so that {or, and, nor, nand, any, all} are no longer members
  • Add instances for () and (a,b,c)
  • minimal pragma (and corresponding documentation)
  • The opposite Boolean algebra (exchanging true and false, && and ||, etc)
  • A more general instance for Endo
  • Tested with GHC 7.0 - 9.6

0.4.2

  • Add instance Boolean b => Boolean (a -> b)
  • Tested with GHC 7.0 - 9.6