| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unison.ReferentPrime
Contents
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_ :: forall r r' f. Functor f => (r -> f r') -> Referent' r -> f (Referent' r')
- termReference_ :: forall r p f. (Choice p, Applicative f) => p r (f r) -> p (Referent' r) (f (Referent' 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.
Constructors
| Ref' r | |
| Con' (GConstructorReference r) ConstructorType |
Instances
Basic queries
isConstructor :: Referent' r -> Bool Source #
fold :: (r -> a) -> (r -> ConstructorId -> ConstructorType -> a) -> Referent' r -> a Source #
Lenses
reference_ :: forall r r' f. Functor f => (r -> f r') -> Referent' r -> f (Referent' r') Source #
A lens onto the reference in a referent.
termReference_ :: forall r p f. (Choice p, Applicative f) => p r (f r) -> p (Referent' r) (f (Referent' r)) Source #
A prism onto the term reference in a referent.
Conversions
toReference' :: Referent' r -> r Source #
toTermReference :: Referent' r -> Maybe r Source #
toTypeReference :: Referent' r -> Maybe r Source #