Source code on Github
{-# OPTIONS --safe #-}
module Prelude.Decidable.Instances where

open import Prelude.Init; open SetAsType
open import Prelude.Decidable.Core
open import Prelude.DecEq.Core

private variable
  A : Type ; B : Type ℓ′
   : Pred A ℓ″;  : Rel A ℓ″

instance
  DecEq⇒Dec :  DecEq A   _≡_ {A = A} ⁇²
  DecEq⇒Dec .dec = _  _

  -- Bool
  Dec-T :  {t : Bool}  T t 
  Dec-T .dec = T? _

  -- Maybe
  Dec-All :   ⁇¹   All  ⁇¹
  Dec-All .dec = all? dec¹ _

  Dec-Any :   ⁇¹   Any  ⁇¹
  Dec-Any .dec = any? dec¹ _

  Dec-AllPairs :   ⁇²   AllPairs  ⁇¹
  Dec-AllPairs .dec = allPairs? dec² _

  Dec-MAll :  _ :  ⁇¹   M.All.All  ⁇¹
  Dec-MAll .dec = M.All.dec dec¹ _

  Dec-MAny :  _ :  ⁇¹   M.Any.Any  ⁇¹
  Dec-MAny .dec = M.Any.dec dec¹ _