Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type ConstructorId = Word64
- data DeclType
- type Decl v = DeclR TypeRef v
- type HashableDecl v = DeclR HashableTypeRef v
- type TypeRef = Reference' Text (Maybe Hash)
- type HashableTypeRef = Reference' Text Hash
- type Type v = TypeR TypeRef v
- type HashableType v = TypeR HashableTypeRef v
- data Modifier
- = Structural
- | Unique Text
- data DeclR r v = DataDeclaration {}
- allVars :: Ord v => DeclR r v -> Set v
- vmap :: Ord v' => (v -> v') -> DeclR r v -> DeclR r v'
- rmap :: Ord v => (r -> r') -> DeclR r v -> DeclR r' v
- dependencies :: (Ord r, Ord v) => DeclR r v -> Set r
- data V v
- data F a
- unhashComponent :: forall v extra. Var v => Hash -> (Id -> v) -> Map Id (Decl v, extra) -> Map Id (v, HashableDecl v, extra)
Documentation
type ConstructorId = Word64 Source #
Instances
Enum DeclType Source # | |
Show DeclType Source # | |
Eq DeclType Source # | |
Ord DeclType Source # | |
Defined in U.Codebase.Decl |
type HashableDecl v = DeclR HashableTypeRef v Source #
type HashableTypeRef = Reference' Text Hash Source #
type HashableType v = TypeR HashableTypeRef v Source #
Hashing stuff
Instances
Foldable F Source # | |
Defined in U.Codebase.Decl fold :: Monoid m => F m -> m # foldMap :: Monoid m => (a -> m) -> F a -> m # foldMap' :: Monoid m => (a -> m) -> F a -> m # foldr :: (a -> b -> b) -> b -> F a -> b # foldr' :: (a -> b -> b) -> b -> F a -> b # foldl :: (b -> a -> b) -> b -> F a -> b # foldl' :: (b -> a -> b) -> b -> F a -> b # foldr1 :: (a -> a -> a) -> F a -> a # foldl1 :: (a -> a -> a) -> F a -> a # elem :: Eq a => a -> F a -> Bool # maximum :: Ord a => F a -> a # | |
Functor F Source # | |
Show a => Show (F a) Source # | |
:: forall v extra. Var v | |
=> Hash | |
-> (Id -> v) | A function to convert a reference to a variable. The actual var names aren't important. |
-> Map Id (Decl v, extra) | |
-> Map Id (v, HashableDecl v, extra) | The component with all self-references replaced with variable references. |
Given the pieces of a single decl component,
replaces all Nothing
self-referential hashes with a variable reference
to the relevant piece of the component in the component map.