unison-core1-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Util.Defns

Synopsis

Documentation

data Defns terms types Source #

Definitions (terms and types) in a namespace.

Constructors

Defns 

Fields

Instances

Instances details
Bifoldable Defns Source # 
Instance details

Defined in Unison.Util.Defns

Methods

bifold :: Monoid m => Defns m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Defns a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Defns a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Defns a b -> c #

Bifunctor Defns Source # 
Instance details

Defined in Unison.Util.Defns

Methods

bimap :: (a -> b) -> (c -> d) -> Defns a c -> Defns b d #

first :: (a -> b) -> Defns a c -> Defns b c #

second :: (b -> c) -> Defns a b -> Defns a c #

Bitraversable Defns Source # 
Instance details

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 # 
Instance details

Defined in Unison.Util.Defns

Methods

fmap :: (a -> b) -> Defns terms a -> Defns terms b #

(<$) :: a -> Defns terms b -> Defns terms a #

(Monoid terms, Monoid types) => Monoid (Defns terms types) Source # 
Instance details

Defined in Unison.Util.Defns

Methods

mempty :: Defns terms types #

mappend :: Defns terms types -> Defns terms types -> Defns terms types #

mconcat :: [Defns terms types] -> Defns terms types #

(Semigroup terms, Semigroup types) => Semigroup (Defns terms types) Source # 
Instance details

Defined in Unison.Util.Defns

Methods

(<>) :: Defns terms types -> Defns terms types -> Defns terms types #

sconcat :: NonEmpty (Defns terms types) -> Defns terms types #

stimes :: Integral b => b -> Defns terms types -> Defns terms types #

Generic (Defns terms types) Source # 
Instance details

Defined in Unison.Util.Defns

Associated Types

type Rep (Defns terms types) :: Type -> Type #

Methods

from :: Defns terms types -> Rep (Defns terms types) x #

to :: Rep (Defns terms types) x -> Defns terms types #

(Show terms, Show types) => Show (Defns terms types) Source # 
Instance details

Defined in Unison.Util.Defns

Methods

showsPrec :: Int -> Defns terms types -> ShowS #

show :: Defns terms types -> String #

showList :: [Defns terms types] -> ShowS #

type Rep (Defns terms types) Source # 
Instance details

Defined in Unison.Util.Defns

type Rep (Defns terms types) = D1 ('MetaData "Defns" "Unison.Util.Defns" "unison-core1-0.0.0-Kp7ZcNnt5XdB8ImvFwyntI" '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 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 g terms types = Defns (f (g terms)) (f (g types)) Source #

type DefnsF3 f g h terms types = Defns (f (g (h terms))) (f (g (h types))) Source #

type DefnsF4 f g h i terms types = Defns (f (g (h (i terms)))) (f (g (h (i types)))) Source #

alignDefnsWith :: Semialign f => (These a b -> c) -> Defns (f a) (f b) -> f c Source #

defnsAreEmpty :: (Foldable f, Foldable g) => Defns (f a) (g b) -> Bool Source #

hoistDefnsF :: (forall x. f x -> g x) -> DefnsF f a b -> DefnsF g a b Source #

mapDefns :: (a -> b) -> Defns a a -> Defns b b Source #

unzipDefns :: Defns (tm1, tm2) (ty1, ty2) -> (Defns tm1 ty1, Defns tm2 ty2) Source #

unzipDefnsWith :: (tm1 -> (tm2, tm3)) -> (ty1 -> (ty2, ty3)) -> Defns tm1 ty1 -> (Defns tm2 ty2, Defns tm3 ty3) Source #

zipDefns :: Defns tm1 ty1 -> Defns tm2 ty2 -> Defns (tm1, tm2) (ty1, ty2) Source #

zipDefnsWith :: (tm1 -> tm2 -> tm3) -> (ty1 -> ty2 -> ty3) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3 Source #

zipDefnsWith3 :: (tm1 -> tm2 -> tm3 -> tm4) -> (ty1 -> ty2 -> ty3 -> ty4) -> Defns tm1 ty1 -> Defns tm2 ty2 -> Defns tm3 ty3 -> Defns tm4 ty4 Source #

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 Source #