------------------------------------------------------------------------
-- Modality variants
------------------------------------------------------------------------

open import Tools.Level

module Graded.Modality.Variant (a : Level) where

open import Tools.Bool
open import Tools.Empty
open import Tools.Function
open import Tools.Level
open import Tools.PropositionalEquality
open import Tools.Relation
open import Tools.Unit

-- Modality variants:
-- * Modalities can come with one mode (๐Ÿ™แต) or two (๐Ÿ™แต and ๐Ÿ˜แต).
-- * They can also come with, or not come with, a dedicated nr
--   function. Even if they don't come with a *dedicated* nr function
--   such functions can perhaps still be defined.

record Modality-variant : Set (lsuc a) where
  field
    -- Is the mode ๐Ÿ˜แต allowed?
    ๐Ÿ˜แต-allowed : Bool

    -- Is a dedicated nr function available?
    nr-available : Bool

  -- Is a dedicated nr function available?

  Nr-available : Set
  Nr-available = T nr-available

-- A variant for which a dedicated nr function must be available, and
-- ๐Ÿ˜แต is allowed if the boolean is true.

nr-available-and-๐Ÿ˜แต-allowed-if : Bool โ†’ Modality-variant
nr-available-and-๐Ÿ˜แต-allowed-if ok = record
  { ๐Ÿ˜แต-allowed   = ok
  ; nr-available = true
  }

-- A variant for which a dedicated nr function is not available, and
-- ๐Ÿ˜แต is allowed if the boolean is true.

nr-not-available-and-๐Ÿ˜แต-allowed-if : Bool โ†’ Modality-variant
nr-not-available-and-๐Ÿ˜แต-allowed-if ok = record
  { ๐Ÿ˜แต-allowed   = ok
  ; nr-available = false
  }