morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Typed.Scope.Internal.Scopes

Synopsis

Documentation

class UnpackedValScopeC (UnpackedValScope t) t => UnpackedValScope t Source #

Set of constraints that Michelson applies to unpacked values. Same as ConstantScope.

Not just a type alias in order to show better errors on ambiguity or missing constraint.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: UnpackedValScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`, `big_map`, `contract`, `ticket` or `sapling_state`. Perhaps you need to add
... UnpackedValScope t0
... constraint? You can also try adding a type annotation.
...

class ConstantScopeC (ConstantScope t) t => ConstantScope t Source #

Set of constraints that Michelson applies to pushed constants.

Not just a type alias in order to be able to partially apply it

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: ConstantScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`, `big_map`, `contract`, `ticket` or `sapling_state`. Perhaps you need to add
... ConstantScope t0
... constraint? You can also try adding a type annotation.
...

class PackedValScopeC (PackedValScope t) t => PackedValScope t Source #

Set of constraints that Michelson applies to packed values.

Not just a type alias in order to be able to partially apply it.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: PackedValScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`, `big_map`, `ticket` or `sapling_state`. Perhaps you need to add
... PackedValScope t0
... constraint? You can also try adding a type annotation.
...

class ParameterScopeC (ParameterScope t) t => ParameterScope t Source #

Set of constraints that Michelson applies to parameters.

Not just a type alias in order to be able to partially apply it

Produces human-readable error messages:

>>> () :: ParameterScope (TBigMap TUnit (TBigMap TUnit TOperation)) => ()
...
... Type `operation` found in
... 'TBigMap 'TUnit ('TBigMap 'TUnit 'TOperation)
... is not allowed in this scope
...
... Nested `big_map`s found in
... 'TBigMap 'TUnit ('TBigMap 'TUnit 'TOperation)
... are not allowed
...
>>> () :: ParameterScope (TBigMap TInt TNat) => ()
()

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: ParameterScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation` or nested `big_map`s. Perhaps you need to add
... ParameterScope t0
... constraint? You can also try adding a type annotation.
...

class StorageScopeC (StorageScope t) t => StorageScope t Source #

Set of constraints that Michelson applies to contract storage.

Not just a type alias in order to be able to partially apply it

Produces human-readable error messages:

>>> () :: StorageScope (TContract TOperation) => ()
...
... Type `operation` found in
... 'TOperation
... is not allowed in this scope
...
... Type `contract` found in
... 'TContract 'TOperation
... is not allowed in this scope
...
>>> () :: StorageScope TUnit => ()
()

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: StorageScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`, nested `big_map`s or `contract`. Perhaps you need to add
... StorageScope t0
... constraint? You can also try adding a type annotation.
...

class DupableScopeC (DupableScope t) t => DupableScope t Source #

Alias for constraints which Michelson requires in DUP instruction.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: DupableScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `ticket`. Perhaps you need to add
... DupableScope t0
... constraint? You can also try adding a type annotation.
...

class UntypedValScopeC (UntypedValScope t) t => UntypedValScope t Source #

Alias for constraints which are required for untyped representation.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: UntypedValScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`. Perhaps you need to add
... UntypedValScope t0
... constraint? You can also try adding a type annotation.
...

Instances

Instances details
UntypedValScopeC (UntypedValScope t) t => UntypedValScope t Source # 
Instance details

Defined in Morley.Michelson.Typed.Scope.Internal.Scopes

class ViewableScopeC (ViewableScope t) t => ViewableScope t Source #

Set of constraints that Michelson applies to argument type and return type of views. All info related to views can be found in TZIP.

Not just a type alias in order to be able to partially apply it.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: ViewableScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains `operation`, `big_map` or `ticket`. Perhaps you need to add
... ViewableScope t0
... constraint? You can also try adding a type annotation.
...

class ComparabilityScopeC (ComparabilityScope t) t => ComparabilityScope t Source #

Alias for comparable types.

On ambiguous or polymorphic types, suggests adding the constraint:

>>> (const () :: ComparabilityScope t => f t -> ()) undefined
...
... Can't check if type
... t0
... contains non-comparable types. Perhaps you need to add
... ComparabilityScope t0
... constraint? You can also try adding a type annotation.
...

type family IsDupableScope (t :: T) :: Bool where ... Source #

Returns whether the type is dupable.

Equations

IsDupableScope t = Not (ContainsT 'PSTicket t) 

type CommonScopeC c ps t = (SingI t, ForbidManyT c ps t, WellTyped t) Source #

Common constraints used for scopes defined below.

type UntypedValScopeC c t = (SingI t, ForbidManyT c '['PSOp] t) Source #