Portability | unknown |
---|---|

Stability | experimental |

Maintainer | ex8k.hibino@gmail.com |

Safe Haskell | None |

This module defines typed projection path objects. Contains normal interfaces.

- data Pi r0 r1
- pfmap :: ProductConstructor (a -> b) => (a -> b) -> Pi r a -> Pi r b
- pap :: Pi r (a -> b) -> Pi r a -> Pi r b
- (<.>) :: Pi a b -> Pi b c -> Pi a c
- (<?.>) :: Pi a (Maybe b) -> Pi b c -> Pi a (Maybe c)
- (<?.?>) :: Pi a (Maybe b) -> Pi b (Maybe c) -> Pi a (Maybe c)
- id' :: PersistableWidth a => Pi a a
- fst' :: PersistableWidth a => Pi (a, b) a
- snd' :: (PersistableWidth a, PersistableWidth b) => Pi (a, b) b

# Projection path

Projection path from type `r0`

into type `r1`

.
This type also indicate key object which type is `r1`

for record type `r0`

.

ProjectableApplicative (Pi a) | Compose projection path |

ProjectableFunctor (Pi a) | Compose seed of projection path |

pfmap :: ProductConstructor (a -> b) => (a -> b) -> Pi r a -> Pi r bSource

Projectable fmap of `Pi`

type.

id' :: PersistableWidth a => Pi a aSource

Identity projection path.

:: PersistableWidth a | |

=> Pi (a, b) a | Projection path of fst. |

Projection path for fst of tuple.

:: (PersistableWidth a, PersistableWidth b) | |

=> Pi (a, b) b | Projection path of snd. |

Projection path for snd of tuple.