{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module PlutusCore.Generators.Hedgehog.Denotation
( KnownType
, Denotation(..)
, DenotationContextMember(..)
, DenotationContext(..)
, lookupInContext
, denoteVariable
, insertVariable
, insertBuiltin
, typedBuiltins
) where
import PlutusCore.Builtin
import PlutusCore.Core
import PlutusCore.Default
import PlutusCore.Name.Unique
import PlutusPrelude
import Data.Dependent.Map (DMap)
import Data.Dependent.Map qualified as DMap
import Data.Functor.Compose
import Type.Reflection
type KnownType val a = (KnownTypeAst TyName (UniOf val) a, MakeKnown val a)
data Denotation term object res = forall args. Denotation
{ forall term object res. Denotation term object res -> object
_denotationObject :: object
, forall term object res.
Denotation term object res -> object -> term
_denotationToTerm :: object -> term
, ()
_denotationItself :: FoldArgs args res
, ()
_denotationScheme :: TypeScheme term args res
}
data DenotationContextMember term res =
forall object. DenotationContextMember (Denotation term object res)
newtype DenotationContext term = DenotationContext
{ forall term.
DenotationContext term
-> DMap TypeRep (Compose [] (DenotationContextMember term))
unDenotationContext :: DMap TypeRep (Compose [] (DenotationContextMember term))
}
lookupInContext
:: forall a term.
TypeRep a
-> DenotationContext term
-> [DenotationContextMember term a]
lookupInContext :: forall a term.
TypeRep a
-> DenotationContext term -> [DenotationContextMember term a]
lookupInContext TypeRep a
tr = (Compose [] (DenotationContextMember term) a
-> [DenotationContextMember term a])
-> Maybe (Compose [] (DenotationContextMember term) a)
-> [DenotationContextMember term a]
forall m a. Monoid m => (a -> m) -> Maybe a -> m
forall (t :: * -> *) m a.
(Foldable t, Monoid m) =>
(a -> m) -> t a -> m
foldMap Compose [] (DenotationContextMember term) a
-> [DenotationContextMember term a]
forall {k1} {k2} (f :: k1 -> *) (g :: k2 -> k1) (a :: k2).
Compose f g a -> f (g a)
getCompose (Maybe (Compose [] (DenotationContextMember term) a)
-> [DenotationContextMember term a])
-> (DenotationContext term
-> Maybe (Compose [] (DenotationContextMember term) a))
-> DenotationContext term
-> [DenotationContextMember term a]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TypeRep a
-> DMap TypeRep (Compose [] (DenotationContextMember term))
-> Maybe (Compose [] (DenotationContextMember term) a)
forall {k1} (k2 :: k1 -> *) (f :: k1 -> *) (v :: k1).
GCompare k2 =>
k2 v -> DMap k2 f -> Maybe (f v)
DMap.lookup TypeRep a
tr (DMap TypeRep (Compose [] (DenotationContextMember term))
-> Maybe (Compose [] (DenotationContextMember term) a))
-> (DenotationContext term
-> DMap TypeRep (Compose [] (DenotationContextMember term)))
-> DenotationContext term
-> Maybe (Compose [] (DenotationContextMember term) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DenotationContext term
-> DMap TypeRep (Compose [] (DenotationContextMember term))
forall term.
DenotationContext term
-> DMap TypeRep (Compose [] (DenotationContextMember term))
unDenotationContext
withTypeSchemeResult :: TypeScheme term args res -> (KnownType term res => TypeRep res -> c) -> c
withTypeSchemeResult :: forall term (args :: [*]) res c.
TypeScheme term args res
-> (KnownType term res => TypeRep res -> c) -> c
withTypeSchemeResult TypeScheme term args res
TypeSchemeResult (KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k = TypeRep res -> c
(KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k TypeRep res
forall {k} (a :: k). Typeable a => TypeRep a
typeRep
withTypeSchemeResult (TypeSchemeArrow TypeScheme term args1 res
schB) (KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k = TypeScheme term args1 res
-> ((KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c)
-> c
forall term (args :: [*]) res c.
TypeScheme term args res
-> (KnownType term res => TypeRep res -> c) -> c
withTypeSchemeResult TypeScheme term args1 res
schB TypeRep res -> c
(KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k
withTypeSchemeResult (TypeSchemeAll Proxy '(text, uniq, kind)
_ TypeScheme term args res
schK) (KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k = TypeScheme term args res
-> ((KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c)
-> c
forall term (args :: [*]) res c.
TypeScheme term args res
-> (KnownType term res => TypeRep res -> c) -> c
withTypeSchemeResult TypeScheme term args res
schK TypeRep res -> c
(KnownTypeAst TyName (UniOf term) res, MakeKnown term res) =>
TypeRep res -> c
k
denoteVariable
:: KnownType (Term TyName Name uni fun ()) res
=> Name -> TypeRep res -> res -> Denotation (Term TyName Name uni fun ()) Name res
denoteVariable :: forall (uni :: * -> *) fun res.
KnownType (Term TyName Name uni fun ()) res =>
Name
-> TypeRep res
-> res
-> Denotation (Term TyName Name uni fun ()) Name res
denoteVariable Name
name TypeRep res
tr res
meta = TypeRep res
-> (Typeable res =>
Denotation (Term TyName Name uni fun ()) Name res)
-> Denotation (Term TyName Name uni fun ()) Name res
forall k (a :: k) r. TypeRep a -> (Typeable a => r) -> r
withTypeable TypeRep res
tr ((Typeable res =>
Denotation (Term TyName Name uni fun ()) Name res)
-> Denotation (Term TyName Name uni fun ()) Name res)
-> (Typeable res =>
Denotation (Term TyName Name uni fun ()) Name res)
-> Denotation (Term TyName Name uni fun ()) Name res
forall a b. (a -> b) -> a -> b
$ Name
-> (Name -> Term TyName Name uni fun ())
-> FoldArgs '[] res
-> TypeScheme (Term TyName Name uni fun ()) '[] res
-> Denotation (Term TyName Name uni fun ()) Name res
forall term object res (args :: [*]).
object
-> (object -> term)
-> FoldArgs args res
-> TypeScheme term args res
-> Denotation term object res
Denotation Name
name (() -> Name -> Term TyName Name uni fun ()
forall tyname name (uni :: * -> *) fun ann.
ann -> name -> Term tyname name uni fun ann
Var ()) res
FoldArgs '[] res
meta TypeScheme (Term TyName Name uni fun ()) '[] res
forall res val.
(Typeable res, KnownTypeAst TyName (UniOf val) res,
MakeKnown val res) =>
TypeScheme val '[] res
TypeSchemeResult
insertDenotation
:: TypeRep res -> Denotation term object res -> DenotationContext term -> DenotationContext term
insertDenotation :: forall res term object.
TypeRep res
-> Denotation term object res
-> DenotationContext term
-> DenotationContext term
insertDenotation TypeRep res
tr Denotation term object res
denotation (DenotationContext DMap TypeRep (Compose [] (DenotationContextMember term))
vs) = DMap TypeRep (Compose [] (DenotationContextMember term))
-> DenotationContext term
forall term.
DMap TypeRep (Compose [] (DenotationContextMember term))
-> DenotationContext term
DenotationContext (DMap TypeRep (Compose [] (DenotationContextMember term))
-> DenotationContext term)
-> DMap TypeRep (Compose [] (DenotationContextMember term))
-> DenotationContext term
forall a b. (a -> b) -> a -> b
$
(Compose [] (DenotationContextMember term) res
-> Compose [] (DenotationContextMember term) res
-> Compose [] (DenotationContextMember term) res)
-> TypeRep res
-> Compose [] (DenotationContextMember term) res
-> DMap TypeRep (Compose [] (DenotationContextMember term))
-> DMap TypeRep (Compose [] (DenotationContextMember term))
forall {k1} (k2 :: k1 -> *) (f :: k1 -> *) (v :: k1).
GCompare k2 =>
(f v -> f v -> f v) -> k2 v -> f v -> DMap k2 f -> DMap k2 f
DMap.insertWith'
(\(Compose [DenotationContextMember term res]
xs) (Compose [DenotationContextMember term res]
ys) -> [DenotationContextMember term res]
-> Compose [] (DenotationContextMember term) res
forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
f (g a) -> Compose f g a
Compose ([DenotationContextMember term res]
-> Compose [] (DenotationContextMember term) res)
-> [DenotationContextMember term res]
-> Compose [] (DenotationContextMember term) res
forall a b. (a -> b) -> a -> b
$ [DenotationContextMember term res]
xs [DenotationContextMember term res]
-> [DenotationContextMember term res]
-> [DenotationContextMember term res]
forall a. [a] -> [a] -> [a]
++ [DenotationContextMember term res]
ys)
TypeRep res
tr
([DenotationContextMember term res]
-> Compose [] (DenotationContextMember term) res
forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
f (g a) -> Compose f g a
Compose [Denotation term object res -> DenotationContextMember term res
forall term res object.
Denotation term object res -> DenotationContextMember term res
DenotationContextMember Denotation term object res
denotation])
DMap TypeRep (Compose [] (DenotationContextMember term))
vs
insertVariable
:: KnownType (Term TyName Name uni fun ()) a
=> Name
-> TypeRep a
-> a
-> DenotationContext (Term TyName Name uni fun ())
-> DenotationContext (Term TyName Name uni fun ())
insertVariable :: forall (uni :: * -> *) fun a.
KnownType (Term TyName Name uni fun ()) a =>
Name
-> TypeRep a
-> a
-> DenotationContext (Term TyName Name uni fun ())
-> DenotationContext (Term TyName Name uni fun ())
insertVariable Name
name TypeRep a
tr = TypeRep a
-> Denotation (Term TyName Name uni fun ()) Name a
-> DenotationContext (Term TyName Name uni fun ())
-> DenotationContext (Term TyName Name uni fun ())
forall res term object.
TypeRep res
-> Denotation term object res
-> DenotationContext term
-> DenotationContext term
insertDenotation TypeRep a
tr (Denotation (Term TyName Name uni fun ()) Name a
-> DenotationContext (Term TyName Name uni fun ())
-> DenotationContext (Term TyName Name uni fun ()))
-> (a -> Denotation (Term TyName Name uni fun ()) Name a)
-> a
-> DenotationContext (Term TyName Name uni fun ())
-> DenotationContext (Term TyName Name uni fun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Name
-> TypeRep a
-> a
-> Denotation (Term TyName Name uni fun ()) Name a
forall (uni :: * -> *) fun res.
KnownType (Term TyName Name uni fun ()) res =>
Name
-> TypeRep res
-> res
-> Denotation (Term TyName Name uni fun ()) Name res
denoteVariable Name
name TypeRep a
tr
insertBuiltin
:: DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin :: DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
fun =
case BuiltinSemanticsVariant DefaultFun
-> DefaultFun
-> BuiltinMeaning
(Term TyName Name DefaultUni DefaultFun ())
(CostingPart DefaultUni DefaultFun)
forall val.
HasMeaningIn DefaultUni val =>
BuiltinSemanticsVariant DefaultFun
-> DefaultFun
-> BuiltinMeaning val (CostingPart DefaultUni DefaultFun)
forall (uni :: * -> *) fun val.
(ToBuiltinMeaning uni fun, HasMeaningIn uni val) =>
BuiltinSemanticsVariant fun
-> fun -> BuiltinMeaning val (CostingPart uni fun)
toBuiltinMeaning BuiltinSemanticsVariant DefaultFun
forall a. Default a => a
def DefaultFun
fun of
BuiltinMeaning TypeScheme (Term TyName Name DefaultUni DefaultFun ()) args res
sch FoldArgs args res
meta CostingPart DefaultUni DefaultFun
-> BuiltinRuntime (Term TyName Name DefaultUni DefaultFun ())
_ ->
TypeScheme (Term TyName Name DefaultUni DefaultFun ()) args res
-> (KnownType (Term TyName Name DefaultUni DefaultFun ()) res =>
TypeRep res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall term (args :: [*]) res c.
TypeScheme term args res
-> (KnownType term res => TypeRep res -> c) -> c
withTypeSchemeResult TypeScheme (Term TyName Name DefaultUni DefaultFun ()) args res
sch ((KnownType (Term TyName Name DefaultUni DefaultFun ()) res =>
TypeRep res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (KnownType (Term TyName Name DefaultUni DefaultFun ()) res =>
TypeRep res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall a b. (a -> b) -> a -> b
$ \TypeRep res
tr ->
TypeRep res
-> Denotation
(Term TyName Name DefaultUni DefaultFun ()) DefaultFun res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall res term object.
TypeRep res
-> Denotation term object res
-> DenotationContext term
-> DenotationContext term
insertDenotation TypeRep res
tr (Denotation
(Term TyName Name DefaultUni DefaultFun ()) DefaultFun res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> Denotation
(Term TyName Name DefaultUni DefaultFun ()) DefaultFun res
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall a b. (a -> b) -> a -> b
$ DefaultFun
-> (DefaultFun -> Term TyName Name DefaultUni DefaultFun ())
-> FoldArgs args res
-> TypeScheme (Term TyName Name DefaultUni DefaultFun ()) args res
-> Denotation
(Term TyName Name DefaultUni DefaultFun ()) DefaultFun res
forall term object res (args :: [*]).
object
-> (object -> term)
-> FoldArgs args res
-> TypeScheme term args res
-> Denotation term object res
Denotation DefaultFun
fun (() -> DefaultFun -> Term TyName Name DefaultUni DefaultFun ()
forall tyname name (uni :: * -> *) fun ann.
ann -> fun -> Term tyname name uni fun ann
Builtin ()) FoldArgs args res
meta TypeScheme (Term TyName Name DefaultUni DefaultFun ()) args res
sch
typedBuiltins
:: DenotationContext (Term TyName Name DefaultUni DefaultFun ())
typedBuiltins :: DenotationContext (Term TyName Name DefaultUni DefaultFun ())
typedBuiltins
= DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
AddInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
SubtractInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
MultiplyInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
DivideInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
RemainderInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
QuotientInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
ModInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
LessThanInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
LessThanEqualsInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
EqualsInteger
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
AppendByteString
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Sha2_256
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Sha3_256
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Blake2b_224
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Blake2b_256
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Keccak_256
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
Ripemd_160
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> (DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DefaultFun
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
insertBuiltin DefaultFun
EqualsByteString
(DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ()))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall a b. (a -> b) -> a -> b
$ DMap
TypeRep
(Compose
[]
(DenotationContextMember
(Term TyName Name DefaultUni DefaultFun ())))
-> DenotationContext (Term TyName Name DefaultUni DefaultFun ())
forall term.
DMap TypeRep (Compose [] (DenotationContextMember term))
-> DenotationContext term
DenotationContext DMap
TypeRep
(Compose
[]
(DenotationContextMember
(Term TyName Name DefaultUni DefaultFun ())))
forall a. Monoid a => a
mempty