morley-1.7.0: Developer tools for the Michelson Language

Michelson.Typed.Arith

Description

Module, containing some boilerplate for support of arithmetic operations in Michelson language.

Synopsis

# Documentation

class ArithOp aop (n :: T) (m :: T) where Source #

Class for binary arithmetic operation.

Takes binary operation marker as op parameter, types of left operand n and right operand m.

Minimal complete definition

Associated Types

type ArithRes aop n m :: T Source #

Type family ArithRes denotes the type resulting from computing operation op from operands of types n and m.

For instance, adding integer to natural produces integer, which is reflected in following instance of type family: ArithRes Add CNat CInt = CInt.

Methods

convergeArith :: proxy aop -> Notes n -> Notes m -> Either AnnConvergeError (Notes (ArithRes aop n m)) Source #

Converge the notes of given operands.

evalOp :: proxy aop -> Value' instr n -> Value' instr m -> Either (ArithError (Value' instr n) (Value' instr m)) (Value' instr (ArithRes aop n m)) Source #

Evaluate arithmetic operation on given operands.

commutativityProof :: Maybe \$ Dict (ArithRes aop n m ~ ArithRes aop m n, ArithOp aop m n) Source #

An operation can marked as commutative, it does not affect its runtime behavior, but enables certain optimization in the optimizer. We conservatively consider operations non-commutative by default.

Note that there is one unusual case: AND works with int : nat but not with nat : int. That's how it's specified in Michelson.

#### Instances

Instances details

class UnaryArithOp aop (n :: T) where Source #

Marker data type for add operation.

Associated Types

type UnaryArithRes aop n :: T Source #

Methods

evalUnaryArithOp :: proxy aop -> Value' instr n -> Value' instr (UnaryArithRes aop n) Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Ge 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Ge -> Value' instr 'TInt -> Value' instr (UnaryArithRes Ge 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Le 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Le -> Value' instr 'TInt -> Value' instr (UnaryArithRes Le 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Gt 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Gt -> Value' instr 'TInt -> Value' instr (UnaryArithRes Gt 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Lt 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Lt -> Value' instr 'TInt -> Value' instr (UnaryArithRes Lt 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neq 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neq -> Value' instr 'TInt -> Value' instr (UnaryArithRes Neq 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Eq' 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Eq' -> Value' instr 'TInt -> Value' instr (UnaryArithRes Eq' 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Not 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TInt -> Value' instr (UnaryArithRes Not 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Not 'TNat :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TNat -> Value' instr (UnaryArithRes Not 'TNat) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Types MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TBool -> Value' instr (UnaryArithRes Not 'TBool) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neg 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neg -> Value' instr 'TInt -> Value' instr (UnaryArithRes Neg 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neg 'TNat :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neg -> Value' instr 'TNat -> Value' instr (UnaryArithRes Neg 'TNat) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Abs 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Abs -> Value' instr 'TInt -> Value' instr (UnaryArithRes Abs 'TInt) Source #

data ArithError n m Source #

Represents an arithmetic error of the operation.

Constructors

 MutezArithError MutezArithErrorType n m ShiftArithError ShiftArithErrorType n m

#### Instances

Instances details
 (Eq n, Eq m) => Eq (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith Methods(==) :: ArithError n m -> ArithError n m -> Bool #(/=) :: ArithError n m -> ArithError n m -> Bool # (Ord n, Ord m) => Ord (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith Methodscompare :: ArithError n m -> ArithError n m -> Ordering #(<) :: ArithError n m -> ArithError n m -> Bool #(<=) :: ArithError n m -> ArithError n m -> Bool #(>) :: ArithError n m -> ArithError n m -> Bool #(>=) :: ArithError n m -> ArithError n m -> Bool #max :: ArithError n m -> ArithError n m -> ArithError n m #min :: ArithError n m -> ArithError n m -> ArithError n m # (Show n, Show m) => Show (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith MethodsshowsPrec :: Int -> ArithError n m -> ShowS #show :: ArithError n m -> String #showList :: [ArithError n m] -> ShowS # Generic (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype Rep (ArithError n m) :: Type -> Type # Methodsfrom :: ArithError n m -> Rep (ArithError n m) x #to :: Rep (ArithError n m) x -> ArithError n m # (NFData n, NFData m) => NFData (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith Methodsrnf :: ArithError n m -> () # (Show n, Show m) => Buildable (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith Methodsbuild :: ArithError n m -> Builder # type Rep (ArithError n m) Source # Instance detailsDefined in Michelson.Typed.Arith type Rep (ArithError n m) = D1 ('MetaData "ArithError" "Michelson.Typed.Arith" "morley-1.7.0-inplace" 'False) (C1 ('MetaCons "MutezArithError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MutezArithErrorType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 n) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 m))) :+: C1 ('MetaCons "ShiftArithError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ShiftArithErrorType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 n) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 m))))

Denotes the error type occurred in the arithmetic shift operation.

Constructors

 LslOverflow LsrUnderflow

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype Rep ShiftArithErrorType :: Type -> Type # Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methodsrnf :: ShiftArithErrorType -> () # Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith type Rep ShiftArithErrorType = D1 ('MetaData "ShiftArithErrorType" "Michelson.Typed.Arith" "morley-1.7.0-inplace" 'False) (C1 ('MetaCons "LslOverflow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LsrUnderflow" 'PrefixI 'False) (U1 :: Type -> Type))

Denotes the error type occurred in the arithmetic operation involving mutez.

Constructors

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype Rep MutezArithErrorType :: Type -> Type # Methods Source # Instance detailsDefined in Michelson.Typed.Arith Methodsrnf :: MutezArithErrorType -> () # Source # Instance detailsDefined in Michelson.Typed.Arith Methods Source # Instance detailsDefined in Michelson.Typed.Arith type Rep MutezArithErrorType = D1 ('MetaData "MutezArithErrorType" "Michelson.Typed.Arith" "morley-1.7.0-inplace" 'False) (C1 ('MetaCons "AddOverflow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MulOverflow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SubUnderflow" 'PrefixI 'False) (U1 :: Type -> Type)))

#### Instances

Instances details

data Sub Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Sub 'TInt 'TInt :: T Source # MethodsconvergeArith :: proxy Sub -> Notes 'TInt -> Notes 'TInt -> Either AnnConvergeError (Notes (ArithRes Sub 'TInt 'TInt)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TInt -> Value' instr 'TInt -> Either (ArithError (Value' instr 'TInt) (Value' instr 'TInt)) (Value' instr (ArithRes Sub 'TInt 'TInt)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Sub 'TInt 'TNat :: T Source # MethodsconvergeArith :: proxy Sub -> Notes 'TInt -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Sub 'TInt 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TInt -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TInt) (Value' instr 'TNat)) (Value' instr (ArithRes Sub 'TInt 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Sub 'TNat 'TInt :: T Source # MethodsconvergeArith :: proxy Sub -> Notes 'TNat -> Notes 'TInt -> Either AnnConvergeError (Notes (ArithRes Sub 'TNat 'TInt)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TNat -> Value' instr 'TInt -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TInt)) (Value' instr (ArithRes Sub 'TNat 'TInt)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Sub 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Sub -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Sub 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Sub 'TNat 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Sub 'TMutez 'TMutez :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TMutez -> Value' instr 'TMutez -> Either (ArithError (Value' instr 'TMutez) (Value' instr 'TMutez)) (Value' instr (ArithRes Sub 'TMutez 'TMutez)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Types MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TTimestamp -> Value' instr 'TInt -> Either (ArithError (Value' instr 'TTimestamp) (Value' instr 'TInt)) (Value' instr (ArithRes Sub 'TTimestamp 'TInt)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Types MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Sub -> Value' instr 'TTimestamp -> Value' instr 'TTimestamp -> Either (ArithError (Value' instr 'TTimestamp) (Value' instr 'TTimestamp)) (Value' instr (ArithRes Sub 'TTimestamp 'TTimestamp)) Source # type ArithRes Sub 'TInt 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TInt 'TInt = 'TInt type ArithRes Sub 'TInt 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TInt 'TNat = 'TInt type ArithRes Sub 'TNat 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TNat 'TInt = 'TInt type ArithRes Sub 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TNat 'TNat = 'TInt type ArithRes Sub 'TMutez 'TMutez Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TMutez 'TMutez = 'TMutez Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TTimestamp 'TInt = 'TTimestamp Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Sub 'TTimestamp 'TTimestamp = 'TInt

data Mul Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TInt 'TInt :: T Source # MethodsconvergeArith :: proxy Mul -> Notes 'TInt -> Notes 'TInt -> Either AnnConvergeError (Notes (ArithRes Mul 'TInt 'TInt)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TInt -> Value' instr 'TInt -> Either (ArithError (Value' instr 'TInt) (Value' instr 'TInt)) (Value' instr (ArithRes Mul 'TInt 'TInt)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TInt 'TNat :: T Source # MethodsconvergeArith :: proxy Mul -> Notes 'TInt -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Mul 'TInt 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TInt -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TInt) (Value' instr 'TNat)) (Value' instr (ArithRes Mul 'TInt 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TNat 'TInt :: T Source # MethodsconvergeArith :: proxy Mul -> Notes 'TNat -> Notes 'TInt -> Either AnnConvergeError (Notes (ArithRes Mul 'TNat 'TInt)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TNat -> Value' instr 'TInt -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TInt)) (Value' instr (ArithRes Mul 'TNat 'TInt)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Mul -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Mul 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Mul 'TNat 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TNat 'TMutez :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TNat -> Value' instr 'TMutez -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TMutez)) (Value' instr (ArithRes Mul 'TNat 'TMutez)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Mul 'TMutez 'TNat :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Mul -> Value' instr 'TMutez -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TMutez) (Value' instr 'TNat)) (Value' instr (ArithRes Mul 'TMutez 'TNat)) Source # type ArithRes Mul 'TInt 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TInt 'TInt = 'TInt type ArithRes Mul 'TInt 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TInt 'TNat = 'TInt type ArithRes Mul 'TNat 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TNat 'TInt = 'TInt type ArithRes Mul 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TNat 'TNat = 'TNat type ArithRes Mul 'TNat 'TMutez Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TNat 'TMutez = 'TMutez type ArithRes Mul 'TMutez 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Mul 'TMutez 'TNat = 'TMutez

data Abs Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Abs 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Abs -> Value' instr 'TInt -> Value' instr (UnaryArithRes Abs 'TInt) Source # type UnaryArithRes Abs 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Abs 'TInt = 'TNat

data Neg Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neg 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neg -> Value' instr 'TInt -> Value' instr (UnaryArithRes Neg 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neg 'TNat :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neg -> Value' instr 'TNat -> Value' instr (UnaryArithRes Neg 'TNat) Source # type UnaryArithRes Neg 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Neg 'TInt = 'TInt type UnaryArithRes Neg 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Neg 'TNat = 'TInt

data Or Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Or 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Or -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Or 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Or -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Or 'TNat 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Or 'TBool 'TBool :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Or -> Value' instr 'TBool -> Value' instr 'TBool -> Either (ArithError (Value' instr 'TBool) (Value' instr 'TBool)) (Value' instr (ArithRes Or 'TBool 'TBool)) Source # type ArithRes Or 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Or 'TNat 'TNat = 'TNat type ArithRes Or 'TBool 'TBool Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Or 'TBool 'TBool = 'TBool

data And Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes And 'TInt 'TNat :: T Source # MethodsconvergeArith :: proxy And -> Notes 'TInt -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes And 'TInt 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy And -> Value' instr 'TInt -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TInt) (Value' instr 'TNat)) (Value' instr (ArithRes And 'TInt 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes And 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy And -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes And 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy And -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes And 'TNat 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes And 'TBool 'TBool :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy And -> Value' instr 'TBool -> Value' instr 'TBool -> Either (ArithError (Value' instr 'TBool) (Value' instr 'TBool)) (Value' instr (ArithRes And 'TBool 'TBool)) Source # type ArithRes And 'TInt 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes And 'TInt 'TNat = 'TNat type ArithRes And 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes And 'TNat 'TNat = 'TNat type ArithRes And 'TBool 'TBool Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes And 'TBool 'TBool = 'TBool

data Xor Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Xor 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Xor -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Xor 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Xor -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Xor 'TNat 'TNat)) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Xor 'TBool 'TBool :: T Source # MethodsevalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Xor -> Value' instr 'TBool -> Value' instr 'TBool -> Either (ArithError (Value' instr 'TBool) (Value' instr 'TBool)) (Value' instr (ArithRes Xor 'TBool 'TBool)) Source # type ArithRes Xor 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Xor 'TNat 'TNat = 'TNat type ArithRes Xor 'TBool 'TBool Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Xor 'TBool 'TBool = 'TBool

data Not Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Not 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TInt -> Value' instr (UnaryArithRes Not 'TInt) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Not 'TNat :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TNat -> Value' instr (UnaryArithRes Not 'TNat) Source # Source # Instance detailsDefined in Michelson.Typed.Arith Associated Types MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Not -> Value' instr 'TBool -> Value' instr (UnaryArithRes Not 'TBool) Source # type UnaryArithRes Not 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Not 'TInt = 'TInt type UnaryArithRes Not 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Not 'TNat = 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Not 'TBool = 'TBool

data Lsl Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Lsl 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Lsl -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Lsl 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Lsl -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Lsl 'TNat 'TNat)) Source # type ArithRes Lsl 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Lsl 'TNat 'TNat = 'TNat

data Lsr Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype ArithRes Lsr 'TNat 'TNat :: T Source # MethodsconvergeArith :: proxy Lsr -> Notes 'TNat -> Notes 'TNat -> Either AnnConvergeError (Notes (ArithRes Lsr 'TNat 'TNat)) Source #evalOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Lsr -> Value' instr 'TNat -> Value' instr 'TNat -> Either (ArithError (Value' instr 'TNat) (Value' instr 'TNat)) (Value' instr (ArithRes Lsr 'TNat 'TNat)) Source # type ArithRes Lsr 'TNat 'TNat Source # Instance detailsDefined in Michelson.Typed.Arith type ArithRes Lsr 'TNat 'TNat = 'TNat

data Eq' Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Eq' 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Eq' -> Value' instr 'TInt -> Value' instr (UnaryArithRes Eq' 'TInt) Source # type UnaryArithRes Eq' 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Eq' 'TInt = 'TBool

data Neq Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Neq 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Neq -> Value' instr 'TInt -> Value' instr (UnaryArithRes Neq 'TInt) Source # type UnaryArithRes Neq 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Neq 'TInt = 'TBool

data Lt Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Lt 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Lt -> Value' instr 'TInt -> Value' instr (UnaryArithRes Lt 'TInt) Source # type UnaryArithRes Lt 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Lt 'TInt = 'TBool

data Gt Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Gt 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Gt -> Value' instr 'TInt -> Value' instr (UnaryArithRes Gt 'TInt) Source # type UnaryArithRes Gt 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Gt 'TInt = 'TBool

data Le Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Le 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Le -> Value' instr 'TInt -> Value' instr (UnaryArithRes Le 'TInt) Source # type UnaryArithRes Le 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Le 'TInt = 'TBool

data Ge Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Michelson.Typed.Arith Associated Typestype UnaryArithRes Ge 'TInt :: T Source # MethodsevalUnaryArithOp :: forall proxy (instr :: [T] -> [T] -> Type). proxy Ge -> Value' instr 'TInt -> Value' instr (UnaryArithRes Ge 'TInt) Source # type UnaryArithRes Ge 'TInt Source # Instance detailsDefined in Michelson.Typed.Arith type UnaryArithRes Ge 'TInt = 'TBool

compareOp :: forall t i. (Comparable t, SingI t) => Value' i t -> Value' i t -> Integer Source #