| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unison.Util.Defns
Synopsis
- data Defns terms types = Defns {}
- type DefnsF (f :: Type -> Type) terms types = Defns (f terms) (f types)
- type DefnsF2 (f :: Type -> Type) (g :: Type -> Type) terms types = Defns (f (g terms)) (f (g types))
- type DefnsF3 (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) terms types = Defns (f (g (h terms))) (f (g (h types)))
- type DefnsF4 (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) (i :: Type -> Type) terms types = Defns (f (g (h (i terms)))) (f (g (h (i types))))
- terms_ :: forall terms types terms' f. Functor f => (terms -> f terms') -> Defns terms types -> f (Defns terms' types)
- types_ :: forall terms types types' f. Functor f => (types -> f types') -> Defns terms types -> f (Defns terms types')
- alignDefnsWith :: Semialign f => (These a b -> c) -> Defns (f a) (f b) -> f c
- defnsAreEmpty :: (Foldable f, Foldable g) => Defns (f a) (g b) -> Bool
- fromTerms :: Monoid types => terms -> Defns terms types
- fromTypes :: Monoid terms => types -> Defns terms types
- hoistDefnsF :: (forall x. f x -> g x) -> DefnsF f a b -> DefnsF g a b
- mapDefns :: (a -> b) -> Defns a a -> Defns b b
- toPair :: Defns a b -> (a, b)
- unzipDefns :: Defns (tm1, tm2) (ty1, ty2) -> (Defns tm1 ty1, Defns tm2 ty2)
- unzipDefnsWith :: (tm1 -> (tm2, tm3)) -> (ty1 -> (ty2, ty3)) -> Defns tm1 ty1 -> (Defns tm2 ty2, Defns tm3 ty3)
- zipDefns :: Defns tm1 ty1 -> Defns tm2 ty2 -> Defns (tm1, tm2) (ty1, ty2)
- zipDefnsWith :: (tm1 -> tm2 -> tm3) -> (ty1 -> ty2 -> ty3) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3
- zipDefnsWith3 :: (tm1 -> tm2 -> tm3 -> tm4) -> (ty1 -> ty2 -> ty3 -> ty4) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3 -> Defns tm4 ty4
- zipDefnsWith4 :: (tm1 -> tm2 -> tm3 -> tm4 -> tm5) -> (ty1 -> ty2 -> ty3 -> ty4 -> ty5) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3 -> Defns tm4 ty4 -> Defns tm5 ty5
Documentation
data Defns terms types Source #
Definitions (terms and types) in a namespace.
Instances
| Bifoldable Defns Source # | |||||
| Bifunctor Defns Source # | |||||
| Bitraversable Defns Source # | |||||
Defined in Unison.Util.Defns Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Defns a b -> f (Defns c d) # | |||||
| Functor (Defns terms) Source # | |||||
| (NFData terms, NFData types) => NFData (Defns terms types) Source # | |||||
Defined in Unison.Util.Defns | |||||
| (Monoid terms, Monoid types) => Monoid (Defns terms types) Source # | |||||
| (Semigroup terms, Semigroup types) => Semigroup (Defns terms types) Source # | |||||
| Generic (Defns terms types) Source # | |||||
Defined in Unison.Util.Defns Associated Types
| |||||
| (Show terms, Show types) => Show (Defns terms types) Source # | |||||
| (Eq terms, Eq types) => Eq (Defns terms types) Source # | |||||
| (Ord terms, Ord types) => Ord (Defns terms types) Source # | |||||
Defined in Unison.Util.Defns Methods compare :: Defns terms types -> Defns terms types -> Ordering # (<) :: Defns terms types -> Defns terms types -> Bool # (<=) :: Defns terms types -> Defns terms types -> Bool # (>) :: Defns terms types -> Defns terms types -> Bool # (>=) :: Defns terms types -> Defns terms types -> Bool # max :: Defns terms types -> Defns terms types -> Defns terms types # min :: Defns terms types -> Defns terms types -> Defns terms types # | |||||
| type Rep (Defns terms types) Source # | |||||
Defined in Unison.Util.Defns type Rep (Defns terms types) = D1 ('MetaData "Defns" "Unison.Util.Defns" "unison-core1-0.0.0-7C4HRERtMMPLlv1FW49L56" 'False) (C1 ('MetaCons "Defns" 'PrefixI 'True) (S1 ('MetaSel ('Just "terms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 terms) :*: S1 ('MetaSel ('Just "types") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 types))) | |||||
type DefnsF (f :: Type -> Type) terms types = Defns (f terms) (f types) Source #
A common shape of definitions - terms and types are stored in the same structure.
type DefnsF2 (f :: Type -> Type) (g :: Type -> Type) terms types = Defns (f (g terms)) (f (g types)) Source #
type DefnsF3 (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) terms types = Defns (f (g (h terms))) (f (g (h types))) Source #
type DefnsF4 (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) (i :: Type -> Type) terms types = Defns (f (g (h (i terms)))) (f (g (h (i types)))) Source #
terms_ :: forall terms types terms' f. Functor f => (terms -> f terms') -> Defns terms types -> f (Defns terms' types) Source #
types_ :: forall terms types types' f. Functor f => (types -> f types') -> Defns terms types -> f (Defns terms types') Source #
hoistDefnsF :: (forall x. f x -> g x) -> DefnsF f a b -> DefnsF g a b Source #
unzipDefnsWith :: (tm1 -> (tm2, tm3)) -> (ty1 -> (ty2, ty3)) -> Defns tm1 ty1 -> (Defns tm2 ty2, Defns tm3 ty3) Source #
zipDefnsWith :: (tm1 -> tm2 -> tm3) -> (ty1 -> ty2 -> ty3) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3 Source #