12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061-------------------------------------------------------------------------- The Agda standard library---- Basic definitions for Characters------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} module Data.Char.Base where open import Level using (zero)import Data.Nat.Base as ℕopen import Data.Bool.Base using (Bool)open import Function.Base using (_on_)open import Relation.Binary.Core using (Rel)open import Relation.Binary.PropositionalEquality.Coreopen import Relation.Binary.Construct.Closure.Reflexive -------------------------------------------------------------------------- Re-export the type, and renamed primitives open import Agda.Builtin.Char public using ( Char ) renaming -- testing ( primIsLower to isLower ; primIsDigit to isDigit ; primIsAlpha to isAlpha ; primIsSpace to isSpace ; primIsAscii to isAscii ; primIsLatin1 to isLatin1 ; primIsPrint to isPrint ; primIsHexDigit to isHexDigit -- transforming ; primToUpper to toUpper ; primToLower to toLower -- converting ; primCharToNat to toℕ ; primNatToChar to fromℕ ) open import Agda.Builtin.String public using () renaming ( primShowChar to show ) infix 4 _≈_ _≉__≈_ : Rel Char zero_≈_ = _≡_ on toℕ _≉_ : Rel Char zero_≉_ = _≢_ on toℕ infix 4 _≈ᵇ__≈ᵇ_ : (c d : Char) → Boolc ≈ᵇ d = toℕ c ℕ.≡ᵇ toℕ d infix 4 _<__<_ : Rel Char zero_<_ = ℕ._<_ on toℕ infix 4 _≤__≤_ : Rel Char zero_≤_ = ReflClosure _<_