morley-1.4.0: Developer tools for the Michelson Language
Safe HaskellNone
LanguageHaskell2010

Michelson.Untyped.EntryPoints

Synopsis

Documentation

newtype EpName Source #

Entrypoint name.

Empty if this entrypoint is default one. Cannot be equal to "default", the reference implementation forbids that. Also, set of allowed characters should be the same as in annotations.

Constructors

EpNameUnsafe 

Fields

Instances

Instances details
Eq EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Methods

(==) :: EpName -> EpName -> Bool #

(/=) :: EpName -> EpName -> Bool #

Ord EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Show EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Generic EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Associated Types

type Rep EpName :: Type -> Type #

Methods

from :: EpName -> Rep EpName x #

to :: Rep EpName x -> EpName #

Arbitrary FieldAnn => Arbitrary EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

NFData EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Methods

rnf :: EpName -> () #

ToJSON EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

FromJSON EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Default EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Methods

def :: EpName #

Buildable EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

Methods

build :: EpName -> Builder #

HasCLReader EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

type Rep EpName Source # 
Instance details

Defined in Michelson.Untyped.EntryPoints

type Rep EpName = D1 ('MetaData "EpName" "Michelson.Untyped.EntryPoints" "morley-1.4.0-FPgS4VJ0cLmB07ubDf4i8P" 'True) (C1 ('MetaCons "EpNameUnsafe" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

epNameFromParamAnn :: FieldAnn -> Maybe EpName Source #

Make up EpName from annotation in parameter type declaration.

Returns Nothing if no entrypoint is assigned here.

epNameToParamAnn :: EpName -> FieldAnn Source #

Turn entrypoint name into annotation for contract parameter declaration.

epNameFromRefAnn :: FieldAnn -> Either EpNameFromRefAnnError EpName Source #

Make up EpName from annotation which is reference to an entrypoint (e.g. annotation in CONTRACT instruction).

Fails if annotation is invalid.

epNameToRefAnn :: EpName -> FieldAnn Source #

Turn entrypoint name into annotation used as reference to entrypoint.

data EpNameFromRefAnnError Source #

mkEntrypointsMap :: Type -> Map EpName Type Source #

Given an untyped type, extract a map that maps entrypoint names to the their parameter types. If there are duplicate entrypoints in the given Type then the duplicate entrypoints at a deeper nesting level will get overwritten with the ones that are on top.