morley-0.3.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Untyped.Value

Description

Untyped Michelson values (i. e. type of a value is not statically known).

Synopsis

Documentation

data Value' op Source #

Constructors

ValueInt Integer 
ValueString MText 
ValueBytes InternalByteString 
ValueUnit 
ValueTrue 
ValueFalse 
ValuePair (Value' op) (Value' op) 
ValueLeft (Value' op) 
ValueRight (Value' op) 
ValueSome (Value' op) 
ValueNone 
ValueNil 
ValueSeq (NonEmpty $ Value' op)

A sequence of elements: can be a list or a set. We can't distinguish lists and sets during parsing.

ValueMap (NonEmpty $ Elt op) 
ValueLambda (NonEmpty op) 
Instances
Functor Value' Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

fmap :: (a -> b) -> Value' a -> Value' b #

(<$) :: a -> Value' b -> Value' a #

Eq op => Eq (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

(==) :: Value' op -> Value' op -> Bool #

(/=) :: Value' op -> Value' op -> Bool #

Data op => Data (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value' op -> c (Value' op) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Value' op) #

toConstr :: Value' op -> Constr #

dataTypeOf :: Value' op -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Value' op -> Value' op #

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

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

gmapQ :: (forall d. Data d => d -> u) -> Value' op -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Value' op -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value' op -> m (Value' op) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value' op -> m (Value' op) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value' op -> m (Value' op) #

Show op => Show (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

showsPrec :: Int -> Value' op -> ShowS #

show :: Value' op -> String #

showList :: [Value' op] -> ShowS #

Generic (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Associated Types

type Rep (Value' op) :: Type -> Type #

Methods

from :: Value' op -> Rep (Value' op) x #

to :: Rep (Value' op) x -> Value' op #

Arbitrary op => Arbitrary (Value' op) Source # 
Instance details

Defined in Util.Test.Arbitrary

Methods

arbitrary :: Gen (Value' op) #

shrink :: Value' op -> [Value' op] #

ToJSON op => ToJSON (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

FromJSON op => FromJSON (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

RenderDoc op => Buildable (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

build :: Value' op -> Builder #

(Arbitrary op, ToADTArbitrary op) => ToADTArbitrary (Value' op) Source # 
Instance details

Defined in Util.Test.Arbitrary

RenderDoc op => RenderDoc (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

type Rep (Value' op) Source # 
Instance details

Defined in Michelson.Untyped.Value

type Rep (Value' op) = D1 (MetaData "Value'" "Michelson.Untyped.Value" "morley-0.3.0.1-Avb9bjjqJWNEobyGi9OGAh" False) (((C1 (MetaCons "ValueInt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)) :+: (C1 (MetaCons "ValueString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MText)) :+: C1 (MetaCons "ValueBytes" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InternalByteString)))) :+: ((C1 (MetaCons "ValueUnit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ValueTrue" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ValueFalse" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ValuePair" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op)))))) :+: (((C1 (MetaCons "ValueLeft" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op))) :+: C1 (MetaCons "ValueRight" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op)))) :+: (C1 (MetaCons "ValueSome" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op))) :+: C1 (MetaCons "ValueNone" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "ValueNil" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ValueSeq" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty $ Value' op)))) :+: (C1 (MetaCons "ValueMap" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty $ Elt op))) :+: C1 (MetaCons "ValueLambda" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty op)))))))

data Elt op Source #

Constructors

Elt (Value' op) (Value' op) 
Instances
Functor Elt Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

fmap :: (a -> b) -> Elt a -> Elt b #

(<$) :: a -> Elt b -> Elt a #

Eq op => Eq (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

(==) :: Elt op -> Elt op -> Bool #

(/=) :: Elt op -> Elt op -> Bool #

Data op => Data (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

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

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

toConstr :: Elt op -> Constr #

dataTypeOf :: Elt op -> DataType #

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

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

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

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

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

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

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

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

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

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

Show op => Show (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

showsPrec :: Int -> Elt op -> ShowS #

show :: Elt op -> String #

showList :: [Elt op] -> ShowS #

Generic (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Associated Types

type Rep (Elt op) :: Type -> Type #

Methods

from :: Elt op -> Rep (Elt op) x #

to :: Rep (Elt op) x -> Elt op #

Arbitrary op => Arbitrary (Elt op) Source # 
Instance details

Defined in Util.Test.Arbitrary

Methods

arbitrary :: Gen (Elt op) #

shrink :: Elt op -> [Elt op] #

ToJSON op => ToJSON (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

toJSON :: Elt op -> Value #

toEncoding :: Elt op -> Encoding #

toJSONList :: [Elt op] -> Value #

toEncodingList :: [Elt op] -> Encoding #

FromJSON op => FromJSON (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

parseJSON :: Value -> Parser (Elt op) #

parseJSONList :: Value -> Parser [Elt op] #

RenderDoc op => Buildable (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

build :: Elt op -> Builder #

(Arbitrary op, ToADTArbitrary op) => ToADTArbitrary (Elt op) Source # 
Instance details

Defined in Util.Test.Arbitrary

RenderDoc op => RenderDoc (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

renderDoc :: Elt op -> Doc Source #

isRenderable :: Elt op -> Bool Source #

type Rep (Elt op) Source # 
Instance details

Defined in Michelson.Untyped.Value

type Rep (Elt op) = D1 (MetaData "Elt" "Michelson.Untyped.Value" "morley-0.3.0.1-Avb9bjjqJWNEobyGi9OGAh" False) (C1 (MetaCons "Elt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Value' op))))

newtype InternalByteString Source #

ByteString does not have an instance for ToJSON and FromJSON, to avoid orphan type class instances, make a new type wrapper around it.

Instances
Eq InternalByteString Source # 
Instance details

Defined in Michelson.Untyped.Value

Data InternalByteString Source # 
Instance details

Defined in Michelson.Untyped.Value

Methods

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

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

toConstr :: InternalByteString -> Constr #

dataTypeOf :: InternalByteString -> DataType #

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

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

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

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

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

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

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

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

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

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

Show InternalByteString Source # 
Instance details

Defined in Michelson.Untyped.Value

Arbitrary InternalByteString Source # 
Instance details

Defined in Util.Test.Arbitrary

ToJSON InternalByteString Source # 
Instance details

Defined in Michelson.Untyped.Value

FromJSON InternalByteString Source # 
Instance details

Defined in Michelson.Untyped.Value