morley-0.2.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Typed

Synopsis

Documentation

data CT Source #

Instances
Bounded CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

minBound :: CT #

maxBound :: CT #

Enum CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

succ :: CT -> CT #

pred :: CT -> CT #

toEnum :: Int -> CT #

fromEnum :: CT -> Int #

enumFrom :: CT -> [CT] #

enumFromThen :: CT -> CT -> [CT] #

enumFromTo :: CT -> CT -> [CT] #

enumFromThenTo :: CT -> CT -> CT -> [CT] #

Eq CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

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

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

Data CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CT -> c CT #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CT #

toConstr :: CT -> Constr #

dataTypeOf :: CT -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CT) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CT) #

gmapT :: (forall b. Data b => b -> b) -> CT -> CT #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CT -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CT -> r #

gmapQ :: (forall d. Data d => d -> u) -> CT -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CT -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CT -> m CT #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CT -> m CT #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CT -> m CT #

Ord CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

compare :: CT -> CT -> Ordering #

(<) :: CT -> CT -> Bool #

(<=) :: CT -> CT -> Bool #

(>) :: CT -> CT -> Bool #

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

max :: CT -> CT -> CT #

min :: CT -> CT -> CT #

Show CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

showsPrec :: Int -> CT -> ShowS #

show :: CT -> String #

showList :: [CT] -> ShowS #

Generic CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Associated Types

type Rep CT :: Type -> Type #

Methods

from :: CT -> Rep CT x #

to :: Rep CT x -> CT #

ToJSON CT Source # 
Instance details

Defined in Michelson.Untyped.Type

FromJSON CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Buildable CT Source # 
Instance details

Defined in Michelson.Untyped.Type

Methods

build :: CT -> Builder #

RenderDoc CT Source # 
Instance details

Defined in Michelson.Untyped.Type

SingI CInt Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CInt #

SingI CNat Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CNat #

SingI CString Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CString #

SingI CBytes Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CBytes #

SingI CMutez Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CMutez #

SingI CBool Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CBool #

SingI CKeyHash Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CKeyHash #

SingI CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CTimestamp #

SingI CAddress Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing CAddress #

type Rep CT Source # 
Instance details

Defined in Michelson.Untyped.Type

type Rep CT = D1 (MetaData "CT" "Michelson.Untyped.Type" "morley-0.2.0.1-FliIoxX7mVfHuhHSaQftJN" False) (((C1 (MetaCons "CInt" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CNat" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "CString" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CBytes" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "CMutez" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CBool" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "CKeyHash" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "CTimestamp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CAddress" PrefixI False) (U1 :: Type -> Type)))))
data Sing (a :: CT) Source #

Instance of data family Sing for CT.

Instance details

Defined in Michelson.Typed.Sing

data Sing (a :: CT) where

data T Source #

Michelson language type with annotations stripped off.

Instances
Eq T Source # 
Instance details

Defined in Michelson.Typed.T

Methods

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

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

Show T Source # 
Instance details

Defined in Michelson.Typed.T

Methods

showsPrec :: Int -> T -> ShowS #

show :: T -> String #

showList :: [T] -> ShowS #

SingI TKey Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing TKey #

SingI TUnit Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing TUnit #

SingI TSignature Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing TSignature #

SingI TOperation Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing TOperation #

(SingI t, Typeable t) => SingI (Tc t :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (Tc t) #

(SingI a, Typeable a) => SingI (TOption a :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TOption a) #

(SingI a, Typeable a) => SingI (TList a :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TList a) #

(SingI a, Typeable a) => SingI (TSet a :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TSet a) #

(SingI a, Typeable a) => SingI (TContract a :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TContract a) #

(SingI a, Typeable a, Typeable b, SingI b) => SingI (TPair a b :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TPair a b) #

(SingI a, Typeable a, Typeable b, SingI b) => SingI (TOr a b :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TOr a b) #

(SingI a, Typeable a, Typeable b, SingI b) => SingI (TLambda a b :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TLambda a b) #

(SingI a, Typeable a, Typeable b, SingI b) => SingI (TMap a b :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TMap a b) #

(SingI a, Typeable a, Typeable b, SingI b) => SingI (TBigMap a b :: T) Source # 
Instance details

Defined in Michelson.Typed.Sing

Methods

sing :: Sing (TBigMap a b) #

data Sing (a :: T) Source #

Instance of data family Sing for T. Custom instance is implemented in order to inject Typeable constraint for some of constructors.

Instance details

Defined in Michelson.Typed.Sing

data Sing (a :: T) where

type family ToCT a :: CT where ... Source #

Type function that converts a regular Haskell type into a comparable type (which has kind CT)

type family ToT t :: T where ... Source #

Type function that converts a regular Haskell type into a T type. TODO: what should be done with TBigMap?

data family Sing (a :: k) :: Type #

The singleton kind-indexed data family.

Instances
data Sing (a :: Bool) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Bool) where
data Sing (a :: Ordering) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Ordering) where
data Sing (n :: Nat) 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Nat) where
data Sing (n :: Symbol) 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Symbol) where
data Sing (a :: ()) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: ()) where
data Sing (a :: Void) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Void)
data Sing (a :: All) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: All) where
data Sing (a :: Any) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: Any) where
data Sing (a :: CT) Source #

Instance of data family Sing for CT.

Instance details

Defined in Michelson.Typed.Sing

data Sing (a :: CT) where
data Sing (a :: T) Source #

Instance of data family Sing for T. Custom instance is implemented in order to inject Typeable constraint for some of constructors.

Instance details

Defined in Michelson.Typed.Sing

data Sing (a :: T) where
data Sing (b :: [a]) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: [a]) where
  • SNil :: forall a (b :: [a]). Sing ([] :: [a])
  • SCons :: forall a (b :: [a]) (n1 :: a) (n2 :: [a]). Sing n1 -> Sing n2 -> Sing (n1 ': n2)
data Sing (b :: Maybe a) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: Maybe a) where
data Sing (b :: Min a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Min a) where
data Sing (b :: Max a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Max a) where
data Sing (b :: First a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: First a) where
data Sing (b :: Last a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Last a) where
data Sing (a :: WrappedMonoid m) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: WrappedMonoid m) where
data Sing (b :: Option a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Option a) where
data Sing (b :: Identity a) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: Identity a) where
data Sing (b :: First a) 
Instance details

Defined in Data.Singletons.Prelude.Monoid

data Sing (b :: First a) where
data Sing (b :: Last a) 
Instance details

Defined in Data.Singletons.Prelude.Monoid

data Sing (b :: Last a) where
data Sing (b :: Dual a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Dual a) where
data Sing (b :: Sum a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Sum a) where
data Sing (b :: Product a) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Product a) where
data Sing (b :: Down a) 
Instance details

Defined in Data.Singletons.Prelude.Ord

data Sing (b :: Down a) where
data Sing (b :: NonEmpty a) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: NonEmpty a) where
data Sing (b :: Endo a) 
Instance details

Defined in Data.Singletons.Prelude.Foldable

data Sing (b :: Endo a) where
data Sing (b :: MaxInternal a) 
Instance details

Defined in Data.Singletons.Prelude.Foldable

data Sing (b :: MaxInternal a) where
data Sing (b :: MinInternal a) 
Instance details

Defined in Data.Singletons.Prelude.Foldable

data Sing (b :: MinInternal a) where
data Sing (c :: Either a b) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (c :: Either a b) where
data Sing (c :: (a, b)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (c :: (a, b)) where
data Sing (c :: Arg a b) 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

data Sing (c :: Arg a b) where
newtype Sing (f :: k1 ~> k2) 
Instance details

Defined in Data.Singletons.Internal

newtype Sing (f :: k1 ~> k2) = SLambda {}
data Sing (b :: StateL s a) 
Instance details

Defined in Data.Singletons.Prelude.Traversable

data Sing (b :: StateL s a) where
  • SStateL :: forall s a (b :: StateL s a) (x :: s ~> (s, a)). Sing x -> Sing (StateL x)
data Sing (b :: StateR s a) 
Instance details

Defined in Data.Singletons.Prelude.Traversable

data Sing (b :: StateR s a) where
  • SStateR :: forall s a (b :: StateR s a) (x :: s ~> (s, a)). Sing x -> Sing (StateR x)
data Sing (d :: (a, b, c)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (d :: (a, b, c)) where
data Sing (c :: Const a b) 
Instance details

Defined in Data.Singletons.Prelude.Const

data Sing (c :: Const a b) where
data Sing (e :: (a, b, c, d)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (e :: (a, b, c, d)) where
data Sing (f :: (a, b, c, d, e)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (f :: (a, b, c, d, e)) where
  • STuple5 :: forall a b c d e (f :: (a, b, c, d, e)) (n1 :: a) (n2 :: b) (n3 :: c) (n4 :: d) (n5 :: e). Sing n1 -> Sing n2 -> Sing n3 -> Sing n4 -> Sing n5 -> Sing ((,,,,) n1 n2 n3 n4 n5)
data Sing (g :: (a, b, c, d, e, f)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (g :: (a, b, c, d, e, f)) where
  • STuple6 :: forall a b c d e f (g :: (a, b, c, d, e, f)) (n1 :: a) (n2 :: b) (n3 :: c) (n4 :: d) (n5 :: e) (n6 :: f). Sing n1 -> Sing n2 -> Sing n3 -> Sing n4 -> Sing n5 -> Sing n6 -> Sing ((,,,,,) n1 n2 n3 n4 n5 n6)
data Sing (h :: (a, b, c, d, e, f, g)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (h :: (a, b, c, d, e, f, g)) where
  • STuple7 :: forall a b c d e f g (h :: (a, b, c, d, e, f, g)) (n1 :: a) (n2 :: b) (n3 :: c) (n4 :: d) (n5 :: e) (n6 :: f) (n7 :: g). Sing n1 -> Sing n2 -> Sing n3 -> Sing n4 -> Sing n5 -> Sing n6 -> Sing n7 -> Sing ((,,,,,,) n1 n2 n3 n4 n5 n6 n7)

withSomeSingT :: T -> (forall (a :: T). (Typeable a, SingI a) => Sing a -> r) -> r Source #

Version of withSomeSing with Typeable constraint provided to processing function.

Required for not to erase these useful constraints when doing conversion from value of type T to its singleton representation.

withSomeSingCT :: CT -> (forall (a :: CT). (SingI a, Typeable a) => Sing a -> r) -> r Source #

Version of withSomeSing with Typeable constraint provided to processing function.

Required for not to erase this useful constraint when doing conversion from value of type CT to its singleton representation.

fromSingT :: Sing (a :: T) -> T Source #

Version of fromSing specialized for use with data instance Sing :: T -> Type which requires Typeable constraint for some of its constructors

fromSingCT :: Sing (a :: CT) -> CT Source #

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

Associated Types

type EDivOpRes n m :: CT Source #

type EModOpRes n m :: CT Source #

Methods

evalEDivOp :: CVal n -> CVal m -> Val 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 :: CVal (MemOpKey c) -> Val 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 :: CVal (MemOpKey (TSet e)) -> Val 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 :: CVal (MemOpKey (TMap k v)) -> Val 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 :: CVal (MemOpKey (TBigMap k v)) -> Val cp (TBigMap k v) -> Bool Source #

class MapOp (c :: T) (b :: T) where Source #

Associated Types

type MapOpInp c :: T Source #

type MapOpRes c b :: T Source #

Methods

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

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

Instances
MapOp (TList e) e' Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

type MapOpInp (TList e) :: T Source #

type MapOpRes (TList e) e' :: T Source #

Methods

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

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

MapOp (TMap k v) v' Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Associated Types

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

type MapOpRes (TMap k v) v' :: T Source #

Methods

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

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

class IterOp (c :: T) where Source #

Associated Types

type IterOpEl c :: T Source #

Methods

iterOpDetachOne :: Val instr c -> (Maybe (Val instr (IterOpEl c)), Val 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 :: Val instr (TList e) -> (Maybe (Val instr (IterOpEl (TList e))), Val 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 :: Val instr (TSet e) -> (Maybe (Val instr (IterOpEl (TSet e))), Val 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 :: Val instr (TMap k v) -> (Maybe (Val instr (IterOpEl (TMap k v))), Val instr (TMap k v)) Source #

class SizeOp (c :: T) where Source #

Methods

evalSize :: Val cp c -> Int Source #

Instances
SizeOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

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

SizeOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

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

SizeOp (TList a) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

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

SizeOp (TSet a) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

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

SizeOp (TMap k v) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSize :: Val 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 :: CVal (GetOpKey c) -> Val cp c -> Maybe (Val 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 :: CVal (GetOpKey (TMap k v)) -> Val cp (TMap k v) -> Maybe (Val 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 :: CVal (GetOpKey (TBigMap k v)) -> Val cp (TBigMap k v) -> Maybe (Val 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 :: CVal (UpdOpKey c) -> Val cp (UpdOpParams c) -> Val cp c -> Val 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 :: CVal (UpdOpKey (TSet a)) -> Val cp (UpdOpParams (TSet a)) -> Val cp (TSet a) -> Val 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 :: CVal (UpdOpKey (TMap k v)) -> Val cp (UpdOpParams (TMap k v)) -> Val cp (TMap k v) -> Val 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 :: CVal (UpdOpKey (TBigMap k v)) -> Val cp (UpdOpParams (TBigMap k v)) -> Val cp (TBigMap k v) -> Val cp (TBigMap k v) Source #

class SliceOp (c :: T) where Source #

Methods

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

Instances
SliceOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalSlice :: Natural -> Natural -> Val cp (Tc CString) -> Maybe (Val cp (Tc CString)) Source #

SliceOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

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

class ConcatOp (c :: T) where Source #

Methods

evalConcat :: Val cp c -> Val cp c -> Val cp c Source #

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

Instances
ConcatOp (Tc CString) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalConcat :: Val cp (Tc CString) -> Val cp (Tc CString) -> Val cp (Tc CString) Source #

evalConcat' :: [Val cp (Tc CString)] -> Val cp (Tc CString) Source #

ConcatOp (Tc CBytes) Source # 
Instance details

Defined in Michelson.Typed.Polymorphic

Methods

evalConcat :: Val cp (Tc CBytes) -> Val cp (Tc CBytes) -> Val cp (Tc CBytes) Source #

evalConcat' :: [Val cp (Tc CBytes)] -> Val cp (Tc CBytes) Source #

data Instr (inp :: [T]) (out :: [T]) where Source #

Representation of Michelson instruction or sequence of instructions.

Each Michelson instruction is represented by exactly one constructor of this data type. Sequence of instructions is represented with use of Seq constructor in following way: SWAP; DROP ; DUP; -> SWAP Instr DROP Instr DUP. Special case where there are no instructions is represented by constructor Nop, e.g. IF_NONE {} { SWAP; DROP; } -> IF_NONE Nop (SWAP Instr DROP).

Type parameter inp states for input stack type. That is, type of the stack that is required for operation to execute.

Type parameter out states for output stack type or type of stack that will be left after instruction's execution.

Constructors

Seq :: Typeable b => Instr a b -> Instr b c -> Instr a c 
Nop :: Instr s s

Nop operation. Missing in Michelson spec, added to parse construction like `IF {} { SWAP; DROP; }`.

Ext :: ExtT Instr -> Instr s s 
Nested :: Instr inp out -> Instr inp out

Nested wrapper is going to wrap a sequence of instructions with { }. It is crucial because serialisation of a contract depends on precise structure of its code.

DROP :: Instr (a ': s) s 
DUP :: Instr (a ': s) (a ': (a ': s)) 
SWAP :: Instr (a ': (b ': s)) (b ': (a ': s)) 
PUSH :: forall t s. SingI t => Val Instr t -> Instr s (t ': s) 
SOME :: Instr (a ': s) (TOption a ': s) 
NONE :: forall a s. SingI a => Instr s (TOption a ': s) 
UNIT :: Instr s (TUnit ': s) 
IF_NONE :: (Typeable a, Typeable s) => Instr s s' -> Instr (a ': s) s' -> Instr (TOption a ': s) s' 
PAIR :: Instr (a ': (b ': s)) (TPair a b ': s) 
CAR :: Instr (TPair a b ': s) (a ': s) 
CDR :: Instr (TPair a b ': s) (b ': s) 
LEFT :: forall a b s. SingI b => Instr (a ': s) (TOr a b ': s) 
RIGHT :: forall a b s. SingI a => Instr (b ': s) (TOr a b ': s) 
IF_LEFT :: (Typeable s, Typeable a, Typeable b) => Instr (a ': s) s' -> Instr (b ': s) s' -> Instr (TOr a b ': s) s' 
IF_RIGHT :: (Typeable s, Typeable b, Typeable a) => Instr (b ': s) s' -> Instr (a ': s) s' -> Instr (TOr a b ': s) s' 
NIL :: SingI p => Instr s (TList p ': s) 
CONS :: Instr (a ': (TList a ': s)) (TList a ': s) 
IF_CONS :: (Typeable s, Typeable a) => Instr (a ': (TList a ': s)) s' -> Instr s s' -> Instr (TList a ': s) s' 
SIZE :: SizeOp c => Instr (c ': s) (Tc CNat ': s) 
EMPTY_SET :: SingI e => Instr s (TSet e ': s) 
EMPTY_MAP :: (SingI a, SingI b) => Instr s (TMap a b ': s) 
MAP :: (Typeable (MapOpInp c ': s), MapOp c b) => Instr (MapOpInp c ': s) (b ': s) -> Instr (c ': s) (MapOpRes c b ': s) 
ITER :: (Typeable (IterOpEl c ': s), IterOp c) => Instr (IterOpEl c ': s) s -> Instr (c ': s) s 
MEM :: MemOp c => Instr (Tc (MemOpKey c) ': (c ': s)) (Tc CBool ': s) 
GET :: GetOp c => Instr (Tc (GetOpKey c) ': (c ': s)) (TOption (GetOpVal c) ': s) 
UPDATE :: UpdOp c => Instr (Tc (UpdOpKey c) ': (UpdOpParams c ': (c ': s))) (c ': s) 
IF :: Typeable s => Instr s s' -> Instr s s' -> Instr (Tc CBool ': s) s' 
LOOP :: Typeable s => Instr s (Tc CBool ': s) -> Instr (Tc CBool ': s) s 
LOOP_LEFT :: (Typeable a, Typeable s) => Instr (a ': s) (TOr a b ': s) -> Instr (TOr a b ': s) (b ': s) 
LAMBDA :: forall i o s. (SingI i, SingI o) => Val Instr (TLambda i o) -> Instr s (TLambda i o ': s) 
EXEC :: Typeable t1 => Instr (t1 ': (TLambda t1 t2 ': s)) (t2 ': s) 
DIP :: Typeable a => Instr a c -> Instr (b ': a) (b ': c) 
FAILWITH :: Instr (a ': s) t 
CAST :: forall a s. SingI a => Instr (a ': s) (a ': s) 
RENAME :: Instr (a ': s) (a ': s) 
PACK :: Instr (a ': s) (Tc CBytes ': s) 
UNPACK :: SingI a => Instr (Tc CBytes ': s) (TOption a ': s) 
CONCAT :: ConcatOp c => Instr (c ': (c ': s)) (c ': s) 
CONCAT' :: ConcatOp c => Instr (TList c ': s) (c ': s) 
SLICE :: SliceOp c => Instr (Tc CNat ': (Tc CNat ': (c ': s))) (TOption c ': s) 
ISNAT :: Instr (Tc CInt ': s) (TOption (Tc CNat) ': s) 
ADD :: ArithOp Add n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Add n m) ': s) 
SUB :: ArithOp Sub n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Sub n m) ': s) 
MUL :: ArithOp Mul n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Mul n m) ': s) 
EDIV :: EDivOp n m => Instr (Tc n ': (Tc m ': s)) (TOption (TPair (Tc (EDivOpRes n m)) (Tc (EModOpRes n m))) ': s) 
ABS :: UnaryArithOp Abs n => Instr (Tc n ': s) (Tc (UnaryArithRes Abs n) ': s) 
NEG :: UnaryArithOp Neg n => Instr (Tc n ': s) (Tc (UnaryArithRes Neg n) ': s) 
LSL :: ArithOp Lsl n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Lsl n m) ': s) 
LSR :: ArithOp Lsr n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Lsr n m) ': s) 
OR :: ArithOp Or n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Or n m) ': s) 
AND :: ArithOp And n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes And n m) ': s) 
XOR :: ArithOp Xor n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Xor n m) ': s) 
NOT :: UnaryArithOp Not n => Instr (Tc n ': s) (Tc (UnaryArithRes Not n) ': s) 
COMPARE :: ArithOp Compare n m => Instr (Tc n ': (Tc m ': s)) (Tc (ArithRes Compare n m) ': s) 
EQ :: UnaryArithOp Eq' n => Instr (Tc n ': s) (Tc (UnaryArithRes Eq' n) ': s) 
NEQ :: UnaryArithOp Neq n => Instr (Tc n ': s) (Tc (UnaryArithRes Neq n) ': s) 
LT :: UnaryArithOp Lt n => Instr (Tc n ': s) (Tc (UnaryArithRes Lt n) ': s) 
GT :: UnaryArithOp Gt n => Instr (Tc n ': s) (Tc (UnaryArithRes Gt n) ': s) 
LE :: UnaryArithOp Le n => Instr (Tc n ': s) (Tc (UnaryArithRes Le n) ': s) 
GE :: UnaryArithOp Ge n => Instr (Tc n ': s) (Tc (UnaryArithRes Ge n) ': s) 
INT :: Instr (Tc CNat ': s) (Tc CInt ': s) 
SELF :: forall (cp :: T) s. Instr s (TContract cp ': s) 
CONTRACT :: SingI p => Instr (Tc CAddress ': s) (TOption (TContract p) ': s) 
TRANSFER_TOKENS :: Typeable p => Instr (p ': (Tc CMutez ': (TContract p ': s))) (TOperation ': s) 
SET_DELEGATE :: Instr (TOption (Tc CKeyHash) ': s) (TOperation ': s) 
CREATE_ACCOUNT :: Instr (Tc CKeyHash ': (TOption (Tc CKeyHash) ': (Tc CBool ': (Tc CMutez ': s)))) (TOperation ': (Tc CAddress ': s)) 
CREATE_CONTRACT :: (SingI p, SingI g, Typeable p, Typeable g) => Instr (Tc CKeyHash ': (TOption (Tc CKeyHash) ': (Tc CBool ': (Tc CBool ': (Tc CMutez ': (TLambda (TPair p g) (TPair (TList TOperation) g) ': (g ': s))))))) (TOperation ': (Tc CAddress ': s)) 
CREATE_CONTRACT2 :: (SingI p, SingI g, Typeable p, Typeable g) => Instr '[TPair p g] '[TPair (TList TOperation) g] -> Instr (Tc CKeyHash ': (TOption (Tc CKeyHash) ': (Tc CBool ': (Tc CBool ': (Tc CMutez ': (g ': s)))))) (TOperation ': (Tc CAddress ': s)) 
IMPLICIT_ACCOUNT :: Instr (Tc CKeyHash ': s) (TContract TUnit ': s) 
NOW :: Instr s (Tc CTimestamp ': s) 
AMOUNT :: Instr s (Tc CMutez ': s) 
BALANCE :: Instr s (Tc CMutez ': s) 
CHECK_SIGNATURE :: Instr (TKey ': (TSignature ': (Tc CBytes ': s))) (Tc CBool ': s) 
SHA256 :: Instr (Tc CBytes ': s) (Tc CBytes ': s) 
SHA512 :: Instr (Tc CBytes ': s) (Tc CBytes ': s) 
BLAKE2B :: Instr (Tc CBytes ': s) (Tc CBytes ': s) 
HASH_KEY :: Instr (TKey ': s) (Tc CKeyHash ': s) 
STEPS_TO_QUOTA :: Instr s (Tc CNat ': s) 
SOURCE :: Instr s (Tc CAddress ': s) 
SENDER :: Instr s (Tc CAddress ': s) 
ADDRESS :: Instr (TContract a ': s) (Tc CAddress ': s) 
Instances
(ConversibleExt, Eq ExpandedInstrExtU) => Eq (Instr inp out) Source # 
Instance details

Defined in Michelson.Typed.Convert

Methods

(==) :: Instr inp out -> Instr inp out -> Bool #

(/=) :: Instr inp out -> Instr inp out -> Bool #

Show (ExtT Instr) => Show (Instr inp out) Source # 
Instance details

Defined in Michelson.Typed.Instr

Methods

showsPrec :: Int -> Instr inp out -> ShowS #

show :: Instr inp out -> String #

showList :: [Instr inp out] -> ShowS #

type ExtT Instr Source # 
Instance details

Defined in Morley.Types

(#) :: Typeable b => Instr a b -> Instr b c -> Instr a c infixl 0 Source #

Infix version of Seq constructor.

One can represent sequence of Michelson opertaions as follows: SWAP; DROP; DUP; -> SWAP DUP.

type Contract cp st = Instr (ContractInp cp st) (ContractOut st) Source #

type family ExtT (instr :: [T] -> [T] -> Type) :: Type Source #

ExtT is extension of Instr by Morley instructions

Instances
type ExtT Instr Source # 
Instance details

Defined in Morley.Types

extractNotes :: Type -> Sing t -> Either Text (Notes t) Source #

Extracts Notes t type from Type and corresponding singleton.

fromUType :: Type -> T Source #

Extracts T type from Type.

mkUType :: Sing x -> Notes x -> Type Source #

toUType :: T -> Type Source #

Converts from T to Type.

data CVal t where Source #

Representation of comparable value in Michelson language.

By specification, we're allowed to compare only following types: int, nat, string, bytes, mutez, bool, key_hash, timestamp, address.

Only these values can be used as map keys or set elements.

Instances
Eq (CVal t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

(==) :: CVal t -> CVal t -> Bool #

(/=) :: CVal t -> CVal t -> Bool #

Ord (CVal t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

compare :: CVal t -> CVal t -> Ordering #

(<) :: CVal t -> CVal t -> Bool #

(<=) :: CVal t -> CVal t -> Bool #

(>) :: CVal t -> CVal t -> Bool #

(>=) :: CVal t -> CVal t -> Bool #

max :: CVal t -> CVal t -> CVal t #

min :: CVal t -> CVal t -> CVal t #

Show (CVal t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

showsPrec :: Int -> CVal t -> ShowS #

show :: CVal t -> String #

showList :: [CVal t] -> ShowS #

Arbitrary (CVal CInt) Source # 
Instance details

Defined in Morley.Test.Gen

Arbitrary (CVal CMutez) Source # 
Instance details

Defined in Morley.Test.Gen

Arbitrary (CVal CKeyHash) Source # 
Instance details

Defined in Morley.Test.Gen

Arbitrary (CVal CTimestamp) Source # 
Instance details

Defined in Morley.Test.Gen

class ToCVal a Source #

Converts a single Haskell value into CVal representation.

Minimal complete definition

toCVal

Instances
ToCVal Bool Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

toCVal :: Bool -> CVal (ToCT Bool) Source #

ToCVal Int Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

toCVal :: Int -> CVal (ToCT Int) Source #

ToCVal Integer Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal Natural Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal Word64 Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal ByteString Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal Text Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

toCVal :: Text -> CVal (ToCT Text) Source #

ToCVal Timestamp Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal Mutez Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

toCVal :: Mutez -> CVal (ToCT Mutez) Source #

ToCVal KeyHash Source # 
Instance details

Defined in Michelson.Typed.CValue

ToCVal Address Source # 
Instance details

Defined in Michelson.Typed.CValue

class FromCVal t Source #

Converts a CVal value into a single Haskell value.

Minimal complete definition

fromCVal

Instances
FromCVal Bool Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

fromCVal :: CVal (ToCT Bool) -> Bool Source #

FromCVal Integer Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal Natural Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal ByteString Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal Text Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

fromCVal :: CVal (ToCT Text) -> Text Source #

FromCVal Timestamp Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal Mutez Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal KeyHash Source # 
Instance details

Defined in Michelson.Typed.CValue

FromCVal Address Source # 
Instance details

Defined in Michelson.Typed.CValue

toCVal :: ToCVal a => a -> CVal (ToCT a) Source #

fromCVal :: FromCVal t => CVal (ToCT t) -> t Source #

convertContract :: forall param store. (SingI param, SingI store, ConversibleExt) => Contract param store -> UntypedContract Source #

unsafeValToValue :: (ConversibleExt, HasCallStack) => Val Instr t -> UntypedValue Source #

Function unsafeValToValue converts typed Val to untyped Value from Michelson.Untyped.Value module

VOp cannot be represented in Value from untyped types, so calling this function on it will cause an error

valToOpOrValue :: forall t. ConversibleExt => Val Instr t -> Maybe UntypedValue Source #

Convert a typed Val to an untyped Value, or fail if it contains operations which are unrepresentable there.

class Conversible ext1 ext2 where Source #

Methods

convert :: ext1 -> ext2 Source #

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

Class for binary arithmetic operation.

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

Associated Types

type ArithRes aop n m :: CT 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

evalOp :: proxy aop -> CVal n -> CVal m -> Either (ArithError (CVal n) (CVal m)) (CVal (ArithRes aop n m)) Source #

Evaluate arithmetic operation on given operands.

Instances
ArithOp Compare CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CInt CInt :: CT Source #

ArithOp Compare CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CNat CNat :: CT Source #

ArithOp Compare CString CString Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CString CString :: CT Source #

ArithOp Compare CBytes CBytes Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CBytes CBytes :: CT Source #

ArithOp Compare CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CMutez CMutez :: CT Source #

ArithOp Compare CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CBool CBool :: CT Source #

ArithOp Compare CKeyHash CKeyHash Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CKeyHash CKeyHash :: CT Source #

ArithOp Compare CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CTimestamp CTimestamp :: CT Source #

ArithOp Compare CAddress CAddress Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CAddress CAddress :: CT Source #

ArithOp Lsr CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Lsr CNat CNat :: CT Source #

ArithOp Lsl CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Lsl CNat CNat :: CT Source #

ArithOp Xor CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Xor CNat CNat :: CT Source #

ArithOp Xor CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Xor CBool CBool :: CT Source #

ArithOp And CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CInt CNat :: CT Source #

ArithOp And CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CNat CNat :: CT Source #

ArithOp And CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CBool CBool :: CT Source #

ArithOp Or CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Or CNat CNat :: CT Source #

ArithOp Or CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Or CBool CBool :: CT Source #

ArithOp Mul CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CInt CInt :: CT Source #

ArithOp Mul CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CInt CNat :: CT Source #

ArithOp Mul CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CInt :: CT Source #

ArithOp Mul CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CNat :: CT Source #

ArithOp Mul CNat CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CMutez :: CT Source #

ArithOp Mul CMutez CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CMutez CNat :: CT Source #

ArithOp Sub CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CInt CInt :: CT Source #

ArithOp Sub CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CInt CNat :: CT Source #

ArithOp Sub CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CNat CInt :: CT Source #

ArithOp Sub CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CNat CNat :: CT Source #

ArithOp Sub CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CMutez CMutez :: CT Source #

ArithOp Sub CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CTimestamp CInt :: CT Source #

ArithOp Sub CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CTimestamp CTimestamp :: CT Source #

ArithOp Add CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CInt :: CT Source #

ArithOp Add CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CNat :: CT Source #

ArithOp Add CInt CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CTimestamp :: CT Source #

ArithOp Add CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CNat CInt :: CT Source #

ArithOp Add CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CNat CNat :: CT Source #

ArithOp Add CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CMutez CMutez :: CT Source #

ArithOp Add CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CTimestamp CInt :: CT Source #

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

Marker data type for add operation.

Associated Types

type UnaryArithRes aop n :: CT Source #

Methods

evalUnaryArithOp :: proxy aop -> CVal n -> CVal (UnaryArithRes aop n) Source #

Instances
UnaryArithOp Ge CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Ge CInt :: CT Source #

UnaryArithOp Le CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Le CInt :: CT Source #

UnaryArithOp Gt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Gt CInt :: CT Source #

UnaryArithOp Lt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Lt CInt :: CT Source #

UnaryArithOp Neq CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Neq CInt :: CT Source #

UnaryArithOp Eq' CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Eq' CInt :: CT Source #

UnaryArithOp Not CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CInt :: CT Source #

UnaryArithOp Not CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CNat :: CT Source #

UnaryArithOp Not CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CBool :: CT Source #

UnaryArithOp Neg CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Neg CInt :: CT Source #

UnaryArithOp Abs CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Abs CInt :: CT Source #

data ArithError n m Source #

Represents an arithmetic error of the operation.

Instances
(Eq n, Eq m) => Eq (ArithError n m) Source # 
Instance details

Defined 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 details

Defined in Michelson.Typed.Arith

Methods

compare :: 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 details

Defined in Michelson.Typed.Arith

Methods

showsPrec :: Int -> ArithError n m -> ShowS #

show :: ArithError n m -> String #

showList :: [ArithError n m] -> ShowS #

(Show n, Show m) => Buildable (ArithError n m) Source # 
Instance details

Defined in Michelson.Typed.Arith

Methods

build :: ArithError n m -> Builder #

data Add Source #

Instances
ArithOp Add CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CInt :: CT Source #

ArithOp Add CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CNat :: CT Source #

ArithOp Add CInt CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CInt CTimestamp :: CT Source #

ArithOp Add CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CNat CInt :: CT Source #

ArithOp Add CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CNat CNat :: CT Source #

ArithOp Add CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CMutez CMutez :: CT Source #

ArithOp Add CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Add CTimestamp CInt :: CT Source #

type ArithRes Add CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CInt CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Add CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Sub Source #

Instances
ArithOp Sub CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CInt CInt :: CT Source #

ArithOp Sub CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CInt CNat :: CT Source #

ArithOp Sub CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CNat CInt :: CT Source #

ArithOp Sub CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CNat CNat :: CT Source #

ArithOp Sub CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CMutez CMutez :: CT Source #

ArithOp Sub CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CTimestamp CInt :: CT Source #

ArithOp Sub CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Sub CTimestamp CTimestamp :: CT Source #

type ArithRes Sub CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CTimestamp CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Sub CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

data Mul Source #

Instances
ArithOp Mul CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CInt CInt :: CT Source #

ArithOp Mul CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CInt CNat :: CT Source #

ArithOp Mul CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CInt :: CT Source #

ArithOp Mul CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CNat :: CT Source #

ArithOp Mul CNat CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CNat CMutez :: CT Source #

ArithOp Mul CMutez CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Mul CMutez CNat :: CT Source #

type ArithRes Mul CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Mul CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Mul CNat CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Mul CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Mul CNat CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Mul CMutez CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

data Abs Source #

Instances
UnaryArithOp Abs CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Abs CInt :: CT Source #

type UnaryArithRes Abs CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Neg Source #

Instances
UnaryArithOp Neg CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Neg CInt :: CT Source #

type UnaryArithRes Neg CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Or Source #

Instances
ArithOp Or CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Or CNat CNat :: CT Source #

ArithOp Or CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Or CBool CBool :: CT Source #

type ArithRes Or CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Or CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

data And Source #

Instances
ArithOp And CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CInt CNat :: CT Source #

ArithOp And CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CNat CNat :: CT Source #

ArithOp And CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes And CBool CBool :: CT Source #

type ArithRes And CInt CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes And CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes And CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

data Xor Source #

Instances
ArithOp Xor CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Xor CNat CNat :: CT Source #

ArithOp Xor CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Xor CBool CBool :: CT Source #

type ArithRes Xor CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Xor CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

data Not Source #

Instances
UnaryArithOp Not CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CInt :: CT Source #

UnaryArithOp Not CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CNat :: CT Source #

UnaryArithOp Not CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Not CBool :: CT Source #

type UnaryArithRes Not CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type UnaryArithRes Not CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type UnaryArithRes Not CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

data Lsl Source #

Instances
ArithOp Lsl CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Lsl CNat CNat :: CT Source #

type ArithRes Lsl CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

data Lsr Source #

Instances
ArithOp Lsr CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Lsr CNat CNat :: CT Source #

type ArithRes Lsr CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

data Compare Source #

Instances
ArithOp Compare CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CInt CInt :: CT Source #

ArithOp Compare CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CNat CNat :: CT Source #

ArithOp Compare CString CString Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CString CString :: CT Source #

ArithOp Compare CBytes CBytes Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CBytes CBytes :: CT Source #

ArithOp Compare CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CMutez CMutez :: CT Source #

ArithOp Compare CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CBool CBool :: CT Source #

ArithOp Compare CKeyHash CKeyHash Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CKeyHash CKeyHash :: CT Source #

ArithOp Compare CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CTimestamp CTimestamp :: CT Source #

ArithOp Compare CAddress CAddress Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type ArithRes Compare CAddress CAddress :: CT Source #

type ArithRes Compare CInt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CNat CNat Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CString CString Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CBytes CBytes Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CMutez CMutez Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CBool CBool Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CKeyHash CKeyHash Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CTimestamp CTimestamp Source # 
Instance details

Defined in Michelson.Typed.Arith

type ArithRes Compare CAddress CAddress Source # 
Instance details

Defined in Michelson.Typed.Arith

data Eq' Source #

Instances
UnaryArithOp Eq' CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Eq' CInt :: CT Source #

type UnaryArithRes Eq' CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Neq Source #

Instances
UnaryArithOp Neq CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Neq CInt :: CT Source #

type UnaryArithRes Neq CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Lt Source #

Instances
UnaryArithOp Lt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Lt CInt :: CT Source #

type UnaryArithRes Lt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Gt Source #

Instances
UnaryArithOp Gt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Gt CInt :: CT Source #

type UnaryArithRes Gt CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Le Source #

Instances
UnaryArithOp Le CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Le CInt :: CT Source #

type UnaryArithRes Le CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Ge Source #

Instances
UnaryArithOp Ge CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

Associated Types

type UnaryArithRes Ge CInt :: CT Source #

type UnaryArithRes Ge CInt Source # 
Instance details

Defined in Michelson.Typed.Arith

data Notes t Source #

Data type, holding annotation data for a given Michelson type t or * in case no data is provided for the tree.

There is a little semantical duplication between data type constructors. Semantics behind NStar constructor are exactly same as semantics behind N constructor with relevant Notes' constructor be given all default values (which means all annotations are empty).

Constructor NStar is given as a tiny optimization to allow handling no-annotation case completely for free (see converge and mkNotes functions).

Constructors

N (Notes' t) 
NStar 

data Notes' t where Source #

Data type, holding annotation data for a given Michelson type t.

Each constructor corresponds to exactly one constructor of T and holds all type and field annotations that can be attributed to a Michelson type corrspoding to t.

converge :: Notes t -> Notes t -> Either Text (Notes t) Source #

Same as converge' but works with Notes data type.

convergeAnns :: Show (Annotation tag) => Annotation tag -> Annotation tag -> Either Text (Annotation tag) Source #

Converge two type or field notes (which may be wildcards).

notesCase :: r -> (Notes' t -> r) -> Notes t -> r Source #

Helper function for work with Notes data type.

 notesCase f g notes

is equivalent to

 case notes of
   NStar -> f
   N v -> g v

isStar :: Notes t -> Bool Source #

Check whether given annotations object is *.

mkNotes :: Notes' t -> Notes t Source #

Checks whether given notes n can be immediately converted to star and returns either NStar or N n.

Given n :: Notes' t can be immediately converted to star iff all nested (sn :: Notes t) == NStar and for each annotation an: an == def.