cryptol-2.8.0: Cryptol: The Language of Cryptography

Copyright | (c) 2015-2016 Galois Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Cryptol.Utils.Ident

Contents

- Module names
- Identifiers

Description

Synopsis

- data ModName
- modNameToText :: ModName -> Text
- textToModName :: Text -> ModName
- modNameChunks :: ModName -> [String]
- packModName :: [Text] -> ModName
- preludeName :: ModName
- interactiveName :: ModName
- noModuleName :: ModName
- exprModName :: ModName
- isParamInstModName :: ModName -> Bool
- paramInstModName :: ModName -> ModName
- notParamInstModName :: ModName -> ModName
- data Ident
- packIdent :: String -> Ident
- packInfix :: String -> Ident
- unpackIdent :: Ident -> String
- mkIdent :: Text -> Ident
- mkInfix :: Text -> Ident
- isInfixIdent :: Ident -> Bool
- nullIdent :: Ident -> Bool
- identText :: Ident -> Text
- modParamIdent :: Ident -> Ident

# Module names

data ModName Source #

Module names are just text.

#### Instances

Instances details

Eq ModName Source # |
Instance details Defined in Cryptol.Utils.Ident Methods (==) :: ModName -> ModName -> Bool Source # (/=) :: ModName -> ModName -> Bool Source #
Ord ModName Source # |
Instance details Defined in Cryptol.Utils.Ident Methods compare :: ModName -> ModName -> Ordering Source # (<) :: ModName -> ModName -> Bool Source # (<=) :: ModName -> ModName -> Bool Source # (>) :: ModName -> ModName -> Bool Source # (>=) :: ModName -> ModName -> Bool Source # max :: ModName -> ModName -> ModName Source # min :: ModName -> ModName -> ModName Source #
Show ModName Source # |
Instance details Defined in Cryptol.Utils.Ident Methods showsPrec :: Int -> ModName -> ShowS Source # show :: ModName -> String Source # showList :: [ModName] -> ShowS Source #
Generic ModName Source # |
Instance details Defined in Cryptol.Utils.Ident Associated Types type Rep ModName :: Type -> Type Source # Methods from :: ModName -> Rep ModName x Source # to :: Rep ModName x -> ModName Source #
NFData ModName Source # |
Instance details Defined in Cryptol.Utils.Ident Methods rnf :: ModName -> () Source #
PP ModName Source # |
Instance details Defined in Cryptol.Utils.PP Methods ppPrec :: Int -> ModName -> Doc Source #
type Rep ModName Source # |
Instance details Defined in Cryptol.Utils.Ident type Rep ModName = D1 ('MetaData "ModName" "Cryptol.Utils.Ident" "cryptol-2.8.0-11Z6ZaBuQbo1UTYpHYMeUg" 'False) (C1 ('MetaCons "ModName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

modNameToText :: ModName -> Text Source #

textToModName :: Text -> ModName Source #

modNameChunks :: ModName -> [String] Source #

packModName :: [Text] -> ModName Source #

preludeName :: ModName Source #

interactiveName :: ModName Source #

noModuleName :: ModName Source #

exprModName :: ModName Source #

isParamInstModName :: ModName -> Bool Source #

paramInstModName :: ModName -> ModName Source #

Convert a parameterized module's name to the name of the module containing the same definitions but with explicit parameters on each definition.

notParamInstModName :: ModName -> ModName Source #

# Identifiers

data Ident Source #

Identifiers, along with a flag that indicates whether or not they're infix operators. The boolean is present just as cached information from the lexer, and never used during comparisons.

#### Instances

Instances details

Eq Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Methods (==) :: Ident -> Ident -> Bool Source # (/=) :: Ident -> Ident -> Bool Source #
Ord Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Methods compare :: Ident -> Ident -> Ordering Source # (<) :: Ident -> Ident -> Bool Source # (<=) :: Ident -> Ident -> Bool Source # (>) :: Ident -> Ident -> Bool Source # (>=) :: Ident -> Ident -> Bool Source # max :: Ident -> Ident -> Ident Source # min :: Ident -> Ident -> Ident Source #
Show Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Methods showsPrec :: Int -> Ident -> ShowS Source # show :: Ident -> String Source # showList :: [Ident] -> ShowS Source #
IsString Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Methods fromString :: String -> Ident Source #
Generic Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Associated Types type Rep Ident :: Type -> Type Source # Methods from :: Ident -> Rep Ident x Source # to :: Rep Ident x -> Ident Source #
NFData Ident Source # |
Instance details Defined in Cryptol.Utils.Ident Methods rnf :: Ident -> () Source #
PP Ident Source # |
Instance details Defined in Cryptol.Utils.PP Methods ppPrec :: Int -> Ident -> Doc Source #
ShowParseable Ident Source # |
Instance details Defined in Cryptol.TypeCheck.Parseable Methods showParseable :: Ident -> Doc Source #
type Rep Ident Source # |

Instance details

Defined in Cryptol.Utils.Ident

type Rep Ident = D1 ('MetaData "Ident" "Cryptol.Utils.Ident" "cryptol-2.8.0-11Z6ZaBuQbo1UTYpHYMeUg" 'False) (C1 ('MetaCons "Ident" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

packIdent :: String -> Ident Source #

packInfix :: String -> Ident Source #

unpackIdent :: Ident -> String Source #

mkIdent :: Text -> Ident Source #

mkInfix :: Text -> Ident Source #

isInfixIdent :: Ident -> Bool Source #

nullIdent :: Ident -> Bool Source #

identText :: Ident -> Text Source #

modParamIdent :: Ident -> Ident Source #