verifiable-expressions-0.4.0: An intermediate language for Hoare logic style verification.

Safe HaskellSafe
LanguageHaskell2010

Language.Expression.Scope

Synopsis

Documentation

class HBound k where Source #

Minimal complete definition

(^>>>=)

Methods

(^>>>=) :: HMonad h => k h t a -> (forall b. t b -> h t' b) -> k h t' a Source #

Instances

HBound k k (Scope k g) Source # 

Methods

(^>>>=) :: HMonad (Scope k g) h => k h t a -> (forall (b :: Scope k g). t b -> h t' b) -> k h t' a Source #

data BV g f a where Source #

Constructors

B :: g a -> BV g f a

Bound variable

F :: f a -> BV g f a

Free variable

Instances

HBifoldableAt k1 k2 (BV k1) Source # 

Methods

hbifoldMap :: (forall (b :: k2). f b -> BV k1 b) -> (forall (b :: k2). g b -> BV k1 b) -> h f g a -> BV k1 a Source #

Pretty1 k t => Pretty2 k k (BV k t) Source # 

Methods

pretty2 :: Pretty1 (BV k t) t => op t a -> String Source #

prettys2Prec :: Pretty1 (BV k t) t => Int -> op t a -> ShowS Source #

HBitraversable k (BV k) Source # 

Methods

hbitraverse :: Applicative f => (forall (b :: BV k). s b -> f (s' b)) -> (forall (b :: BV k). t b -> f (t' b)) -> h s t a -> f (h s' t' a) Source #

HBifunctor k (BV k) Source # 

Methods

hbimap :: (forall (b :: BV k). s b -> s' b) -> (forall (b :: BV k). t b -> t' b) -> h s t a -> h s' t' a Source #

hfirst :: (forall (b :: BV k). s b -> s' b) -> h s t a -> h s' t a Source #

hsecond :: (forall (b :: BV k). t b -> t' b) -> h s t a -> h s t' a Source #

HTraversable u (BV u g) Source # 

Methods

htraverse :: Applicative f => (forall (b :: BV u g). t b -> f (t' b)) -> h t a -> f (h t' a) Source #

hsequence :: Applicative f => h (Compose * (BV u g) f t) a -> f (h t a) Source #

HMonad k (BV k g) Source # 
HBind k (BV k g) Source # 

Methods

(^>>=) :: h t a -> (forall (b :: BV k g). t b -> h t' b) -> h t' a Source #

HPointed k (BV k g) Source # 

Methods

hpure :: t a -> h t a Source #

HFunctor u (BV u g) Source # 

Methods

hmap :: (forall (b :: BV u g). t b -> t' b) -> h t a -> h t' a Source #

foldBV :: (w a -> r) -> (v a -> r) -> BV w v a -> r Source #

hbitraverseBV :: Functor t => (g a -> t (g' b)) -> (f a -> t (f' b)) -> BV g f a -> t (BV g' f' b) Source #

hbimapBV :: (g a -> g' b) -> (f a -> f' b) -> BV g f a -> BV g' f' b Source #

newtype Scope g h f a Source #

Constructors

Scope 

Fields

Instances

HDuofoldableAt k1 k2 (Scope k1 k2) Source # 

Methods

hduofoldMap :: HTraversable k2 s => (forall (g :: k2 -> *) (b :: k2). (forall (c :: k2). g c -> Scope k1 k2 c) -> s g b -> Scope k1 k2 b) -> (forall (b :: k2). t b -> Scope k1 k2 b) -> h s t a -> Scope k1 k2 a Source #

HBound k k (Scope k g) Source # 

Methods

(^>>>=) :: HMonad (Scope k g) h => k h t a -> (forall (b :: Scope k g). t b -> h t' b) -> k h t' a Source #

(Pretty2 k k h, Pretty1 k t) => Pretty2 k k (Scope k t h) Source # 

Methods

pretty2 :: Pretty1 (Scope k t h) t => op t a -> String Source #

prettys2Prec :: Pretty1 (Scope k t h) t => Int -> op t a -> ShowS Source #

HDuotraversable u (Scope u g) Source # 

Methods

hduotraverse :: Applicative f => (forall (a :: Scope u g -> *) (g' :: Scope u g -> *) (b :: Scope u g). (forall (c :: Scope u g). a c -> f (g' c)) -> s a b -> f (s' g' b)) -> (forall (b :: Scope u g). t b -> f (t' b)) -> h s t a -> f (h s' t' a) Source #

HDuofunctor u (Scope u g) Source # 

Methods

hduomap :: (forall (a :: Scope u g -> *) (g' :: Scope u g -> *) (b :: Scope u g). (forall (c :: Scope u g). a c -> g' c) -> s a b -> s' g' b) -> (forall (b :: Scope u g). t b -> t' b) -> h s t a -> h s' t' a Source #

HTraversable u h => HTraversable u (Scope u g h) Source # 

Methods

htraverse :: Applicative f => (forall (b :: Scope u g h). t b -> f (t' b)) -> h t a -> f (h t' a) Source #

hsequence :: Applicative f => h (Compose * (Scope u g h) f t) a -> f (h t a) Source #

HPointed k h => HPointed k (Scope k g h) Source # 

Methods

hpure :: t a -> h t a Source #

HFunctor u h => HFunctor u (Scope u g h) Source # 

Methods

hmap :: (forall (b :: Scope u g h). t b -> t' b) -> h t a -> h t' a Source #

_Scope :: Iso (Scope g h f a) (Scope g' h' f' a') (h (BV g (h f)) a) (h' (BV g' (h' f')) a') Source #

hbitraverseScope :: (Applicative t, HTraversable h) => (forall b. g b -> t (g' b)) -> (forall b. f b -> t (f' b)) -> Scope g h f a -> t (Scope g' h f' a) Source #

freeVar :: HPointed h => f a -> Scope g h f a Source #

boundVar :: HPointed h => g a -> Scope g h f a Source #

liftScope :: (HFunctor h, HPointed h) => h f a -> Scope g h f a Source #

abstractTraverse :: (HMonad h, HTraversable h, Applicative t) => (forall b. f b -> t (Maybe (g b))) -> h f a -> t (Scope g h f a) Source #

abstract :: HMonad h => (forall b. f b -> Maybe (g b)) -> h f a -> Scope g h f a Source #

newtype Scoped h f g a Source #

Sometimes it's convenient to move around the type arguments to Scope.

Constructors

Scoped 

Fields

Instances

(HFunctor k1 h, HFoldableAt k1 k2 h) => HBifoldableAt k1 k2 (Scoped k1 h) Source # 

Methods

hbifoldMap :: (forall (b :: k2). f b -> Scoped k1 h b) -> (forall (b :: k2). g b -> Scoped k1 h b) -> h f g a -> Scoped k1 h a Source #

(Pretty2 k k h, Pretty1 k t) => Pretty2 k k (Scoped k h t) Source # 

Methods

pretty2 :: Pretty1 (Scoped k h t) t => op t a -> String Source #

prettys2Prec :: Pretty1 (Scoped k h t) t => Int -> op t a -> ShowS Source #

HTraversable k h => HBitraversable k (Scoped k h) Source # 

Methods

hbitraverse :: Applicative f => (forall (b :: Scoped k h). s b -> f (s' b)) -> (forall (b :: Scoped k h). t b -> f (t' b)) -> h s t a -> f (h s' t' a) Source #

HFunctor k h => HBifunctor k (Scoped k h) Source # 

Methods

hbimap :: (forall (b :: Scoped k h). s b -> s' b) -> (forall (b :: Scoped k h). t b -> t' b) -> h s t a -> h s' t' a Source #

hfirst :: (forall (b :: Scoped k h). s b -> s' b) -> h s t a -> h s' t a Source #

hsecond :: (forall (b :: Scoped k h). t b -> t' b) -> h s t a -> h s t' a Source #

HTraversable u h => HTraversable u (Scoped u h f) Source # 

Methods

htraverse :: Applicative f => (forall (b :: Scoped u h f). t b -> f (t' b)) -> h t a -> f (h t' a) Source #

hsequence :: Applicative f => h (Compose * (Scoped u h f) f t) a -> f (h t a) Source #

HFunctor u h => HFunctor u (Scoped u h f) Source # 

Methods

hmap :: (forall (b :: Scoped u h f). t b -> t' b) -> h t a -> h t' a Source #

_Scoped :: Iso (Scoped h f g a) (Scoped h' f' g' a') (Scope g h f a) (Scope g' h' f' a') Source #

data SFree h f a Source #

Constructors

SPure (f a) 
SWrap (h (Scoped (SFree h) f) (SFree h f) a) 

Instances

(HDuotraversable k1 h, HDuofoldableAt k1 k2 h) => HFoldableAt k1 k2 (SFree k1 h) Source # 

Methods

hfoldMap :: (forall (b :: k2). t b -> SFree k1 h b) -> h t a -> SFree k1 h a Source #

Pretty3 k k k k h => Pretty2 k k (SFree k h) Source # 

Methods

pretty2 :: Pretty1 (SFree k h) t => op t a -> String Source #

prettys2Prec :: Pretty1 (SFree k h) t => Int -> op t a -> ShowS Source #

HDuotraversable u h => HTraversable u (SFree u h) Source # 

Methods

htraverse :: Applicative f => (forall (b :: SFree u h). t b -> f (t' b)) -> h t a -> f (h t' a) Source #

hsequence :: Applicative f => h (Compose * (SFree u h) f t) a -> f (h t a) Source #

HDuofunctor k h => HMonad k (SFree k h) Source # 
HDuofunctor k h => HBind k (SFree k h) Source # 

Methods

(^>>=) :: h t a -> (forall (b :: SFree k h). t b -> h t' b) -> h t' a Source #

HPointed k (SFree k h) Source # 

Methods

hpure :: t a -> h t a Source #

HDuofunctor u h => HFunctor u (SFree u h) Source # 

Methods

hmap :: (forall (b :: SFree u h). t b -> t' b) -> h t a -> h t' a Source #