Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Module that provides type classes for converting to and from low-level Micheline representation.
Synopsis
- class ToExpression a where
- toExpression :: a -> Expression
- data FromExpError x = FromExpError (Exp x) Text
- type FromExpressionError = FromExpError RegularExp
- class FromExp x a where
- fromExp :: Exp x -> Either (FromExpError x) a
- type FromExpression = FromExp RegularExp
- fromExpression :: FromExp RegularExp a => Expression -> Either FromExpressionError a
Documentation
class ToExpression a where Source #
Type class that provides an ability to convert something to Micheline Expression.
toExpression :: a -> Expression Source #
Instances
data FromExpError x Source #
Errors that can happen when we convert an Exp
to our
data type.
FromExpError (Exp x) Text |
Instances
Exception FromExpressionError Source # | |
Defined in Morley.Micheline.Class | |
Buildable FromExpressionError Source # | |
Defined in Morley.Micheline.Class build :: FromExpressionError -> Builder # | |
Show (Exp x) => Show (FromExpError x) Source # | |
Defined in Morley.Micheline.Class showsPrec :: Int -> FromExpError x -> ShowS # show :: FromExpError x -> String # showList :: [FromExpError x] -> ShowS # | |
Eq (Exp x) => Eq (FromExpError x) Source # | |
Defined in Morley.Micheline.Class (==) :: FromExpError x -> FromExpError x -> Bool # (/=) :: FromExpError x -> FromExpError x -> Bool # |
type FromExpressionError = FromExpError RegularExp Source #
Error in case of vanilla expression.
class FromExp x a where Source #
Type class that provides the ability to convert something from a Micheline Expression.
Instances
FromExp RegularExp ExpandedOp Source # | |
Defined in Morley.Micheline.Class | |
FromExp x ViewName Source # | |
Defined in Morley.Micheline.Class | |
FromExp x T Source # | |
Defined in Morley.Micheline.Class | |
FromExp x T Source # | |
Defined in Morley.Micheline.Class | |
FromExp x Ty Source # | |
Defined in Morley.Micheline.Class | |
(FromExp x Value, SingI t) => FromExp x (Value t) Source # | |
Defined in Morley.Micheline.Class | |
FromExp x op => FromExp x (Contract' op) Source # | |
Defined in Morley.Micheline.Class | |
FromExp x op => FromExp x (InstrAbstract op) Source # | |
Defined in Morley.Micheline.Class fromExp :: Exp x -> Either (FromExpError x) (InstrAbstract op) Source # | |
FromExp x op => FromExp x (Value' op) Source # | |
Defined in Morley.Micheline.Class | |
FromExp x a => FromExp x [a] Source # | |
Defined in Morley.Micheline.Class | |
(SingI inp, SingI out) => FromExp RegularExp (Instr '[inp] '[out]) Source # | |
Defined in Morley.Micheline.Class fromExp :: Exp RegularExp -> Either (FromExpError RegularExp) (Instr '[inp] '[out]) Source # |
type FromExpression = FromExp RegularExp Source #
fromExpression :: FromExp RegularExp a => Expression -> Either FromExpressionError a Source #
Parse vanilla expression to something.