Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Referent' r
- = Ref' r
- | Con' (GConstructorReference r) ConstructorType
- isConstructor :: Referent' r -> Bool
- fold :: (r -> a) -> (r -> ConstructorId -> ConstructorType -> a) -> Referent' r -> a
- reference_ :: Lens (Referent' r) (Referent' r') r r'
- toReference' :: Referent' r -> r
- toTermReference :: Referent' r -> Maybe r
- toTypeReference :: Referent' r -> Maybe r
Documentation
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.
When Ref'
then r
represents a term.
When Con'
then r
is a type declaration.
Instances
Functor Referent' Source # | |
Generic (Referent' r) Source # | |
Show r => Show (Referent' r) Source # | |
Eq r => Eq (Referent' r) Source # | |
Ord r => Ord (Referent' r) Source # | |
Defined in Unison.ReferentPrime | |
type Rep (Referent' r) Source # | |
Defined in Unison.ReferentPrime type Rep (Referent' r) = D1 ('MetaData "Referent'" "Unison.ReferentPrime" "unison-core1-0.0.0-6SyLKzwOxrt37WukuFZrYQ" 'False) (C1 ('MetaCons "Ref'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 r)) :+: C1 ('MetaCons "Con'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GConstructorReference r)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConstructorType))) |
Basic queries
isConstructor :: Referent' r -> Bool Source #
fold :: (r -> a) -> (r -> ConstructorId -> ConstructorType -> a) -> Referent' r -> a Source #
Lenses
reference_ :: Lens (Referent' r) (Referent' r') r r' Source #
A lens onto the reference in a referent.
Conversions
toReference' :: Referent' r -> r Source #
toTermReference :: Referent' r -> Maybe r Source #
toTypeReference :: Referent' r -> Maybe r Source #