Safe Haskell | None |
---|---|
Language | Haskell2010 |
Scope-related constraints used in Lorentz.
This contains constraints from Morley.Michelson.Typed.Scope modified for use in Lorentz.
Synopsis
- type NiceComparable n = (ProperNonComparableValBetterErrors (ToT n), KnownValue n, Comparable (ToT n))
- type NiceConstant a = (ProperConstantBetterErrors (ToT a), KnownValue a)
- type Dupable a = (ProperDupableBetterErrors (ToT a), KnownValue a)
- type NiceFullPackedValue a = (NicePackedValue a, NiceUnpackedValue a)
- type NicePackedValue a = (ProperPackedValBetterErrors (ToT a), KnownValue a)
- type NiceParameter a = (ProperParameterBetterErrors (ToT a), KnownValue a)
- type NiceUntypedValue a = (ProperUntypedValBetterErrors (ToT a), KnownValue a)
- type NiceStorage a = (ProperStorageBetterErrors (ToT a), KnownValue a)
- type NiceStorageFull a = (NiceStorage a, HasAnnotation a)
- type NiceUnpackedValue a = (ProperUnpackedValBetterErrors (ToT a), KnownValue a)
- type NiceViewable a = (ProperViewableBetterErrors (ToT a), KnownValue a)
- type NiceNoBigMap n = (KnownValue n, HasNoBigMap (ToT n))
- niceParameterEvi :: forall a. NiceParameter a :- ParameterScope (ToT a)
- niceStorageEvi :: forall a. NiceStorage a :- StorageScope (ToT a)
- niceConstantEvi :: forall a. NiceConstant a :- ConstantScope (ToT a)
- dupableEvi :: forall a. Dupable a :- DupableScope (ToT a)
- nicePackedValueEvi :: forall a. NicePackedValue a :- PackedValScope (ToT a)
- niceUnpackedValueEvi :: forall a. NiceUnpackedValue a :- UnpackedValScope (ToT a)
- niceUntypedValueEvi :: forall a. NiceUntypedValue a :- UntypedValScope (ToT a)
- niceViewableEvi :: forall a. NiceViewable a :- ViewableScope (ToT a)
- class (HasNoNestedBigMaps (ToT a), IsoValue a) => CanHaveBigMap a
- class (IsoValue a, Typeable a) => KnownValue a
- class (ForbidOp (ToT a), IsoValue a) => NoOperation a
- class (ForbidContract (ToT a), IsoValue a) => NoContractType a
- class (ForbidBigMap (ToT a), IsoValue a) => NoBigMap a
- withDict :: HasDict c e => e -> (c => r) -> r
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 NiceFullPackedValue a = (NicePackedValue a, NiceUnpackedValue 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 NiceStorageFull a = (NiceStorage a, HasAnnotation 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 #
niceParameterEvi :: forall a. NiceParameter a :- ParameterScope (ToT a) Source #
niceStorageEvi :: forall a. NiceStorage a :- StorageScope (ToT a) Source #
niceConstantEvi :: forall a. NiceConstant a :- ConstantScope (ToT a) Source #
nicePackedValueEvi :: forall a. NicePackedValue a :- PackedValScope (ToT a) Source #
niceUnpackedValueEvi :: forall a. NiceUnpackedValue a :- UnpackedValScope (ToT a) Source #
niceUntypedValueEvi :: forall a. NiceUntypedValue a :- UntypedValScope (ToT a) Source #
niceViewableEvi :: forall a. NiceViewable a :- ViewableScope (ToT a) Source #
Individual constraints (internals)
class (HasNoNestedBigMaps (ToT a), IsoValue a) => CanHaveBigMap a Source #
Instances
(HasNoNestedBigMaps (ToT a), IsoValue a) => CanHaveBigMap a Source # | |
Defined in Lorentz.Constraints.Scopes |
class (IsoValue a, Typeable a) => KnownValue a Source #
Gathers constraints, commonly required for values.
Instances
(IsoValue a, Typeable a) => KnownValue a Source # | |
Defined in Lorentz.Constraints.Scopes |
class (ForbidOp (ToT a), IsoValue a) => NoOperation a Source #
Ensure given type does not contain "operation".
Instances
(ForbidOp (ToT a), IsoValue a) => NoOperation a Source # | |
Defined in Lorentz.Constraints.Scopes |
class (ForbidContract (ToT a), IsoValue a) => NoContractType a Source #
Instances
(ForbidContract (ToT a), IsoValue a) => NoContractType a Source # | |
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
, using a context :-
ba
.
withDict ::Dict
c -> (c => r) -> r withDict :: a => (a:-
c) -> (c => r) -> r