Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module that defines Expression type, its related types and its JSON instance.
Synopsis
- data Annotation
- data Expression
- data MichelinePrimAp = MichelinePrimAp {}
- newtype MichelinePrimitive = MichelinePrimitive Text
- michelsonPrimitive :: Seq Text
- annotToText :: Annotation -> Text
- annotFromText :: MonadFail m => Text -> m Annotation
- genExpression :: forall m. (MonadGen m, GenBase m ~ Identity) => m Expression
- genExpressionSeq :: forall m. (MonadGen m, GenBase m ~ Identity) => m (Seq Expression)
- genMichelinePrimAp :: forall m. (MonadGen m, GenBase m ~ Identity) => m MichelinePrimAp
- genExprAnnotation :: forall m. (MonadGen m, GenBase m ~ Identity) => m Annotation
Documentation
data Annotation Source #
Instances
Eq Annotation Source # | |
Defined in Morley.Micheline.Expression (==) :: Annotation -> Annotation -> Bool # (/=) :: Annotation -> Annotation -> Bool # | |
Show Annotation Source # | |
Defined in Morley.Micheline.Expression showsPrec :: Int -> Annotation -> ShowS # show :: Annotation -> String # showList :: [Annotation] -> ShowS # | |
ToJSON Annotation Source # | |
Defined in Morley.Micheline.Expression toJSON :: Annotation -> Value # toEncoding :: Annotation -> Encoding # toJSONList :: [Annotation] -> Value # toEncodingList :: [Annotation] -> Encoding # | |
FromJSON Annotation Source # | |
Defined in Morley.Micheline.Expression parseJSON :: Value -> Parser Annotation # parseJSONList :: Value -> Parser [Annotation] # |
data Expression Source #
Type for Micheline Expression
ExpressionInt Integer | Micheline represents both nats and ints using the same decimal format. The Haskell Integer type spans all possible values that the final (Michelson) type could end up being, and then some, so we use (StringEncode Integer) to represent all integral values here for easy JSON encoding compatibility. |
ExpressionString Text | |
ExpressionBytes ByteString | |
ExpressionSeq (Seq Expression) | |
ExpressionPrim MichelinePrimAp |
Instances
Eq Expression Source # | |
Defined in Morley.Micheline.Expression (==) :: Expression -> Expression -> Bool # (/=) :: Expression -> Expression -> Bool # | |
Show Expression Source # | |
Defined in Morley.Micheline.Expression showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS # | |
ToJSON Expression Source # | |
Defined in Morley.Micheline.Expression toJSON :: Expression -> Value # toEncoding :: Expression -> Encoding # toJSONList :: [Expression] -> Value # toEncodingList :: [Expression] -> Encoding # | |
FromJSON Expression Source # | |
Defined in Morley.Micheline.Expression parseJSON :: Value -> Parser Expression # parseJSONList :: Value -> Parser [Expression] # |
data MichelinePrimAp Source #
Instances
Eq MichelinePrimAp Source # | |
Defined in Morley.Micheline.Expression (==) :: MichelinePrimAp -> MichelinePrimAp -> Bool # (/=) :: MichelinePrimAp -> MichelinePrimAp -> Bool # | |
Show MichelinePrimAp Source # | |
Defined in Morley.Micheline.Expression showsPrec :: Int -> MichelinePrimAp -> ShowS # show :: MichelinePrimAp -> String # showList :: [MichelinePrimAp] -> ShowS # | |
ToJSON MichelinePrimAp Source # | |
Defined in Morley.Micheline.Expression toJSON :: MichelinePrimAp -> Value # toEncoding :: MichelinePrimAp -> Encoding # toJSONList :: [MichelinePrimAp] -> Value # toEncodingList :: [MichelinePrimAp] -> Encoding # | |
FromJSON MichelinePrimAp Source # | |
Defined in Morley.Micheline.Expression parseJSON :: Value -> Parser MichelinePrimAp # parseJSONList :: Value -> Parser [MichelinePrimAp] # |
newtype MichelinePrimitive Source #
Instances
annotToText :: Annotation -> Text Source #
annotFromText :: MonadFail m => Text -> m Annotation Source #
genExpression :: forall m. (MonadGen m, GenBase m ~ Identity) => m Expression Source #
genExpressionSeq :: forall m. (MonadGen m, GenBase m ~ Identity) => m (Seq Expression) Source #
genMichelinePrimAp :: forall m. (MonadGen m, GenBase m ~ Identity) => m MichelinePrimAp Source #
genExprAnnotation :: forall m. (MonadGen m, GenBase m ~ Identity) => m Annotation Source #