Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TrivialK (ki :: kon -> *) :: kon -> * where
- data At (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: Atom kon -> * where
- data Al (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: [Atom kon] -> [Atom kon] -> * where
- data Spine (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: [[Atom kon]] -> [[Atom kon]] -> * where
- data Ctx (ki :: kon -> *) (codes :: [[[Atom kon]]]) (p :: Nat -> Nat -> *) (ix :: Nat) :: [Atom kon] -> * where
- type InsCtx ki codes ix xs = Ctx ki codes (Almu ki codes) ix xs
- type DelCtx ki codes ix xs = Ctx ki codes (AlmuMin ki codes) ix xs
- newtype AlmuMin ki codes ix iy = AlmuMin {}
- data Almu (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: Nat -> Nat -> * where
Functorial Changes
Represents changes on the first layer of two values of mutually recursive families. For a more in-depth explanation of the datatypes and their meaning we refer the interested reader to the relevant literature:
- Miraldo, Dagand and Swierstra, TyDe 2017 pdf
- van Putten, MSc thesis https://dspace.library.uu.nl/handle/1874/380853
data TrivialK (ki :: kon -> *) :: kon -> * where Source #
Represents a change between two opaque values. When they are equal represents a copy.
data At (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: Atom kon -> * where Source #
Represents a change between two atoms, where an atom is either a recursive or an opaque value.
data Al (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: [Atom kon] -> [Atom kon] -> * where Source #
Represents an alignment between two product of atoms.
data Spine (ki :: kon -> *) (codes :: [[[Atom kon]]]) :: [[Atom kon]] -> [[Atom kon]] -> * where Source #
Represents a change at the coproduct structure.
Fixpoint Changes
The next datatypes represent a sequence of Spine
, Al
and At
assembled
coupled with operators to describe changes in the recursive structure such
as inserting and deleting constructors.
data Ctx (ki :: kon -> *) (codes :: [[[Atom kon]]]) (p :: Nat -> Nat -> *) (ix :: Nat) :: [Atom kon] -> * where Source #
Represents a one-hole context over a NP (NA ki (fix ki codes)) xs
where
the hole is in a distinguished element indexed by 'I ix
and is filled
with applying p
to the relevant indexes.
type InsCtx ki codes ix xs = Ctx ki codes (Almu ki codes) ix xs Source #
Simple synonym for contexts.
type DelCtx ki codes ix xs = Ctx ki codes (AlmuMin ki codes) ix xs Source #
A deletion context needs to swap the indexes in the hole, hence we use a newtype for that.