lorentz-0.15.1: EDSL for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lorentz.Constraints.Scopes

Description

Scope-related constraints used in Lorentz.

This contains constraints from Morley.Michelson.Typed.Scope modified for use in Lorentz.

Synopsis

Grouped constraints

type NiceComparable n = (ProperNonComparableValBetterErrors (ToT n), KnownValue n, Comparable (ToT n)) Source #

Constraint applied to any type, to check if Michelson representation (if exists) of this type is Comparable. In case it is not prints human-readable error message

type NiceConstant a = (ProperConstantBetterErrors (ToT a), KnownValue a) Source #

type Dupable a = (ProperDupableBetterErrors (ToT a), KnownValue a) Source #

type NicePackedValue a = (ProperPackedValBetterErrors (ToT a), KnownValue a) Source #

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

Constraint applied to any part of a parameter type.

Use NiceParameterFull instead when you need to know the contract's entrypoints at compile-time.

type NiceUntypedValue a = (ProperUntypedValBetterErrors (ToT a), KnownValue a) Source #

type NiceStorage a = (ProperStorageBetterErrors (ToT a), KnownValue a) Source #

type NiceUnpackedValue a = (ProperUnpackedValBetterErrors (ToT a), KnownValue a) Source #

type NiceViewable a = (ProperViewableBetterErrors (ToT a), KnownValue a) Source #

type NiceNoBigMap n = (KnownValue n, HasNoBigMap (ToT n)) Source #

Individual constraints (internals)

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

Instances

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

Defined in Lorentz.Constraints.Scopes

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

Gathers constraints, commonly required for values.

Instances

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

Defined in Lorentz.Constraints.Scopes

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

Ensure given type does not contain "operation".

Instances

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

Defined in Lorentz.Constraints.Scopes

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

Instances

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

Defined in Lorentz.Constraints.Scopes

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

Instances

Instances details
(ForbidBigMap (ToT a), IsoValue 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