| Copyright | (c) 2015-2016 Galois Inc. |
|---|---|
| License | BSD3 |
| Maintainer | cryptol@galois.com |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Cryptol.Parser.Name
Description
Synopsis
- data NameSource
- data PName
- data Pass
- mkQual :: ModName -> Ident -> PName
- mkUnqual :: Ident -> PName
- mkUnqualSystem :: Ident -> PName
- origNameToDefPName :: OrigName -> NameSource -> PName
- getModName :: PName -> Maybe ModName
- getIdent :: PName -> Ident
- isSystemName :: PName -> Bool
- pattern UnQual :: Ident -> PName
Documentation
data NameSource Source #
Constructors
| SystemName | |
| UserName |
Instances
| Generic NameSource Source # | |||||
Defined in Cryptol.Parser.Name Associated Types
| |||||
| Show NameSource Source # | |||||
Defined in Cryptol.Parser.Name Methods showsPrec :: Int -> NameSource -> ShowS # show :: NameSource -> String # showList :: [NameSource] -> ShowS # | |||||
| NFData NameSource Source # | |||||
Defined in Cryptol.Parser.Name Methods rnf :: NameSource -> () # | |||||
| Eq NameSource Source # | |||||
Defined in Cryptol.Parser.Name | |||||
| Ord NameSource Source # | |||||
Defined in Cryptol.Parser.Name Methods compare :: NameSource -> NameSource -> Ordering # (<) :: NameSource -> NameSource -> Bool # (<=) :: NameSource -> NameSource -> Bool # (>) :: NameSource -> NameSource -> Bool # (>=) :: NameSource -> NameSource -> Bool # max :: NameSource -> NameSource -> NameSource # min :: NameSource -> NameSource -> NameSource # | |||||
| type Rep NameSource Source # | |||||
Names that originate in the parser. Note here that other kinds of PName do not need this kind of flag because: (1) NewName are generated by the system, so these should never be user visible. (2) Qual names are user names use to refer to imported modules. Should these names names ever be used to refer to system names, then there make be a bug in the renamer that needs to be fixed.
Constructors
| UnQual' !Ident !NameSource | Unqualified names like |
| Qual !ModName !Ident | Qualified names like |
| NewName !Pass !Int | Fresh names generated by a pass. |
Instances
Passes that can generate fresh names.
Constructors
| NoPat | |
| MonoValues | |
| ExpandPropGuards String |
Instances
| Generic Pass Source # | |||||
Defined in Cryptol.Parser.Name Associated Types
| |||||
| Show Pass Source # | |||||
| NFData Pass Source # | |||||
Defined in Cryptol.Parser.Name | |||||
| Eq Pass Source # | |||||
| Ord Pass Source # | |||||
| type Rep Pass Source # | |||||
Defined in Cryptol.Parser.Name type Rep Pass = D1 ('MetaData "Pass" "Cryptol.Parser.Name" "cryptol-3.5.0-HoSGjqdyafy4TMoEJgOBMg" 'False) (C1 ('MetaCons "NoPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonoValues" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExpandPropGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) | |||||
mkUnqualSystem :: Ident -> PName Source #
origNameToDefPName :: OrigName -> NameSource -> PName Source #
isSystemName :: PName -> Bool Source #