{-# LANGUAGE DeriveAnyClass #-}

-- | Internals.
module Blanks.Core
  ( BoundScope (..)
  , FreeScope (..)
  , BinderScope (..)
  , EmbedScope (..)
  ) where

import Control.DeepSeq (NFData)
import GHC.Generics (Generic)

newtype BoundScope =
  BoundScope
    { BoundScope -> Int
unBoundScope :: Int
    }
  deriving newtype (BoundScope -> BoundScope -> Bool
(BoundScope -> BoundScope -> Bool)
-> (BoundScope -> BoundScope -> Bool) -> Eq BoundScope
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BoundScope -> BoundScope -> Bool
$c/= :: BoundScope -> BoundScope -> Bool
== :: BoundScope -> BoundScope -> Bool
$c== :: BoundScope -> BoundScope -> Bool
Eq, Int -> BoundScope -> ShowS
[BoundScope] -> ShowS
BoundScope -> String
(Int -> BoundScope -> ShowS)
-> (BoundScope -> String)
-> ([BoundScope] -> ShowS)
-> Show BoundScope
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BoundScope] -> ShowS
$cshowList :: [BoundScope] -> ShowS
show :: BoundScope -> String
$cshow :: BoundScope -> String
showsPrec :: Int -> BoundScope -> ShowS
$cshowsPrec :: Int -> BoundScope -> ShowS
Show, BoundScope -> ()
(BoundScope -> ()) -> NFData BoundScope
forall a. (a -> ()) -> NFData a
rnf :: BoundScope -> ()
$crnf :: BoundScope -> ()
NFData)

newtype FreeScope a =
  FreeScope
    { FreeScope a -> a
unFreeScope :: a
    }
  deriving stock (FreeScope a -> FreeScope a -> Bool
(FreeScope a -> FreeScope a -> Bool)
-> (FreeScope a -> FreeScope a -> Bool) -> Eq (FreeScope a)
forall a. Eq a => FreeScope a -> FreeScope a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FreeScope a -> FreeScope a -> Bool
$c/= :: forall a. Eq a => FreeScope a -> FreeScope a -> Bool
== :: FreeScope a -> FreeScope a -> Bool
$c== :: forall a. Eq a => FreeScope a -> FreeScope a -> Bool
Eq, Int -> FreeScope a -> ShowS
[FreeScope a] -> ShowS
FreeScope a -> String
(Int -> FreeScope a -> ShowS)
-> (FreeScope a -> String)
-> ([FreeScope a] -> ShowS)
-> Show (FreeScope a)
forall a. Show a => Int -> FreeScope a -> ShowS
forall a. Show a => [FreeScope a] -> ShowS
forall a. Show a => FreeScope a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FreeScope a] -> ShowS
$cshowList :: forall a. Show a => [FreeScope a] -> ShowS
show :: FreeScope a -> String
$cshow :: forall a. Show a => FreeScope a -> String
showsPrec :: Int -> FreeScope a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> FreeScope a -> ShowS
Show, a -> FreeScope b -> FreeScope a
(a -> b) -> FreeScope a -> FreeScope b
(forall a b. (a -> b) -> FreeScope a -> FreeScope b)
-> (forall a b. a -> FreeScope b -> FreeScope a)
-> Functor FreeScope
forall a b. a -> FreeScope b -> FreeScope a
forall a b. (a -> b) -> FreeScope a -> FreeScope b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> FreeScope b -> FreeScope a
$c<$ :: forall a b. a -> FreeScope b -> FreeScope a
fmap :: (a -> b) -> FreeScope a -> FreeScope b
$cfmap :: forall a b. (a -> b) -> FreeScope a -> FreeScope b
Functor, FreeScope a -> Bool
(a -> m) -> FreeScope a -> m
(a -> b -> b) -> b -> FreeScope a -> b
(forall m. Monoid m => FreeScope m -> m)
-> (forall m a. Monoid m => (a -> m) -> FreeScope a -> m)
-> (forall m a. Monoid m => (a -> m) -> FreeScope a -> m)
-> (forall a b. (a -> b -> b) -> b -> FreeScope a -> b)
-> (forall a b. (a -> b -> b) -> b -> FreeScope a -> b)
-> (forall b a. (b -> a -> b) -> b -> FreeScope a -> b)
-> (forall b a. (b -> a -> b) -> b -> FreeScope a -> b)
-> (forall a. (a -> a -> a) -> FreeScope a -> a)
-> (forall a. (a -> a -> a) -> FreeScope a -> a)
-> (forall a. FreeScope a -> [a])
-> (forall a. FreeScope a -> Bool)
-> (forall a. FreeScope a -> Int)
-> (forall a. Eq a => a -> FreeScope a -> Bool)
-> (forall a. Ord a => FreeScope a -> a)
-> (forall a. Ord a => FreeScope a -> a)
-> (forall a. Num a => FreeScope a -> a)
-> (forall a. Num a => FreeScope a -> a)
-> Foldable FreeScope
forall a. Eq a => a -> FreeScope a -> Bool
forall a. Num a => FreeScope a -> a
forall a. Ord a => FreeScope a -> a
forall m. Monoid m => FreeScope m -> m
forall a. FreeScope a -> Bool
forall a. FreeScope a -> Int
forall a. FreeScope a -> [a]
forall a. (a -> a -> a) -> FreeScope a -> a
forall m a. Monoid m => (a -> m) -> FreeScope a -> m
forall b a. (b -> a -> b) -> b -> FreeScope a -> b
forall a b. (a -> b -> b) -> b -> FreeScope a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: FreeScope a -> a
$cproduct :: forall a. Num a => FreeScope a -> a
sum :: FreeScope a -> a
$csum :: forall a. Num a => FreeScope a -> a
minimum :: FreeScope a -> a
$cminimum :: forall a. Ord a => FreeScope a -> a
maximum :: FreeScope a -> a
$cmaximum :: forall a. Ord a => FreeScope a -> a
elem :: a -> FreeScope a -> Bool
$celem :: forall a. Eq a => a -> FreeScope a -> Bool
length :: FreeScope a -> Int
$clength :: forall a. FreeScope a -> Int
null :: FreeScope a -> Bool
$cnull :: forall a. FreeScope a -> Bool
toList :: FreeScope a -> [a]
$ctoList :: forall a. FreeScope a -> [a]
foldl1 :: (a -> a -> a) -> FreeScope a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> FreeScope a -> a
foldr1 :: (a -> a -> a) -> FreeScope a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> FreeScope a -> a
foldl' :: (b -> a -> b) -> b -> FreeScope a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> FreeScope a -> b
foldl :: (b -> a -> b) -> b -> FreeScope a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> FreeScope a -> b
foldr' :: (a -> b -> b) -> b -> FreeScope a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> FreeScope a -> b
foldr :: (a -> b -> b) -> b -> FreeScope a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> FreeScope a -> b
foldMap' :: (a -> m) -> FreeScope a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> FreeScope a -> m
foldMap :: (a -> m) -> FreeScope a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> FreeScope a -> m
fold :: FreeScope m -> m
$cfold :: forall m. Monoid m => FreeScope m -> m
Foldable, Functor FreeScope
Foldable FreeScope
(Functor FreeScope, Foldable FreeScope) =>
(forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> FreeScope a -> f (FreeScope b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    FreeScope (f a) -> f (FreeScope a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> FreeScope a -> m (FreeScope b))
-> (forall (m :: * -> *) a.
    Monad m =>
    FreeScope (m a) -> m (FreeScope a))
-> Traversable FreeScope
(a -> f b) -> FreeScope a -> f (FreeScope b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
FreeScope (m a) -> m (FreeScope a)
forall (f :: * -> *) a.
Applicative f =>
FreeScope (f a) -> f (FreeScope a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> FreeScope a -> m (FreeScope b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> FreeScope a -> f (FreeScope b)
sequence :: FreeScope (m a) -> m (FreeScope a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
FreeScope (m a) -> m (FreeScope a)
mapM :: (a -> m b) -> FreeScope a -> m (FreeScope b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> FreeScope a -> m (FreeScope b)
sequenceA :: FreeScope (f a) -> f (FreeScope a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
FreeScope (f a) -> f (FreeScope a)
traverse :: (a -> f b) -> FreeScope a -> f (FreeScope b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> FreeScope a -> f (FreeScope b)
$cp2Traversable :: Foldable FreeScope
$cp1Traversable :: Functor FreeScope
Traversable)
  deriving newtype (FreeScope a -> ()
(FreeScope a -> ()) -> NFData (FreeScope a)
forall a. NFData a => FreeScope a -> ()
forall a. (a -> ()) -> NFData a
rnf :: FreeScope a -> ()
$crnf :: forall a. NFData a => FreeScope a -> ()
NFData)

data BinderScope n e =
  BinderScope
    { BinderScope n e -> Int
binderScopeArity :: !Int
    , BinderScope n e -> n
binderScopeInfo :: !n
    , BinderScope n e -> e
binderScopeBody :: e
    }
  deriving stock (BinderScope n e -> BinderScope n e -> Bool
(BinderScope n e -> BinderScope n e -> Bool)
-> (BinderScope n e -> BinderScope n e -> Bool)
-> Eq (BinderScope n e)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall n e.
(Eq n, Eq e) =>
BinderScope n e -> BinderScope n e -> Bool
/= :: BinderScope n e -> BinderScope n e -> Bool
$c/= :: forall n e.
(Eq n, Eq e) =>
BinderScope n e -> BinderScope n e -> Bool
== :: BinderScope n e -> BinderScope n e -> Bool
$c== :: forall n e.
(Eq n, Eq e) =>
BinderScope n e -> BinderScope n e -> Bool
Eq, Int -> BinderScope n e -> ShowS
[BinderScope n e] -> ShowS
BinderScope n e -> String
(Int -> BinderScope n e -> ShowS)
-> (BinderScope n e -> String)
-> ([BinderScope n e] -> ShowS)
-> Show (BinderScope n e)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall n e. (Show n, Show e) => Int -> BinderScope n e -> ShowS
forall n e. (Show n, Show e) => [BinderScope n e] -> ShowS
forall n e. (Show n, Show e) => BinderScope n e -> String
showList :: [BinderScope n e] -> ShowS
$cshowList :: forall n e. (Show n, Show e) => [BinderScope n e] -> ShowS
show :: BinderScope n e -> String
$cshow :: forall n e. (Show n, Show e) => BinderScope n e -> String
showsPrec :: Int -> BinderScope n e -> ShowS
$cshowsPrec :: forall n e. (Show n, Show e) => Int -> BinderScope n e -> ShowS
Show, a -> BinderScope n b -> BinderScope n a
(a -> b) -> BinderScope n a -> BinderScope n b
(forall a b. (a -> b) -> BinderScope n a -> BinderScope n b)
-> (forall a b. a -> BinderScope n b -> BinderScope n a)
-> Functor (BinderScope n)
forall a b. a -> BinderScope n b -> BinderScope n a
forall a b. (a -> b) -> BinderScope n a -> BinderScope n b
forall n a b. a -> BinderScope n b -> BinderScope n a
forall n a b. (a -> b) -> BinderScope n a -> BinderScope n b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> BinderScope n b -> BinderScope n a
$c<$ :: forall n a b. a -> BinderScope n b -> BinderScope n a
fmap :: (a -> b) -> BinderScope n a -> BinderScope n b
$cfmap :: forall n a b. (a -> b) -> BinderScope n a -> BinderScope n b
Functor, BinderScope n a -> Bool
(a -> m) -> BinderScope n a -> m
(a -> b -> b) -> b -> BinderScope n a -> b
(forall m. Monoid m => BinderScope n m -> m)
-> (forall m a. Monoid m => (a -> m) -> BinderScope n a -> m)
-> (forall m a. Monoid m => (a -> m) -> BinderScope n a -> m)
-> (forall a b. (a -> b -> b) -> b -> BinderScope n a -> b)
-> (forall a b. (a -> b -> b) -> b -> BinderScope n a -> b)
-> (forall b a. (b -> a -> b) -> b -> BinderScope n a -> b)
-> (forall b a. (b -> a -> b) -> b -> BinderScope n a -> b)
-> (forall a. (a -> a -> a) -> BinderScope n a -> a)
-> (forall a. (a -> a -> a) -> BinderScope n a -> a)
-> (forall a. BinderScope n a -> [a])
-> (forall a. BinderScope n a -> Bool)
-> (forall a. BinderScope n a -> Int)
-> (forall a. Eq a => a -> BinderScope n a -> Bool)
-> (forall a. Ord a => BinderScope n a -> a)
-> (forall a. Ord a => BinderScope n a -> a)
-> (forall a. Num a => BinderScope n a -> a)
-> (forall a. Num a => BinderScope n a -> a)
-> Foldable (BinderScope n)
forall a. Eq a => a -> BinderScope n a -> Bool
forall a. Num a => BinderScope n a -> a
forall a. Ord a => BinderScope n a -> a
forall m. Monoid m => BinderScope n m -> m
forall a. BinderScope n a -> Bool
forall a. BinderScope n a -> Int
forall a. BinderScope n a -> [a]
forall a. (a -> a -> a) -> BinderScope n a -> a
forall n a. Eq a => a -> BinderScope n a -> Bool
forall n a. Num a => BinderScope n a -> a
forall n a. Ord a => BinderScope n a -> a
forall m a. Monoid m => (a -> m) -> BinderScope n a -> m
forall n m. Monoid m => BinderScope n m -> m
forall n a. BinderScope n a -> Bool
forall n a. BinderScope n a -> Int
forall n a. BinderScope n a -> [a]
forall b a. (b -> a -> b) -> b -> BinderScope n a -> b
forall a b. (a -> b -> b) -> b -> BinderScope n a -> b
forall n a. (a -> a -> a) -> BinderScope n a -> a
forall n m a. Monoid m => (a -> m) -> BinderScope n a -> m
forall n b a. (b -> a -> b) -> b -> BinderScope n a -> b
forall n a b. (a -> b -> b) -> b -> BinderScope n a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: BinderScope n a -> a
$cproduct :: forall n a. Num a => BinderScope n a -> a
sum :: BinderScope n a -> a
$csum :: forall n a. Num a => BinderScope n a -> a
minimum :: BinderScope n a -> a
$cminimum :: forall n a. Ord a => BinderScope n a -> a
maximum :: BinderScope n a -> a
$cmaximum :: forall n a. Ord a => BinderScope n a -> a
elem :: a -> BinderScope n a -> Bool
$celem :: forall n a. Eq a => a -> BinderScope n a -> Bool
length :: BinderScope n a -> Int
$clength :: forall n a. BinderScope n a -> Int
null :: BinderScope n a -> Bool
$cnull :: forall n a. BinderScope n a -> Bool
toList :: BinderScope n a -> [a]
$ctoList :: forall n a. BinderScope n a -> [a]
foldl1 :: (a -> a -> a) -> BinderScope n a -> a
$cfoldl1 :: forall n a. (a -> a -> a) -> BinderScope n a -> a
foldr1 :: (a -> a -> a) -> BinderScope n a -> a
$cfoldr1 :: forall n a. (a -> a -> a) -> BinderScope n a -> a
foldl' :: (b -> a -> b) -> b -> BinderScope n a -> b
$cfoldl' :: forall n b a. (b -> a -> b) -> b -> BinderScope n a -> b
foldl :: (b -> a -> b) -> b -> BinderScope n a -> b
$cfoldl :: forall n b a. (b -> a -> b) -> b -> BinderScope n a -> b
foldr' :: (a -> b -> b) -> b -> BinderScope n a -> b
$cfoldr' :: forall n a b. (a -> b -> b) -> b -> BinderScope n a -> b
foldr :: (a -> b -> b) -> b -> BinderScope n a -> b
$cfoldr :: forall n a b. (a -> b -> b) -> b -> BinderScope n a -> b
foldMap' :: (a -> m) -> BinderScope n a -> m
$cfoldMap' :: forall n m a. Monoid m => (a -> m) -> BinderScope n a -> m
foldMap :: (a -> m) -> BinderScope n a -> m
$cfoldMap :: forall n m a. Monoid m => (a -> m) -> BinderScope n a -> m
fold :: BinderScope n m -> m
$cfold :: forall n m. Monoid m => BinderScope n m -> m
Foldable, Functor (BinderScope n)
Foldable (BinderScope n)
(Functor (BinderScope n), Foldable (BinderScope n)) =>
(forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> BinderScope n a -> f (BinderScope n b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    BinderScope n (f a) -> f (BinderScope n a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> BinderScope n a -> m (BinderScope n b))
-> (forall (m :: * -> *) a.
    Monad m =>
    BinderScope n (m a) -> m (BinderScope n a))
-> Traversable (BinderScope n)
(a -> f b) -> BinderScope n a -> f (BinderScope n b)
forall n. Functor (BinderScope n)
forall n. Foldable (BinderScope n)
forall n (m :: * -> *) a.
Monad m =>
BinderScope n (m a) -> m (BinderScope n a)
forall n (f :: * -> *) a.
Applicative f =>
BinderScope n (f a) -> f (BinderScope n a)
forall n (m :: * -> *) a b.
Monad m =>
(a -> m b) -> BinderScope n a -> m (BinderScope n b)
forall n (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> BinderScope n a -> f (BinderScope n b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
BinderScope n (m a) -> m (BinderScope n a)
forall (f :: * -> *) a.
Applicative f =>
BinderScope n (f a) -> f (BinderScope n a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> BinderScope n a -> m (BinderScope n b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> BinderScope n a -> f (BinderScope n b)
sequence :: BinderScope n (m a) -> m (BinderScope n a)
$csequence :: forall n (m :: * -> *) a.
Monad m =>
BinderScope n (m a) -> m (BinderScope n a)
mapM :: (a -> m b) -> BinderScope n a -> m (BinderScope n b)
$cmapM :: forall n (m :: * -> *) a b.
Monad m =>
(a -> m b) -> BinderScope n a -> m (BinderScope n b)
sequenceA :: BinderScope n (f a) -> f (BinderScope n a)
$csequenceA :: forall n (f :: * -> *) a.
Applicative f =>
BinderScope n (f a) -> f (BinderScope n a)
traverse :: (a -> f b) -> BinderScope n a -> f (BinderScope n b)
$ctraverse :: forall n (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> BinderScope n a -> f (BinderScope n b)
$cp2Traversable :: forall n. Foldable (BinderScope n)
$cp1Traversable :: forall n. Functor (BinderScope n)
Traversable, (forall x. BinderScope n e -> Rep (BinderScope n e) x)
-> (forall x. Rep (BinderScope n e) x -> BinderScope n e)
-> Generic (BinderScope n e)
forall x. Rep (BinderScope n e) x -> BinderScope n e
forall x. BinderScope n e -> Rep (BinderScope n e) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall n e x. Rep (BinderScope n e) x -> BinderScope n e
forall n e x. BinderScope n e -> Rep (BinderScope n e) x
$cto :: forall n e x. Rep (BinderScope n e) x -> BinderScope n e
$cfrom :: forall n e x. BinderScope n e -> Rep (BinderScope n e) x
Generic)
  deriving anyclass (BinderScope n e -> ()
(BinderScope n e -> ()) -> NFData (BinderScope n e)
forall a. (a -> ()) -> NFData a
forall n e. (NFData n, NFData e) => BinderScope n e -> ()
rnf :: BinderScope n e -> ()
$crnf :: forall n e. (NFData n, NFData e) => BinderScope n e -> ()
NFData)

newtype EmbedScope f e =
  EmbedScope
    { EmbedScope f e -> f e
unEmbedScope :: f e
    }
  deriving newtype (EmbedScope f e -> EmbedScope f e -> Bool
(EmbedScope f e -> EmbedScope f e -> Bool)
-> (EmbedScope f e -> EmbedScope f e -> Bool)
-> Eq (EmbedScope f e)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (f :: * -> *) e.
Eq (f e) =>
EmbedScope f e -> EmbedScope f e -> Bool
/= :: EmbedScope f e -> EmbedScope f e -> Bool
$c/= :: forall (f :: * -> *) e.
Eq (f e) =>
EmbedScope f e -> EmbedScope f e -> Bool
== :: EmbedScope f e -> EmbedScope f e -> Bool
$c== :: forall (f :: * -> *) e.
Eq (f e) =>
EmbedScope f e -> EmbedScope f e -> Bool
Eq, Int -> EmbedScope f e -> ShowS
[EmbedScope f e] -> ShowS
EmbedScope f e -> String
(Int -> EmbedScope f e -> ShowS)
-> (EmbedScope f e -> String)
-> ([EmbedScope f e] -> ShowS)
-> Show (EmbedScope f e)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (f :: * -> *) e.
Show (f e) =>
Int -> EmbedScope f e -> ShowS
forall (f :: * -> *) e. Show (f e) => [EmbedScope f e] -> ShowS
forall (f :: * -> *) e. Show (f e) => EmbedScope f e -> String
showList :: [EmbedScope f e] -> ShowS
$cshowList :: forall (f :: * -> *) e. Show (f e) => [EmbedScope f e] -> ShowS
show :: EmbedScope f e -> String
$cshow :: forall (f :: * -> *) e. Show (f e) => EmbedScope f e -> String
showsPrec :: Int -> EmbedScope f e -> ShowS
$cshowsPrec :: forall (f :: * -> *) e.
Show (f e) =>
Int -> EmbedScope f e -> ShowS
Show, a -> EmbedScope f b -> EmbedScope f a
(a -> b) -> EmbedScope f a -> EmbedScope f b
(forall a b. (a -> b) -> EmbedScope f a -> EmbedScope f b)
-> (forall a b. a -> EmbedScope f b -> EmbedScope f a)
-> Functor (EmbedScope f)
forall a b. a -> EmbedScope f b -> EmbedScope f a
forall a b. (a -> b) -> EmbedScope f a -> EmbedScope f b
forall (f :: * -> *) a b.
Functor f =>
a -> EmbedScope f b -> EmbedScope f a
forall (f :: * -> *) a b.
Functor f =>
(a -> b) -> EmbedScope f a -> EmbedScope f b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> EmbedScope f b -> EmbedScope f a
$c<$ :: forall (f :: * -> *) a b.
Functor f =>
a -> EmbedScope f b -> EmbedScope f a
fmap :: (a -> b) -> EmbedScope f a -> EmbedScope f b
$cfmap :: forall (f :: * -> *) a b.
Functor f =>
(a -> b) -> EmbedScope f a -> EmbedScope f b
Functor, EmbedScope f e -> ()
(EmbedScope f e -> ()) -> NFData (EmbedScope f e)
forall a. (a -> ()) -> NFData a
forall (f :: * -> *) e. NFData (f e) => EmbedScope f e -> ()
rnf :: EmbedScope f e -> ()
$crnf :: forall (f :: * -> *) e. NFData (f e) => EmbedScope f e -> ()
NFData)