unison-codebase-0.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

U.Codebase.Decl

Synopsis

Documentation

data DeclType Source #

Constructors

Data 
Effect 

data Modifier Source #

Constructors

Structural 
Unique Text 

Instances

Instances details
Show Modifier Source # 
Instance details

Defined in U.Codebase.Decl

Eq Modifier Source # 
Instance details

Defined in U.Codebase.Decl

Ord Modifier Source # 
Instance details

Defined in U.Codebase.Decl

data DeclR r v Source #

Constructors

DataDeclaration 

Fields

Instances

Instances details
(Show v, Show r) => Show (DeclR r v) Source # 
Instance details

Defined in U.Codebase.Decl

Methods

showsPrec :: Int -> DeclR r v -> ShowS #

show :: DeclR r v -> String #

showList :: [DeclR r v] -> ShowS #

allVars :: Ord v => DeclR r v -> Set v Source #

vmap :: Ord v' => (v -> v') -> DeclR r v -> DeclR r v' Source #

rmap :: Ord v => (r -> r') -> DeclR r v -> DeclR r' v Source #

Hashing stuff

dependencies :: (Ord r, Ord v) => DeclR r v -> Set r Source #

data V v Source #

Constructors

Bound v 
Ctor Int 

data F a Source #

Constructors

Type (FD a) 
LetRec [a] a 
Constructors [a] 
Modified DeclType Modifier a 

Instances

Instances details
Foldable F Source # 
Instance details

Defined in U.Codebase.Decl

Methods

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 #

toList :: F a -> [a] #

null :: F a -> Bool #

length :: F a -> Int #

elem :: Eq a => a -> F a -> Bool #

maximum :: Ord a => F a -> a #

minimum :: Ord a => F a -> a #

sum :: Num a => F a -> a #

product :: Num a => F a -> a #

Functor F Source # 
Instance details

Defined in U.Codebase.Decl

Methods

fmap :: (a -> b) -> F a -> F b #

(<$) :: a -> F b -> F a #

Show a => Show (F a) Source # 
Instance details

Defined in U.Codebase.Decl

Methods

showsPrec :: Int -> F a -> ShowS #

show :: F a -> String #

showList :: [F a] -> ShowS #

unhashComponent Source #

Arguments

:: 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.