Agda-2.6.2.1: A dependently typed functional programming language and proof assistant
Safe HaskellSafe-Inferred
LanguageHaskell2010

Agda.Utils.Suffix

Synopsis

Documentation

isSubscriptDigit :: Char -> Bool Source #

Is the character one of the subscripts '₀'-'₉'?

toSubscriptDigit :: Char -> Char Source #

Converts '0'-'9' to '₀'-'₉'

Precondition: The digit needs to be in range.

fromSubscriptDigit :: Char -> Char Source #

Converts '₀'-'₉' to '0'-'9'.

Precondition: The digit needs to be in range.

data Suffix Source #

Classification of identifier variants.

Constructors

Prime Int

Identifier ends in Int many primes.

Index Int

Identifier ends in number Int (ordinary digits).

Subscript Int

Identifier ends in number Int (subscript digits).

nextSuffix :: Suffix -> Suffix Source #

Increase the suffix by one. If no suffix yet, put a subscript 1 unless users do not want us to use any unicode.

suffixView :: String -> (String, Maybe Suffix) Source #

Parse suffix.

renderSuffix :: Suffix -> String Source #

Print suffix.