morley-1.0.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Typed.Polymorphic

Description

Module, containing type classes for operating with Michelson values in the context of polymorphic stack type operations.

Documentation

class EDivOp (n :: CT) (m :: CT) where Source #

Associated Types

type EDivOpRes n m :: CT Source #

type EModOpRes n m :: CT Source #

Methods

evalEDivOp :: CValue n -> CValue m -> Value' instr (TOption (TPair (Tc (EDivOpRes n m)) (Tc (EModOpRes n m)))) Source #

Instances
EDivOp CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CInt CInt :: CT Source #

type EModOpRes CInt CInt :: CT Source #

EDivOp CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CInt CNat :: CT Source #

type EModOpRes CInt CNat :: CT Source #

EDivOp CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CNat CInt :: CT Source #

type EModOpRes CNat CInt :: CT Source #

EDivOp CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CNat CNat :: CT Source #

type EModOpRes CNat CNat :: CT Source #

EDivOp CMutez CNat Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CMutez CNat :: CT Source #

type EModOpRes CMutez CNat :: CT Source #

EDivOp CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type EDivOpRes CMutez CMutez :: CT Source #

type EModOpRes CMutez CMutez :: CT Source #

class MemOp (c :: T) where Source #

Associated Types

type MemOpKey c :: CT Source #

Methods

evalMem :: CValue (MemOpKey c) -> Value' cp c -> Bool Source #

Instances
MemOp (TSet e) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MemOpKey (TSet e) :: CT Source #

Methods

evalMem :: CValue (MemOpKey (TSet e)) -> Value' cp (TSet e) -> Bool Source #

MemOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MemOpKey (TMap k v) :: CT Source #

Methods

evalMem :: CValue (MemOpKey (TMap k v)) -> Value' cp (TMap k v) -> Bool Source #

MemOp (TBigMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MemOpKey (TBigMap k v) :: CT Source #

Methods

evalMem :: CValue (MemOpKey (TBigMap k v)) -> Value' cp (TBigMap k v) -> Bool Source #

class MapOp (c :: T) where Source #

Associated Types

type MapOpInp c :: T Source #

type MapOpRes c :: T -> T Source #

Methods

mapOpToList :: Value' instr c -> [Value' instr (MapOpInp c)] Source #

mapOpFromList :: Value' instr c -> [Value' instr b] -> Value' instr (MapOpRes c b) Source #

Instances
MapOp (TList e) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MapOpInp (TList e) :: T Source #

type MapOpRes (TList e) :: T -> T Source #

Methods

mapOpToList :: Value' instr (TList e) -> [Value' instr (MapOpInp (TList e))] Source #

mapOpFromList :: Value' instr (TList e) -> [Value' instr b] -> Value' instr (MapOpRes (TList e) b) Source #

MapOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MapOpInp (TMap k v) :: T Source #

type MapOpRes (TMap k v) :: T -> T Source #

Methods

mapOpToList :: Value' instr (TMap k v) -> [Value' instr (MapOpInp (TMap k v))] Source #

mapOpFromList :: Value' instr (TMap k v) -> [Value' instr b] -> Value' instr (MapOpRes (TMap k v) b) Source #

class IterOp (c :: T) where Source #

Associated Types

type IterOpEl c :: T Source #

Methods

iterOpDetachOne :: Value' instr c -> (Maybe (Value' instr (IterOpEl c)), Value' instr c) Source #

Instances
IterOp (TList e) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type IterOpEl (TList e) :: T Source #

Methods

iterOpDetachOne :: Value' instr (TList e) -> (Maybe (Value' instr (IterOpEl (TList e))), Value' instr (TList e)) Source #

IterOp (TSet e) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type IterOpEl (TSet e) :: T Source #

Methods

iterOpDetachOne :: Value' instr (TSet e) -> (Maybe (Value' instr (IterOpEl (TSet e))), Value' instr (TSet e)) Source #

IterOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type IterOpEl (TMap k v) :: T Source #

Methods

iterOpDetachOne :: Value' instr (TMap k v) -> (Maybe (Value' instr (IterOpEl (TMap k v))), Value' instr (TMap k v)) Source #

class SizeOp (c :: T) where Source #

Methods

evalSize :: Value' cp c -> Int Source #

Instances
SizeOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Value' cp (Tc CString) -> Int Source #

SizeOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Value' cp (Tc CBytes) -> Int Source #

SizeOp (TList a) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Value' cp (TList a) -> Int Source #

SizeOp (TSet a) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Value' cp (TSet a) -> Int Source #

SizeOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Value' cp (TMap k v) -> Int Source #

class GetOp (c :: T) where Source #

Associated Types

type GetOpKey c :: CT Source #

type GetOpVal c :: T Source #

Methods

evalGet :: CValue (GetOpKey c) -> Value' cp c -> Maybe (Value' cp (GetOpVal c)) Source #

Instances
GetOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type GetOpKey (TMap k v) :: CT Source #

type GetOpVal (TMap k v) :: T Source #

Methods

evalGet :: CValue (GetOpKey (TMap k v)) -> Value' cp (TMap k v) -> Maybe (Value' cp (GetOpVal (TMap k v))) Source #

GetOp (TBigMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type GetOpKey (TBigMap k v) :: CT Source #

type GetOpVal (TBigMap k v) :: T Source #

Methods

evalGet :: CValue (GetOpKey (TBigMap k v)) -> Value' cp (TBigMap k v) -> Maybe (Value' cp (GetOpVal (TBigMap k v))) Source #

class UpdOp (c :: T) where Source #

Associated Types

type UpdOpKey c :: CT Source #

type UpdOpParams c :: T Source #

Methods

evalUpd :: CValue (UpdOpKey c) -> Value' cp (UpdOpParams c) -> Value' cp c -> Value' cp c Source #

Instances
UpdOp (TSet a) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type UpdOpKey (TSet a) :: CT Source #

type UpdOpParams (TSet a) :: T Source #

Methods

evalUpd :: CValue (UpdOpKey (TSet a)) -> Value' cp (UpdOpParams (TSet a)) -> Value' cp (TSet a) -> Value' cp (TSet a) Source #

UpdOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type UpdOpKey (TMap k v) :: CT Source #

type UpdOpParams (TMap k v) :: T Source #

Methods

evalUpd :: CValue (UpdOpKey (TMap k v)) -> Value' cp (UpdOpParams (TMap k v)) -> Value' cp (TMap k v) -> Value' cp (TMap k v) Source #

UpdOp (TBigMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type UpdOpKey (TBigMap k v) :: CT Source #

type UpdOpParams (TBigMap k v) :: T Source #

Methods

evalUpd :: CValue (UpdOpKey (TBigMap k v)) -> Value' cp (UpdOpParams (TBigMap k v)) -> Value' cp (TBigMap k v) -> Value' cp (TBigMap k v) Source #

class SliceOp (c :: T) where Source #

Methods

evalSlice :: Natural -> Natural -> Value' cp c -> Maybe (Value' cp c) Source #

Instances
SliceOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

SliceOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSlice :: Natural -> Natural -> Value' cp (Tc CBytes) -> Maybe (Value' cp (Tc CBytes)) Source #

class ConcatOp (c :: T) where Source #

Methods

evalConcat :: Value' cp c -> Value' cp c -> Value' cp c Source #

evalConcat' :: [Value' cp c] -> Value' cp c Source #

Instances
ConcatOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

ConcatOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic