module Michelson.Untyped.Ext
( ExtInstrAbstract (..)
, StackRef (..)
, PrintComment (..)
, TestAssert (..)
, Var (..)
, TyVar (..)
, StackTypePattern (..)
, StackFn (..)
, varSet
, stackTypePatternToList
) where
import Data.Aeson.TH (deriveJSON)
import Data.Data (Data(..))
import qualified Data.Set as Set
import qualified Data.Text as T
import Fmt (Buildable(build), Builder, genericF, listF)
import Text.PrettyPrint.Leijen.Text (textStrict)
import Michelson.Printer.Util (RenderDoc(..), renderOpsList)
import Michelson.Untyped.Type
import Util.Aeson
data ExtInstrAbstract op =
STACKTYPE StackTypePattern
| FN T.Text StackFn [op]
| UTEST_ASSERT (TestAssert op)
| UPRINT PrintComment
| Text
deriving stock (ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
(ExtInstrAbstract op -> ExtInstrAbstract op -> Bool)
-> (ExtInstrAbstract op -> ExtInstrAbstract op -> Bool)
-> Eq (ExtInstrAbstract op)
forall op.
Eq op =>
ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
$c/= :: forall op.
Eq op =>
ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
== :: ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
$c== :: forall op.
Eq op =>
ExtInstrAbstract op -> ExtInstrAbstract op -> Bool
Eq, Int -> ExtInstrAbstract op -> ShowS
[ExtInstrAbstract op] -> ShowS
ExtInstrAbstract op -> String
(Int -> ExtInstrAbstract op -> ShowS)
-> (ExtInstrAbstract op -> String)
-> ([ExtInstrAbstract op] -> ShowS)
-> Show (ExtInstrAbstract op)
forall op. Show op => Int -> ExtInstrAbstract op -> ShowS
forall op. Show op => [ExtInstrAbstract op] -> ShowS
forall op. Show op => ExtInstrAbstract op -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExtInstrAbstract op] -> ShowS
$cshowList :: forall op. Show op => [ExtInstrAbstract op] -> ShowS
show :: ExtInstrAbstract op -> String
$cshow :: forall op. Show op => ExtInstrAbstract op -> String
showsPrec :: Int -> ExtInstrAbstract op -> ShowS
$cshowsPrec :: forall op. Show op => Int -> ExtInstrAbstract op -> ShowS
Show, , (forall x. ExtInstrAbstract op -> Rep (ExtInstrAbstract op) x)
-> (forall x. Rep (ExtInstrAbstract op) x -> ExtInstrAbstract op)
-> Generic (ExtInstrAbstract op)
forall x. Rep (ExtInstrAbstract op) x -> ExtInstrAbstract op
forall x. ExtInstrAbstract op -> Rep (ExtInstrAbstract op) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall op x. Rep (ExtInstrAbstract op) x -> ExtInstrAbstract op
forall op x. ExtInstrAbstract op -> Rep (ExtInstrAbstract op) x
$cto :: forall op x. Rep (ExtInstrAbstract op) x -> ExtInstrAbstract op
$cfrom :: forall op x. ExtInstrAbstract op -> Rep (ExtInstrAbstract op) x
Generic, a -> ExtInstrAbstract b -> ExtInstrAbstract a
(a -> b) -> ExtInstrAbstract a -> ExtInstrAbstract b
(forall a b. (a -> b) -> ExtInstrAbstract a -> ExtInstrAbstract b)
-> (forall a b. a -> ExtInstrAbstract b -> ExtInstrAbstract a)
-> Functor ExtInstrAbstract
forall a b. a -> ExtInstrAbstract b -> ExtInstrAbstract a
forall a b. (a -> b) -> ExtInstrAbstract a -> ExtInstrAbstract b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> ExtInstrAbstract b -> ExtInstrAbstract a
$c<$ :: forall a b. a -> ExtInstrAbstract b -> ExtInstrAbstract a
fmap :: (a -> b) -> ExtInstrAbstract a -> ExtInstrAbstract b
$cfmap :: forall a b. (a -> b) -> ExtInstrAbstract a -> ExtInstrAbstract b
Functor)
instance NFData op => NFData (ExtInstrAbstract op)
instance RenderDoc op => RenderDoc (ExtInstrAbstract op) where
renderDoc :: RenderContext -> ExtInstrAbstract op -> Doc
renderDoc _ =
\case
FN _ _ ops :: [op]
ops -> Bool -> [op] -> Doc
forall op. RenderDoc op => Bool -> [op] -> Doc
renderOpsList Bool
False [op]
ops
UCOMMENT t :: Text
t -> Text -> Doc
textStrict ("/* " Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
t Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> " */")
_ -> Doc
forall a. Monoid a => a
mempty
isRenderable :: ExtInstrAbstract op -> Bool
isRenderable =
\case
FN {} -> Bool
True
UCOMMENT{} -> Bool
True
_ -> Bool
False
instance Buildable op => Buildable (ExtInstrAbstract op) where
build :: ExtInstrAbstract op -> Builder
build = ExtInstrAbstract op -> Builder
forall a. (Generic a, GBuildable (Rep a)) => a -> Builder
genericF
newtype StackRef = StackRef Natural
deriving stock (StackRef -> StackRef -> Bool
(StackRef -> StackRef -> Bool)
-> (StackRef -> StackRef -> Bool) -> Eq StackRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackRef -> StackRef -> Bool
$c/= :: StackRef -> StackRef -> Bool
== :: StackRef -> StackRef -> Bool
$c== :: StackRef -> StackRef -> Bool
Eq, Int -> StackRef -> ShowS
[StackRef] -> ShowS
StackRef -> String
(Int -> StackRef -> ShowS)
-> (StackRef -> String) -> ([StackRef] -> ShowS) -> Show StackRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackRef] -> ShowS
$cshowList :: [StackRef] -> ShowS
show :: StackRef -> String
$cshow :: StackRef -> String
showsPrec :: Int -> StackRef -> ShowS
$cshowsPrec :: Int -> StackRef -> ShowS
Show, Typeable StackRef
DataType
Constr
Typeable StackRef =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackRef -> c StackRef)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackRef)
-> (StackRef -> Constr)
-> (StackRef -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackRef))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackRef))
-> ((forall b. Data b => b -> b) -> StackRef -> StackRef)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r)
-> (forall u. (forall d. Data d => d -> u) -> StackRef -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> StackRef -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef)
-> Data StackRef
StackRef -> DataType
StackRef -> Constr
(forall b. Data b => b -> b) -> StackRef -> StackRef
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackRef -> c StackRef
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackRef
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> StackRef -> u
forall u. (forall d. Data d => d -> u) -> StackRef -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackRef
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackRef -> c StackRef
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackRef)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackRef)
$cStackRef :: Constr
$tStackRef :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> StackRef -> m StackRef
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef
gmapMp :: (forall d. Data d => d -> m d) -> StackRef -> m StackRef
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef
gmapM :: (forall d. Data d => d -> m d) -> StackRef -> m StackRef
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackRef -> m StackRef
gmapQi :: Int -> (forall d. Data d => d -> u) -> StackRef -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StackRef -> u
gmapQ :: (forall d. Data d => d -> u) -> StackRef -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> StackRef -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackRef -> r
gmapT :: (forall b. Data b => b -> b) -> StackRef -> StackRef
$cgmapT :: (forall b. Data b => b -> b) -> StackRef -> StackRef
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackRef)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackRef)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c StackRef)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackRef)
dataTypeOf :: StackRef -> DataType
$cdataTypeOf :: StackRef -> DataType
toConstr :: StackRef -> Constr
$ctoConstr :: StackRef -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackRef
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackRef
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackRef -> c StackRef
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackRef -> c StackRef
$cp1Data :: Typeable StackRef
Data, (forall x. StackRef -> Rep StackRef x)
-> (forall x. Rep StackRef x -> StackRef) -> Generic StackRef
forall x. Rep StackRef x -> StackRef
forall x. StackRef -> Rep StackRef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackRef x -> StackRef
$cfrom :: forall x. StackRef -> Rep StackRef x
Generic)
instance NFData StackRef
instance Buildable StackRef where
build :: StackRef -> Builder
build (StackRef i :: Natural
i) = "%[" Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
<> Natural -> Builder
forall b a. (Show a, IsString b) => a -> b
show Natural
i Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
<> "]"
newtype Var = Var T.Text deriving stock (Var -> Var -> Bool
(Var -> Var -> Bool) -> (Var -> Var -> Bool) -> Eq Var
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Var -> Var -> Bool
$c/= :: Var -> Var -> Bool
== :: Var -> Var -> Bool
$c== :: Var -> Var -> Bool
Eq, Int -> Var -> ShowS
[Var] -> ShowS
Var -> String
(Int -> Var -> ShowS)
-> (Var -> String) -> ([Var] -> ShowS) -> Show Var
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Var] -> ShowS
$cshowList :: [Var] -> ShowS
show :: Var -> String
$cshow :: Var -> String
showsPrec :: Int -> Var -> ShowS
$cshowsPrec :: Int -> Var -> ShowS
Show, Eq Var
Eq Var =>
(Var -> Var -> Ordering)
-> (Var -> Var -> Bool)
-> (Var -> Var -> Bool)
-> (Var -> Var -> Bool)
-> (Var -> Var -> Bool)
-> (Var -> Var -> Var)
-> (Var -> Var -> Var)
-> Ord Var
Var -> Var -> Bool
Var -> Var -> Ordering
Var -> Var -> Var
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Var -> Var -> Var
$cmin :: Var -> Var -> Var
max :: Var -> Var -> Var
$cmax :: Var -> Var -> Var
>= :: Var -> Var -> Bool
$c>= :: Var -> Var -> Bool
> :: Var -> Var -> Bool
$c> :: Var -> Var -> Bool
<= :: Var -> Var -> Bool
$c<= :: Var -> Var -> Bool
< :: Var -> Var -> Bool
$c< :: Var -> Var -> Bool
compare :: Var -> Var -> Ordering
$ccompare :: Var -> Var -> Ordering
$cp1Ord :: Eq Var
Ord, Typeable Var
DataType
Constr
Typeable Var =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var)
-> (Var -> Constr)
-> (Var -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Var))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var))
-> ((forall b. Data b => b -> b) -> Var -> Var)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r)
-> (forall u. (forall d. Data d => d -> u) -> Var -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Var -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Var -> m Var)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Var -> m Var)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Var -> m Var)
-> Data Var
Var -> DataType
Var -> Constr
(forall b. Data b => b -> b) -> Var -> Var
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
forall u. (forall d. Data d => d -> u) -> Var -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Var -> m Var
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Var -> m Var
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Var)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
$cVar :: Constr
$tVar :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Var -> m Var
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Var -> m Var
gmapMp :: (forall d. Data d => d -> m d) -> Var -> m Var
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Var -> m Var
gmapM :: (forall d. Data d => d -> m d) -> Var -> m Var
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Var -> m Var
gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Var -> u
gmapQ :: (forall d. Data d => d -> u) -> Var -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Var -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r
gmapT :: (forall b. Data b => b -> b) -> Var -> Var
$cgmapT :: (forall b. Data b => b -> b) -> Var -> Var
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Var)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Var)
dataTypeOf :: Var -> DataType
$cdataTypeOf :: Var -> DataType
toConstr :: Var -> Constr
$ctoConstr :: Var -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Var
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Var -> c Var
$cp1Data :: Typeable Var
Data, (forall x. Var -> Rep Var x)
-> (forall x. Rep Var x -> Var) -> Generic Var
forall x. Rep Var x -> Var
forall x. Var -> Rep Var x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Var x -> Var
$cfrom :: forall x. Var -> Rep Var x
Generic)
instance NFData Var
instance Buildable Var where
build :: Var -> Builder
build = Var -> Builder
forall a. (Generic a, GBuildable (Rep a)) => a -> Builder
genericF
data TyVar =
VarID Var
| TyCon Type
deriving stock (TyVar -> TyVar -> Bool
(TyVar -> TyVar -> Bool) -> (TyVar -> TyVar -> Bool) -> Eq TyVar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TyVar -> TyVar -> Bool
$c/= :: TyVar -> TyVar -> Bool
== :: TyVar -> TyVar -> Bool
$c== :: TyVar -> TyVar -> Bool
Eq, Int -> TyVar -> ShowS
[TyVar] -> ShowS
TyVar -> String
(Int -> TyVar -> ShowS)
-> (TyVar -> String) -> ([TyVar] -> ShowS) -> Show TyVar
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TyVar] -> ShowS
$cshowList :: [TyVar] -> ShowS
show :: TyVar -> String
$cshow :: TyVar -> String
showsPrec :: Int -> TyVar -> ShowS
$cshowsPrec :: Int -> TyVar -> ShowS
Show, Typeable TyVar
DataType
Constr
Typeable TyVar =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TyVar -> c TyVar)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TyVar)
-> (TyVar -> Constr)
-> (TyVar -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TyVar))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyVar))
-> ((forall b. Data b => b -> b) -> TyVar -> TyVar)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r)
-> (forall u. (forall d. Data d => d -> u) -> TyVar -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> TyVar -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar)
-> Data TyVar
TyVar -> DataType
TyVar -> Constr
(forall b. Data b => b -> b) -> TyVar -> TyVar
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TyVar -> c TyVar
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TyVar
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TyVar -> u
forall u. (forall d. Data d => d -> u) -> TyVar -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TyVar
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TyVar -> c TyVar
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TyVar)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyVar)
$cTyCon :: Constr
$cVarID :: Constr
$tTyVar :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TyVar -> m TyVar
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar
gmapMp :: (forall d. Data d => d -> m d) -> TyVar -> m TyVar
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar
gmapM :: (forall d. Data d => d -> m d) -> TyVar -> m TyVar
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TyVar -> m TyVar
gmapQi :: Int -> (forall d. Data d => d -> u) -> TyVar -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TyVar -> u
gmapQ :: (forall d. Data d => d -> u) -> TyVar -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TyVar -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r
gmapT :: (forall b. Data b => b -> b) -> TyVar -> TyVar
$cgmapT :: (forall b. Data b => b -> b) -> TyVar -> TyVar
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyVar)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyVar)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TyVar)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TyVar)
dataTypeOf :: TyVar -> DataType
$cdataTypeOf :: TyVar -> DataType
toConstr :: TyVar -> Constr
$ctoConstr :: TyVar -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TyVar
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TyVar
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TyVar -> c TyVar
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TyVar -> c TyVar
$cp1Data :: Typeable TyVar
Data, (forall x. TyVar -> Rep TyVar x)
-> (forall x. Rep TyVar x -> TyVar) -> Generic TyVar
forall x. Rep TyVar x -> TyVar
forall x. TyVar -> Rep TyVar x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TyVar x -> TyVar
$cfrom :: forall x. TyVar -> Rep TyVar x
Generic)
instance NFData TyVar
instance Buildable TyVar where
build :: TyVar -> Builder
build = TyVar -> Builder
forall a. (Generic a, GBuildable (Rep a)) => a -> Builder
genericF
data StackTypePattern
= StkEmpty
| StkRest
| StkCons TyVar StackTypePattern
deriving stock (StackTypePattern -> StackTypePattern -> Bool
(StackTypePattern -> StackTypePattern -> Bool)
-> (StackTypePattern -> StackTypePattern -> Bool)
-> Eq StackTypePattern
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackTypePattern -> StackTypePattern -> Bool
$c/= :: StackTypePattern -> StackTypePattern -> Bool
== :: StackTypePattern -> StackTypePattern -> Bool
$c== :: StackTypePattern -> StackTypePattern -> Bool
Eq, Int -> StackTypePattern -> ShowS
[StackTypePattern] -> ShowS
StackTypePattern -> String
(Int -> StackTypePattern -> ShowS)
-> (StackTypePattern -> String)
-> ([StackTypePattern] -> ShowS)
-> Show StackTypePattern
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackTypePattern] -> ShowS
$cshowList :: [StackTypePattern] -> ShowS
show :: StackTypePattern -> String
$cshow :: StackTypePattern -> String
showsPrec :: Int -> StackTypePattern -> ShowS
$cshowsPrec :: Int -> StackTypePattern -> ShowS
Show, Typeable StackTypePattern
DataType
Constr
Typeable StackTypePattern =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackTypePattern -> c StackTypePattern)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackTypePattern)
-> (StackTypePattern -> Constr)
-> (StackTypePattern -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackTypePattern))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StackTypePattern))
-> ((forall b. Data b => b -> b)
-> StackTypePattern -> StackTypePattern)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r)
-> (forall u.
(forall d. Data d => d -> u) -> StackTypePattern -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> StackTypePattern -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern)
-> Data StackTypePattern
StackTypePattern -> DataType
StackTypePattern -> Constr
(forall b. Data b => b -> b)
-> StackTypePattern -> StackTypePattern
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackTypePattern -> c StackTypePattern
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackTypePattern
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> StackTypePattern -> u
forall u. (forall d. Data d => d -> u) -> StackTypePattern -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackTypePattern
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackTypePattern -> c StackTypePattern
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackTypePattern)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StackTypePattern)
$cStkCons :: Constr
$cStkRest :: Constr
$cStkEmpty :: Constr
$tStackTypePattern :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
gmapMp :: (forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
gmapM :: (forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StackTypePattern -> m StackTypePattern
gmapQi :: Int -> (forall d. Data d => d -> u) -> StackTypePattern -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> StackTypePattern -> u
gmapQ :: (forall d. Data d => d -> u) -> StackTypePattern -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> StackTypePattern -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackTypePattern -> r
gmapT :: (forall b. Data b => b -> b)
-> StackTypePattern -> StackTypePattern
$cgmapT :: (forall b. Data b => b -> b)
-> StackTypePattern -> StackTypePattern
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StackTypePattern)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StackTypePattern)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c StackTypePattern)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackTypePattern)
dataTypeOf :: StackTypePattern -> DataType
$cdataTypeOf :: StackTypePattern -> DataType
toConstr :: StackTypePattern -> Constr
$ctoConstr :: StackTypePattern -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackTypePattern
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackTypePattern
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackTypePattern -> c StackTypePattern
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackTypePattern -> c StackTypePattern
$cp1Data :: Typeable StackTypePattern
Data, (forall x. StackTypePattern -> Rep StackTypePattern x)
-> (forall x. Rep StackTypePattern x -> StackTypePattern)
-> Generic StackTypePattern
forall x. Rep StackTypePattern x -> StackTypePattern
forall x. StackTypePattern -> Rep StackTypePattern x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackTypePattern x -> StackTypePattern
$cfrom :: forall x. StackTypePattern -> Rep StackTypePattern x
Generic)
instance NFData StackTypePattern
stackTypePatternToList :: StackTypePattern -> ([TyVar], Bool)
stackTypePatternToList :: StackTypePattern -> ([TyVar], Bool)
stackTypePatternToList StkEmpty = ([], Bool
True)
stackTypePatternToList StkRest = ([], Bool
False)
stackTypePatternToList (StkCons t :: TyVar
t pat :: StackTypePattern
pat) =
([TyVar] -> [TyVar]) -> ([TyVar], Bool) -> ([TyVar], Bool)
forall (p :: * -> * -> *) a b c.
Bifunctor p =>
(a -> b) -> p a c -> p b c
first (TyVar
t TyVar -> [TyVar] -> [TyVar]
forall a. a -> [a] -> [a]
:) (([TyVar], Bool) -> ([TyVar], Bool))
-> ([TyVar], Bool) -> ([TyVar], Bool)
forall a b. (a -> b) -> a -> b
$ StackTypePattern -> ([TyVar], Bool)
stackTypePatternToList StackTypePattern
pat
instance Buildable StackTypePattern where
build :: StackTypePattern -> Builder
build = [Builder] -> Builder
forall (f :: * -> *) a. (Foldable f, Buildable a) => f a -> Builder
listF ([Builder] -> Builder)
-> (StackTypePattern -> [Builder]) -> StackTypePattern -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ([TyVar], Bool) -> [Builder]
pairToList (([TyVar], Bool) -> [Builder])
-> (StackTypePattern -> ([TyVar], Bool))
-> StackTypePattern
-> [Builder]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StackTypePattern -> ([TyVar], Bool)
stackTypePatternToList
where
pairToList :: ([TyVar], Bool) -> [Builder]
pairToList :: ([TyVar], Bool) -> [Builder]
pairToList (types :: [TyVar]
types, fixed :: Bool
fixed)
| Bool
fixed = (TyVar -> Builder) -> [TyVar] -> [Builder]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
map TyVar -> Builder
forall p. Buildable p => p -> Builder
build [TyVar]
types
| Bool
otherwise = (TyVar -> Builder) -> [TyVar] -> [Builder]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
map TyVar -> Builder
forall p. Buildable p => p -> Builder
build [TyVar]
types [Builder] -> [Builder] -> [Builder]
forall a. [a] -> [a] -> [a]
++ ["..."]
data StackFn = StackFn
{ StackFn -> Maybe (Set Var)
sfnQuantifiedVars :: Maybe (Set Var)
, StackFn -> StackTypePattern
sfnInPattern :: StackTypePattern
, StackFn -> StackTypePattern
sfnOutPattern :: StackTypePattern
} deriving stock (StackFn -> StackFn -> Bool
(StackFn -> StackFn -> Bool)
-> (StackFn -> StackFn -> Bool) -> Eq StackFn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackFn -> StackFn -> Bool
$c/= :: StackFn -> StackFn -> Bool
== :: StackFn -> StackFn -> Bool
$c== :: StackFn -> StackFn -> Bool
Eq, Int -> StackFn -> ShowS
[StackFn] -> ShowS
StackFn -> String
(Int -> StackFn -> ShowS)
-> (StackFn -> String) -> ([StackFn] -> ShowS) -> Show StackFn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackFn] -> ShowS
$cshowList :: [StackFn] -> ShowS
show :: StackFn -> String
$cshow :: StackFn -> String
showsPrec :: Int -> StackFn -> ShowS
$cshowsPrec :: Int -> StackFn -> ShowS
Show, Typeable StackFn
DataType
Constr
Typeable StackFn =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackFn -> c StackFn)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackFn)
-> (StackFn -> Constr)
-> (StackFn -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackFn))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackFn))
-> ((forall b. Data b => b -> b) -> StackFn -> StackFn)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r)
-> (forall u. (forall d. Data d => d -> u) -> StackFn -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> StackFn -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn)
-> Data StackFn
StackFn -> DataType
StackFn -> Constr
(forall b. Data b => b -> b) -> StackFn -> StackFn
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackFn -> c StackFn
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackFn
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> StackFn -> u
forall u. (forall d. Data d => d -> u) -> StackFn -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackFn
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackFn -> c StackFn
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackFn)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackFn)
$cStackFn :: Constr
$tStackFn :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> StackFn -> m StackFn
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn
gmapMp :: (forall d. Data d => d -> m d) -> StackFn -> m StackFn
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn
gmapM :: (forall d. Data d => d -> m d) -> StackFn -> m StackFn
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StackFn -> m StackFn
gmapQi :: Int -> (forall d. Data d => d -> u) -> StackFn -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StackFn -> u
gmapQ :: (forall d. Data d => d -> u) -> StackFn -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> StackFn -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StackFn -> r
gmapT :: (forall b. Data b => b -> b) -> StackFn -> StackFn
$cgmapT :: (forall b. Data b => b -> b) -> StackFn -> StackFn
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackFn)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackFn)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c StackFn)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StackFn)
dataTypeOf :: StackFn -> DataType
$cdataTypeOf :: StackFn -> DataType
toConstr :: StackFn -> Constr
$ctoConstr :: StackFn -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackFn
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StackFn
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackFn -> c StackFn
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StackFn -> c StackFn
$cp1Data :: Typeable StackFn
Data, (forall x. StackFn -> Rep StackFn x)
-> (forall x. Rep StackFn x -> StackFn) -> Generic StackFn
forall x. Rep StackFn x -> StackFn
forall x. StackFn -> Rep StackFn x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackFn x -> StackFn
$cfrom :: forall x. StackFn -> Rep StackFn x
Generic)
instance NFData StackFn
instance Buildable StackFn where
build :: StackFn -> Builder
build = StackFn -> Builder
forall a. (Generic a, GBuildable (Rep a)) => a -> Builder
genericF
varSet :: StackTypePattern -> Set Var
varSet :: StackTypePattern -> Set Var
varSet = \case
StkEmpty -> Set Var
forall a. Set a
Set.empty
StkRest -> Set Var
forall a. Set a
Set.empty
(StkCons (VarID v :: Var
v) stk :: StackTypePattern
stk) -> Var
v Var -> Set Var -> Set Var
forall a. Ord a => a -> Set a -> Set a
`Set.insert` (StackTypePattern -> Set Var
varSet StackTypePattern
stk)
(StkCons _ stk :: StackTypePattern
stk) -> StackTypePattern -> Set Var
varSet StackTypePattern
stk
newtype =
{ :: [Either T.Text StackRef]
} deriving stock (PrintComment -> PrintComment -> Bool
(PrintComment -> PrintComment -> Bool)
-> (PrintComment -> PrintComment -> Bool) -> Eq PrintComment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrintComment -> PrintComment -> Bool
$c/= :: PrintComment -> PrintComment -> Bool
== :: PrintComment -> PrintComment -> Bool
$c== :: PrintComment -> PrintComment -> Bool
Eq, Int -> PrintComment -> ShowS
[PrintComment] -> ShowS
PrintComment -> String
(Int -> PrintComment -> ShowS)
-> (PrintComment -> String)
-> ([PrintComment] -> ShowS)
-> Show PrintComment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PrintComment] -> ShowS
$cshowList :: [PrintComment] -> ShowS
show :: PrintComment -> String
$cshow :: PrintComment -> String
showsPrec :: Int -> PrintComment -> ShowS
$cshowsPrec :: Int -> PrintComment -> ShowS
Show, , (forall x. PrintComment -> Rep PrintComment x)
-> (forall x. Rep PrintComment x -> PrintComment)
-> Generic PrintComment
forall x. Rep PrintComment x -> PrintComment
forall x. PrintComment -> Rep PrintComment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PrintComment x -> PrintComment
$cfrom :: forall x. PrintComment -> Rep PrintComment x
Generic)
instance NFData PrintComment
instance Buildable PrintComment where
build :: PrintComment -> Builder
build = (Element [Either Text StackRef] -> Builder)
-> [Either Text StackRef] -> Builder
forall t m. (Container t, Monoid m) => (Element t -> m) -> t -> m
foldMap ((Text -> Builder)
-> (StackRef -> Builder) -> Either Text StackRef -> Builder
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either Text -> Builder
forall p. Buildable p => p -> Builder
build StackRef -> Builder
forall p. Buildable p => p -> Builder
build) ([Either Text StackRef] -> Builder)
-> (PrintComment -> [Either Text StackRef])
-> PrintComment
-> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrintComment -> [Either Text StackRef]
unUPrintComment
data TestAssert op = TestAssert
{ TestAssert op -> Text
tassName :: T.Text
, :: PrintComment
, TestAssert op -> [op]
tassInstrs :: [op]
} deriving stock (TestAssert op -> TestAssert op -> Bool
(TestAssert op -> TestAssert op -> Bool)
-> (TestAssert op -> TestAssert op -> Bool) -> Eq (TestAssert op)
forall op. Eq op => TestAssert op -> TestAssert op -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestAssert op -> TestAssert op -> Bool
$c/= :: forall op. Eq op => TestAssert op -> TestAssert op -> Bool
== :: TestAssert op -> TestAssert op -> Bool
$c== :: forall op. Eq op => TestAssert op -> TestAssert op -> Bool
Eq, Int -> TestAssert op -> ShowS
[TestAssert op] -> ShowS
TestAssert op -> String
(Int -> TestAssert op -> ShowS)
-> (TestAssert op -> String)
-> ([TestAssert op] -> ShowS)
-> Show (TestAssert op)
forall op. Show op => Int -> TestAssert op -> ShowS
forall op. Show op => [TestAssert op] -> ShowS
forall op. Show op => TestAssert op -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestAssert op] -> ShowS
$cshowList :: forall op. Show op => [TestAssert op] -> ShowS
show :: TestAssert op -> String
$cshow :: forall op. Show op => TestAssert op -> String
showsPrec :: Int -> TestAssert op -> ShowS
$cshowsPrec :: forall op. Show op => Int -> TestAssert op -> ShowS
Show, a -> TestAssert b -> TestAssert a
(a -> b) -> TestAssert a -> TestAssert b
(forall a b. (a -> b) -> TestAssert a -> TestAssert b)
-> (forall a b. a -> TestAssert b -> TestAssert a)
-> Functor TestAssert
forall a b. a -> TestAssert b -> TestAssert a
forall a b. (a -> b) -> TestAssert a -> TestAssert b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> TestAssert b -> TestAssert a
$c<$ :: forall a b. a -> TestAssert b -> TestAssert a
fmap :: (a -> b) -> TestAssert a -> TestAssert b
$cfmap :: forall a b. (a -> b) -> TestAssert a -> TestAssert b
Functor, Typeable (TestAssert op)
DataType
Constr
Typeable (TestAssert op) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op))
-> (TestAssert op -> Constr)
-> (TestAssert op -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (TestAssert op)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (TestAssert op)))
-> ((forall b. Data b => b -> b) -> TestAssert op -> TestAssert op)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r)
-> (forall u. (forall d. Data d => d -> u) -> TestAssert op -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TestAssert op -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op))
-> Data (TestAssert op)
TestAssert op -> DataType
TestAssert op -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (TestAssert op))
(forall b. Data b => b -> b) -> TestAssert op -> TestAssert op
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op)
forall op. Data op => Typeable (TestAssert op)
forall op. Data op => TestAssert op -> DataType
forall op. Data op => TestAssert op -> Constr
forall op.
Data op =>
(forall b. Data b => b -> b) -> TestAssert op -> TestAssert op
forall op u.
Data op =>
Int -> (forall d. Data d => d -> u) -> TestAssert op -> u
forall op u.
Data op =>
(forall d. Data d => d -> u) -> TestAssert op -> [u]
forall op r r'.
Data op =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
forall op r r'.
Data op =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
forall op (m :: * -> *).
(Data op, Monad m) =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
forall op (m :: * -> *).
(Data op, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
forall op (c :: * -> *).
Data op =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op)
forall op (c :: * -> *).
Data op =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op)
forall op (t :: * -> *) (c :: * -> *).
(Data op, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (TestAssert op))
forall op (t :: * -> * -> *) (c :: * -> *).
(Data op, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (TestAssert op))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TestAssert op -> u
forall u. (forall d. Data d => d -> u) -> TestAssert op -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (TestAssert op))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (TestAssert op))
$cTestAssert :: Constr
$tTestAssert :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
$cgmapMo :: forall op (m :: * -> *).
(Data op, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
gmapMp :: (forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
$cgmapMp :: forall op (m :: * -> *).
(Data op, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
gmapM :: (forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
$cgmapM :: forall op (m :: * -> *).
(Data op, Monad m) =>
(forall d. Data d => d -> m d)
-> TestAssert op -> m (TestAssert op)
gmapQi :: Int -> (forall d. Data d => d -> u) -> TestAssert op -> u
$cgmapQi :: forall op u.
Data op =>
Int -> (forall d. Data d => d -> u) -> TestAssert op -> u
gmapQ :: (forall d. Data d => d -> u) -> TestAssert op -> [u]
$cgmapQ :: forall op u.
Data op =>
(forall d. Data d => d -> u) -> TestAssert op -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
$cgmapQr :: forall op r r'.
Data op =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
$cgmapQl :: forall op r r'.
Data op =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TestAssert op -> r
gmapT :: (forall b. Data b => b -> b) -> TestAssert op -> TestAssert op
$cgmapT :: forall op.
Data op =>
(forall b. Data b => b -> b) -> TestAssert op -> TestAssert op
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (TestAssert op))
$cdataCast2 :: forall op (t :: * -> * -> *) (c :: * -> *).
(Data op, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (TestAssert op))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (TestAssert op))
$cdataCast1 :: forall op (t :: * -> *) (c :: * -> *).
(Data op, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (TestAssert op))
dataTypeOf :: TestAssert op -> DataType
$cdataTypeOf :: forall op. Data op => TestAssert op -> DataType
toConstr :: TestAssert op -> Constr
$ctoConstr :: forall op. Data op => TestAssert op -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op)
$cgunfold :: forall op (c :: * -> *).
Data op =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (TestAssert op)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op)
$cgfoldl :: forall op (c :: * -> *).
Data op =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TestAssert op -> c (TestAssert op)
$cp1Data :: forall op. Data op => Typeable (TestAssert op)
Data, (forall x. TestAssert op -> Rep (TestAssert op) x)
-> (forall x. Rep (TestAssert op) x -> TestAssert op)
-> Generic (TestAssert op)
forall x. Rep (TestAssert op) x -> TestAssert op
forall x. TestAssert op -> Rep (TestAssert op) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall op x. Rep (TestAssert op) x -> TestAssert op
forall op x. TestAssert op -> Rep (TestAssert op) x
$cto :: forall op x. Rep (TestAssert op) x -> TestAssert op
$cfrom :: forall op x. TestAssert op -> Rep (TestAssert op) x
Generic)
instance NFData op => NFData (TestAssert op)
instance Buildable code => Buildable (TestAssert code) where
build :: TestAssert code -> Builder
build = TestAssert code -> Builder
forall a. (Generic a, GBuildable (Rep a)) => a -> Builder
genericF
deriveJSON morleyAesonOptions ''ExtInstrAbstract
deriveJSON morleyAesonOptions ''PrintComment
deriveJSON morleyAesonOptions ''StackTypePattern
deriveJSON morleyAesonOptions ''StackRef
deriveJSON morleyAesonOptions ''StackFn
deriveJSON morleyAesonOptions ''Var
deriveJSON morleyAesonOptions ''TyVar
deriveJSON morleyAesonOptions ''TestAssert