clash-lib-1.8.4: Clash: a functional hardware description language - As a library

Copyright | (C) 2017 Google Inc.
License | BSD2 (see the file LICENSE)
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com>
Safe Haskell | None
Language | Haskell2010

Clash.Core.Name

Description

Names

Synopsis

- data NameSort
  - = User
  - | System
  - | Internal
- data Name a = Name {
  - nameSort :: NameSort
  - nameOcc :: !OccName
  - nameUniq :: !Unique
  - nameLoc :: !SrcSpan
  }
- type OccName = Text
- mkUnsafeInternalName :: Text -> Unique -> Name a
- mkUnsafeSystemName :: Text -> Unique -> Name a
- appendToName :: Name a -> Text -> Name a
- mkUnsafeName :: NameSort -> Text -> Unique -> Name a
- noSrcSpan :: SrcSpan

# Documentation

data NameSort Source #

Constructors

User |
System |
Internal |

#### Instances

Instances details

Binary NameSort Source # |
Instance details Defined in Clash.Core.Name Methods put :: NameSort -> Put Source # get :: Get NameSort Source # putList :: [NameSort] -> Put Source #
NFData NameSort Source # |
Instance details Defined in Clash.Core.Name Methods rnf :: NameSort -> () Source #
Generic NameSort Source # |

Instance details

Defined in Clash.Core.Name

Associated Types

type Rep NameSort |
Instance details Defined in Clash.Core.Name type Rep NameSort = D1 ('MetaData "NameSort" "Clash.Core.Name" "clash-lib-1.8.4-CsViYhmcYd4KTpfwGN07cn" 'False) (C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "System" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Internal" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: NameSort -> Rep NameSort x Source #

to :: Rep NameSort x -> NameSort Source #

Show NameSort Source # |
Instance details Defined in Clash.Core.Name Methods showsPrec :: Int -> NameSort -> ShowS Source # show :: NameSort -> String Source # showList :: [NameSort] -> ShowS Source #
Eq NameSort Source # |
Instance details Defined in Clash.Core.Name Methods (==) :: NameSort -> NameSort -> Bool Source # (/=) :: NameSort -> NameSort -> Bool Source #
Ord NameSort Source # |
Instance details Defined in Clash.Core.Name Methods compare :: NameSort -> NameSort -> Ordering Source # (<) :: NameSort -> NameSort -> Bool Source # (<=) :: NameSort -> NameSort -> Bool Source # (>) :: NameSort -> NameSort -> Bool Source # (>=) :: NameSort -> NameSort -> Bool Source # max :: NameSort -> NameSort -> NameSort Source # min :: NameSort -> NameSort -> NameSort Source #
Hashable NameSort Source # |
Instance details Defined in Clash.Core.Name Methods hashWithSalt :: Int -> NameSort -> Int Source # hash :: NameSort -> Int Source #
type Rep NameSort Source # |
Instance details Defined in Clash.Core.Name type Rep NameSort = D1 ('MetaData "NameSort" "Clash.Core.Name" "clash-lib-1.8.4-CsViYhmcYd4KTpfwGN07cn" 'False) (C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "System" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Internal" 'PrefixI 'False) (U1 :: Type -> Type)))

data Name a Source #

Constructors

Name |

Fields

- nameSort :: NameSort
- nameOcc :: !OccName
- nameUniq :: !Unique
- nameLoc :: !SrcSpan

#### Instances

Instances details

Binary (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods put :: Name a -> Put Source # get :: Get (Name a) Source # putList :: [Name a] -> Put Source #
PrettyPrec (Name a) Source # |
Instance details Defined in Clash.Core.Pretty Methods pprPrec :: Monad m => Rational -> Name a -> m ClashDoc Source # pprPrec' :: Monad m => PrettyOptions -> Rational -> Name a -> m ClashDoc Source #
ClashPretty (Name a) Source # |
Instance details Defined in Clash.Core.Pretty Methods clashPretty :: Name a -> Doc () Source #
Uniquable (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods getUnique :: Name a -> Unique Source # setUnique :: Name a -> Unique -> Name a Source #
NFData (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods rnf :: Name a -> () Source #
Generic (Name a) Source # |

Instance details

Defined in Clash.Core.Name

Associated Types

type Rep (Name a) |

Instance details

Defined in Clash.Core.Name

type Rep (Name a) = D1 ('MetaData "Name" "Clash.Core.Name" "clash-lib-1.8.4-CsViYhmcYd4KTpfwGN07cn" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nameSort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameSort) :*: S1 ('MetaSel ('Just "nameOcc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)) :*: (S1 ('MetaSel ('Just "nameUniq") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Unique) :*: S1 ('MetaSel ('Just "nameLoc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SrcSpan))))

Methods

from :: Name a -> Rep (Name a) x Source #

to :: Rep (Name a) x -> Name a Source #

Show (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods showsPrec :: Int -> Name a -> ShowS Source # show :: Name a -> String Source # showList :: [Name a] -> ShowS Source #
Eq (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods (==) :: Name a -> Name a -> Bool Source # (/=) :: Name a -> Name a -> Bool Source #
Ord (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods compare :: Name a -> Name a -> Ordering Source # (<) :: Name a -> Name a -> Bool Source # (<=) :: Name a -> Name a -> Bool Source # (>) :: Name a -> Name a -> Bool Source # (>=) :: Name a -> Name a -> Bool Source # max :: Name a -> Name a -> Name a Source # min :: Name a -> Name a -> Name a Source #
Hashable (Name a) Source # |
Instance details Defined in Clash.Core.Name Methods hashWithSalt :: Int -> Name a -> Int Source # hash :: Name a -> Int Source #
type Rep (Name a) Source # |

Instance details

Defined in Clash.Core.Name

type Rep (Name a) = D1 ('MetaData "Name" "Clash.Core.Name" "clash-lib-1.8.4-CsViYhmcYd4KTpfwGN07cn" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nameSort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameSort) :*: S1 ('MetaSel ('Just "nameOcc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)) :*: (S1 ('MetaSel ('Just "nameUniq") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Unique) :*: S1 ('MetaSel ('Just "nameLoc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SrcSpan))))

type OccName = Text Source #

mkUnsafeInternalName :: Text -> Unique -> Name a Source #

mkUnsafeSystemName :: Text -> Unique -> Name a Source #

appendToName :: Name a -> Text -> Name a Source #

mkUnsafeName :: NameSort -> Text -> Unique -> Name a Source #

noSrcSpan :: SrcSpan Source #

Built-in "bad" `SrcSpan`s for common sources of location uncertainty