Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Reference = Reference' Text Hash
- type RReference = Reference' Text (Maybe Hash)
- type TermReference = Reference
- type TermRReference = RReference
- type TermReferenceId = Id
- type TypeReference = Reference
- type TypeRReference = RReference
- type TypeReferenceId = Id
- data Reference' t h
- = ReferenceBuiltin t
- | ReferenceDerived (Id' h)
- type TermReference' t h = Reference' t h
- type TypeReference' t h = Reference' t h
- data ReferenceType
- pattern Derived :: h -> Pos -> Reference' t h
- type Id = Id' Hash
- data Id' h = Id h Pos
- type Pos = Word64
- _ReferenceDerived :: Prism (Reference' t h) (Reference' t h') (Id' h) (Id' h')
- _RReferenceReference :: Prism' (Reference' t (Maybe h)) (Reference' t h)
- t_ :: Prism (Reference' t h) (Reference' t' h) t t'
- h_ :: Traversal (Reference' t h) (Reference' t h') h h'
- idH :: Lens (Id' h) (Id' h') h h'
- idPos :: Lens' (Id' h) Pos
- idToHash :: Id -> Hash
- idToShortHash :: Id -> ShortHash
- isBuiltin :: Reference -> Bool
- toShortHash :: Reference -> ShortHash
- toId :: Reference -> Maybe Id
- unsafeId :: Reference -> Id
- component :: Hash -> [k] -> [(k, Id)]
Documentation
type RReference = Reference' Text (Maybe Hash) Source #
A possibly-self (R = "recursive") reference.
type TermReference = Reference Source #
A term reference.
type TermRReference = RReference Source #
A possibly-self term reference.
type TermReferenceId = Id Source #
A term reference id.
type TypeReference = Reference Source #
A type declaration reference.
type TypeRReference = RReference Source #
A possibly-self type declaration reference.
type TypeReferenceId = Id Source #
A type declaration reference id.
data Reference' t h Source #
Either a builtin or a user defined (hashed) top-level declaration. Used for both terms and types.
Instances
type TermReference' t h = Reference' t h Source #
A type declaration reference.
type TypeReference' t h = Reference' t h Source #
A term declaration reference.
data ReferenceType Source #
Instances
Show ReferenceType Source # | |
Defined in U.Codebase.Reference showsPrec :: Int -> ReferenceType -> ShowS # show :: ReferenceType -> String # showList :: [ReferenceType] -> ShowS # | |
Eq ReferenceType Source # | |
Defined in U.Codebase.Reference (==) :: ReferenceType -> ReferenceType -> Bool # (/=) :: ReferenceType -> ReferenceType -> Bool # | |
Ord ReferenceType Source # | |
Defined in U.Codebase.Reference compare :: ReferenceType -> ReferenceType -> Ordering # (<) :: ReferenceType -> ReferenceType -> Bool # (<=) :: ReferenceType -> ReferenceType -> Bool # (>) :: ReferenceType -> ReferenceType -> Bool # (>=) :: ReferenceType -> ReferenceType -> Bool # max :: ReferenceType -> ReferenceType -> ReferenceType # min :: ReferenceType -> ReferenceType -> ReferenceType # |
pattern Derived :: h -> Pos -> Reference' t h Source #
Pos
is a position into a cycle, as cycles are hashed together.
Instances
Foldable Id' Source # | |
Defined in U.Codebase.Reference fold :: Monoid m => Id' m -> m # foldMap :: Monoid m => (a -> m) -> Id' a -> m # foldMap' :: Monoid m => (a -> m) -> Id' a -> m # foldr :: (a -> b -> b) -> b -> Id' a -> b # foldr' :: (a -> b -> b) -> b -> Id' a -> b # foldl :: (b -> a -> b) -> b -> Id' a -> b # foldl' :: (b -> a -> b) -> b -> Id' a -> b # foldr1 :: (a -> a -> a) -> Id' a -> a # foldl1 :: (a -> a -> a) -> Id' a -> a # elem :: Eq a => a -> Id' a -> Bool # maximum :: Ord a => Id' a -> a # | |
Traversable Id' Source # | |
Functor Id' Source # | |
Show h => Show (Id' h) Source # | |
Eq h => Eq (Id' h) Source # | |
Ord h => Ord (Id' h) Source # | |
_ReferenceDerived :: Prism (Reference' t h) (Reference' t h') (Id' h) (Id' h') Source #
_RReferenceReference :: Prism' (Reference' t (Maybe h)) (Reference' t h) Source #
t_ :: Prism (Reference' t h) (Reference' t' h) t t' Source #
h_ :: Traversal (Reference' t h) (Reference' t h') h h' Source #
idToShortHash :: Id -> ShortHash Source #
toShortHash :: Reference -> ShortHash Source #