module Network.Polkadot.Metadata.Type.Ast where
import Data.Text (Text)
type QSelf = (TypeAst, TypeAst)
type PathSegment = (Text, Maybe [TypeAst])
data TypeAst
= Slice !TypeAst
| Tuple ![TypeAst]
| Array !TypeAst !Int
| Path { TypeAst -> Maybe QSelf
qself :: !(Maybe QSelf)
, TypeAst -> [PathSegment]
segments :: ![PathSegment]
}
deriving (TypeAst -> TypeAst -> Bool
(TypeAst -> TypeAst -> Bool)
-> (TypeAst -> TypeAst -> Bool) -> Eq TypeAst
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TypeAst -> TypeAst -> Bool
== :: TypeAst -> TypeAst -> Bool
$c/= :: TypeAst -> TypeAst -> Bool
/= :: TypeAst -> TypeAst -> Bool
Eq, Eq TypeAst
Eq TypeAst =>
(TypeAst -> TypeAst -> Ordering)
-> (TypeAst -> TypeAst -> Bool)
-> (TypeAst -> TypeAst -> Bool)
-> (TypeAst -> TypeAst -> Bool)
-> (TypeAst -> TypeAst -> Bool)
-> (TypeAst -> TypeAst -> TypeAst)
-> (TypeAst -> TypeAst -> TypeAst)
-> Ord TypeAst
TypeAst -> TypeAst -> Bool
TypeAst -> TypeAst -> Ordering
TypeAst -> TypeAst -> TypeAst
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: TypeAst -> TypeAst -> Ordering
compare :: TypeAst -> TypeAst -> Ordering
$c< :: TypeAst -> TypeAst -> Bool
< :: TypeAst -> TypeAst -> Bool
$c<= :: TypeAst -> TypeAst -> Bool
<= :: TypeAst -> TypeAst -> Bool
$c> :: TypeAst -> TypeAst -> Bool
> :: TypeAst -> TypeAst -> Bool
$c>= :: TypeAst -> TypeAst -> Bool
>= :: TypeAst -> TypeAst -> Bool
$cmax :: TypeAst -> TypeAst -> TypeAst
max :: TypeAst -> TypeAst -> TypeAst
$cmin :: TypeAst -> TypeAst -> TypeAst
min :: TypeAst -> TypeAst -> TypeAst
Ord, ReadPrec [TypeAst]
ReadPrec TypeAst
Int -> ReadS TypeAst
ReadS [TypeAst]
(Int -> ReadS TypeAst)
-> ReadS [TypeAst]
-> ReadPrec TypeAst
-> ReadPrec [TypeAst]
-> Read TypeAst
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TypeAst
readsPrec :: Int -> ReadS TypeAst
$creadList :: ReadS [TypeAst]
readList :: ReadS [TypeAst]
$creadPrec :: ReadPrec TypeAst
readPrec :: ReadPrec TypeAst
$creadListPrec :: ReadPrec [TypeAst]
readListPrec :: ReadPrec [TypeAst]
Read, Int -> TypeAst -> ShowS
[TypeAst] -> ShowS
TypeAst -> String
(Int -> TypeAst -> ShowS)
-> (TypeAst -> String) -> ([TypeAst] -> ShowS) -> Show TypeAst
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TypeAst -> ShowS
showsPrec :: Int -> TypeAst -> ShowS
$cshow :: TypeAst -> String
show :: TypeAst -> String
$cshowList :: [TypeAst] -> ShowS
showList :: [TypeAst] -> ShowS
Show)