Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Referent = Referent' Reference
- pattern Ref :: TermReference -> Referent
- pattern Con :: ConstructorReference -> ConstructorType -> Referent
- type Id = Referent' Id
- pattern RefId :: Id -> Id
- pattern ConId :: ConstructorReferenceId -> ConstructorType -> Id
- fold :: (r -> a) -> (r -> ConstructorId -> ConstructorType -> a) -> Referent' r -> a
- toId :: Referent -> Maybe Id
- toReference :: Referent -> Reference
- toReferenceId :: Referent -> Maybe Id
- toConstructorReference :: Referent' r -> Maybe (GConstructorReference r)
- toConstructorReferenceId :: Referent -> Maybe ConstructorReferenceId
- toTermReference :: Referent' r -> Maybe r
- toTermReferenceId :: Referent -> Maybe TermReferenceId
- fromId :: Id -> Referent
- fromTermReference :: TermReference -> Referent
- fromTermReferenceId :: TermReferenceId -> Referent
- fromText :: Text -> Maybe Referent
- reference_ :: Lens (Referent' r) (Referent' r') r r'
- isPrefixOf :: ShortHash -> Referent -> Bool
- toShortHash :: Referent -> ShortHash
- toText :: Referent -> Text
- toString :: Referent -> String
Documentation
type Referent = Referent' Reference Source #
Specifies a term.
Either a term Reference
, a data constructor, or an effect constructor.
Slightly odd naming. This is the "referent of term name in the codebase", rather than the target of a Reference.
pattern Ref :: TermReference -> Referent Source #
pattern Con :: ConstructorReference -> ConstructorType -> Referent Source #
pattern ConId :: ConstructorReferenceId -> ConstructorType -> Id Source #
fold :: (r -> a) -> (r -> ConstructorId -> ConstructorType -> a) -> Referent' r -> a Source #
toReference :: Referent -> Reference Source #
toConstructorReference :: Referent' r -> Maybe (GConstructorReference r) Source #
toTermReference :: Referent' r -> Maybe r Source #
fromTermReference :: TermReference -> Referent Source #
Inject a Term Reference into a Referent
Lenses
reference_ :: Lens (Referent' r) (Referent' r') r r' Source #
A lens onto the reference in a referent.
ShortHash helpers
toShortHash :: Referent -> ShortHash Source #