morley-0.7.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Lorentz.Constraints.Scopes

Contents

Description

Scope-related constraints used in Lorentz.

This contains constraints from Scope modified for use in Lorentz.

Synopsis

Grouped constraints

type NiceParameter a = (KnownValue a, ProperParameterBetterErrors (ToT a)) Source #

Constraint applied to any part of parameter type.

Note that you don't usually apply this constraint to the whole parameter, consider using NiceParameterFull in such case.

Using this type is justified e.g. when calling another contract, there you usually supply an entrypoint argument, not the whole parameter.

Individual constraints (internals)

class (IsoValue a, HasNoNestedBigMaps (ToT a)) => CanHaveBigMap a Source #

Instances
(IsoValue a, HasNoNestedBigMaps (ToT a)) => CanHaveBigMap a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

class (IsoValue a, Typeable (ToT a), SingI (ToT a)) => KnownValue a Source #

Gathers constraints, commonly required for values.

Instances
(IsoValue a, Typeable (ToT a), SingI (ToT a)) => KnownValue a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

class (IsoValue a, Typeable (ToCT a), SingI (ToCT a)) => KnownCValue a Source #

Instances
(IsoValue a, Typeable (ToCT a), SingI (ToCT a)) => KnownCValue a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

class (IsoValue a, ForbidOp (ToT a)) => NoOperation a Source #

Ensure given type does not contain "operation".

Instances
(IsoValue a, ForbidOp (ToT a)) => NoOperation a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

class (IsoValue a, ForbidContract (ToT a)) => NoContractType a Source #

Instances
(IsoValue a, ForbidContract (ToT a)) => NoContractType a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

class (IsoValue a, ForbidBigMap (ToT a)) => NoBigMap a Source #

Instances
(IsoValue a, ForbidBigMap (ToT a)) => NoBigMap a Source # 
Instance details

Defined in Lorentz.Constraints.Scopes

Re-exports

withDict :: HasDict c e => e -> (c -> r) -> r #

From a Dict, takes a value in an environment where the instance witnessed by the Dict is in scope, and evaluates it.

Essentially a deconstruction of a Dict into its continuation-style form.

Can also be used to deconstruct an entailment, a :- b, using a context a.

withDict :: Dict c -> (c => r) -> r
withDict :: a => (a :- c) -> (c => r) -> r