Safe Haskell | None |
---|---|
Language | Haskell2010 |
Example of how to use `unbound-kind-generics`
Documentation
Well-typed lambda expressions
V :: Var t -> Expr t | |
Lam :: (Typeable a, Typeable b) => Bind (Var a) (Expr b) -> Expr (a -> b) | |
App :: Typeable a => Expr (a -> b) -> Expr a -> Expr b |
Instances
GenericK (Expr t :: Type) Source # | |
Show (Expr t) Source # | |
Typeable t => Alpha (Expr t) Source # | |
Defined in Unbound.Generics.LocallyNameless.Kind.Example aeq' :: AlphaCtx -> Expr t -> Expr t -> Bool fvAny' :: (Contravariant f, Applicative f) => AlphaCtx -> (AnyName -> f AnyName) -> Expr t -> f (Expr t) close :: AlphaCtx -> NamePatFind -> Expr t -> Expr t open :: AlphaCtx -> NthPatFind -> Expr t -> Expr t isPat :: Expr t -> DisjointSet AnyName nthPatFind :: Expr t -> NthPatFind namePatFind :: Expr t -> NamePatFind swaps' :: AlphaCtx -> Perm AnyName -> Expr t -> Expr t lfreshen' :: LFresh m => AlphaCtx -> Expr t -> (Expr t -> Perm AnyName -> m b) -> m b freshen' :: Fresh m => AlphaCtx -> Expr t -> m (Expr t, Perm AnyName) | |
(Typeable small, Typeable big) => Subst (Expr small) (Expr big) Source # | |
GenericK Expr Source # | |
type RepK (Expr t :: Type) Source # | |
Defined in Unbound.Generics.LocallyNameless.Kind.Example type RepK (Expr t :: Type) = D1 (MetaData "Expr" "Unbound.Generics.LocallyNameless.Kind.Example" "unbound-kind-generics-0.2.1.0-inplace" False) (C1 (MetaCons "V" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field (Kon (Name (Expr t)) :: Atom Type Type))) :+: (C1 (MetaCons "Lam" PrefixI False) (Exists Type (Exists Type ((((Kon ((~~) t :: Type -> Constraint) :: Atom (Type -> Type -> Type) (Type -> Constraint)) :@: (((Kon ((->) :: Type -> Type -> Type) :: Atom (Type -> Type -> Type) (Type -> Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)) :@: (Var1 :: Atom (Type -> Type -> Type) Type))) :&: (((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type -> Type) (Type -> Constraint)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)) :&: ((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type -> Type) (Type -> Constraint)) :@: (Var1 :: Atom (Type -> Type -> Type) Type)))) :=>: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field (((Kon Bind :: Atom (Type -> Type -> Type) (Type -> Type -> Type)) :@: ((Kon Name :: Atom (Type -> Type -> Type) (Type -> Type)) :@: ((Kon Expr :: Atom (Type -> Type -> Type) (Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)))) :@: ((Kon Expr :: Atom (Type -> Type -> Type) (Type -> Type)) :@: (Var1 :: Atom (Type -> Type -> Type) Type))))))) :+: C1 (MetaCons "App" PrefixI False) (Exists Type (((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type) (Type -> Constraint)) :@: (Var0 :: Atom (Type -> Type) Type)) :=>: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field ((Kon Expr :: Atom (Type -> Type) (Type -> Type)) :@: (((Kon ((->) :: Type -> Type -> Type) :: Atom (Type -> Type) (Type -> Type -> Type)) :@: (Var0 :: Atom (Type -> Type) Type)) :@: (Kon t :: Atom (Type -> Type) Type)))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field ((Kon Expr :: Atom (Type -> Type) (Type -> Type)) :@: (Var0 :: Atom (Type -> Type) Type)))))))) | |
type RepK Expr Source # | |
Defined in Unbound.Generics.LocallyNameless.Kind.Example type RepK Expr = D1 (MetaData "Expr" "Unbound.Generics.LocallyNameless.Kind.Example" "unbound-kind-generics-0.2.1.0-inplace" False) (C1 (MetaCons "V" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field ((Kon Name :: Atom (Type -> Type) (Type -> Type)) :@: ((Kon Expr :: Atom (Type -> Type) (Type -> Type)) :@: (Var0 :: Atom (Type -> Type) Type))))) :+: (C1 (MetaCons "Lam" PrefixI False) (Exists Type (Exists Type (((((Kon ((~~) :: Type -> Type -> Constraint) :: Atom (Type -> Type -> Type -> Type) (Type -> Type -> Constraint)) :@: (Var2 :: Atom (Type -> Type -> Type -> Type) Type)) :@: (((Kon ((->) :: Type -> Type -> Type) :: Atom (Type -> Type -> Type -> Type) (Type -> Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type -> Type) Type)) :@: (Var1 :: Atom (Type -> Type -> Type -> Type) Type))) :&: (((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type -> Type -> Type) (Type -> Constraint)) :@: (Var0 :: Atom (Type -> Type -> Type -> Type) Type)) :&: ((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type -> Type -> Type) (Type -> Constraint)) :@: (Var1 :: Atom (Type -> Type -> Type -> Type) Type)))) :=>: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field (((Kon Bind :: Atom (Type -> Type -> Type -> Type) (Type -> Type -> Type)) :@: ((Kon Name :: Atom (Type -> Type -> Type -> Type) (Type -> Type)) :@: ((Kon Expr :: Atom (Type -> Type -> Type -> Type) (Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type -> Type) Type)))) :@: ((Kon Expr :: Atom (Type -> Type -> Type -> Type) (Type -> Type)) :@: (Var1 :: Atom (Type -> Type -> Type -> Type) Type))))))) :+: C1 (MetaCons "App" PrefixI False) (Exists Type (((Kon (Typeable :: Type -> Constraint) :: Atom (Type -> Type -> Type) (Type -> Constraint)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)) :=>: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field ((Kon Expr :: Atom (Type -> Type -> Type) (Type -> Type)) :@: (((Kon ((->) :: Type -> Type -> Type) :: Atom (Type -> Type -> Type) (Type -> Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)) :@: (Var1 :: Atom (Type -> Type -> Type) Type)))) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Field ((Kon Expr :: Atom (Type -> Type -> Type) (Type -> Type)) :@: (Var0 :: Atom (Type -> Type -> Type) Type)))))))) |