module Analyzer.AnalyzedType where
import MaybeVoid (MaybeVoid)
data Type
=
TInt
|
TBool
|
TString
|
TArray Type Int
|
TFunction FunctionType
|
TNil
deriving (Int -> Type -> ShowS
[Type] -> ShowS
Type -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Type] -> ShowS
$cshowList :: [Type] -> ShowS
show :: Type -> String
$cshow :: Type -> String
showsPrec :: Int -> Type -> ShowS
$cshowsPrec :: Int -> Type -> ShowS
Show, Type -> Type -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Type -> Type -> Bool
$c/= :: Type -> Type -> Bool
== :: Type -> Type -> Bool
$c== :: Type -> Type -> Bool
Eq)
data FunctionType = FunctionType {FunctionType -> [Type]
parameters :: [Type], FunctionType -> MaybeVoid Type
returnType :: MaybeVoid Type}
deriving (Int -> FunctionType -> ShowS
[FunctionType] -> ShowS
FunctionType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionType] -> ShowS
$cshowList :: [FunctionType] -> ShowS
show :: FunctionType -> String
$cshow :: FunctionType -> String
showsPrec :: Int -> FunctionType -> ShowS
$cshowsPrec :: Int -> FunctionType -> ShowS
Show, FunctionType -> FunctionType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionType -> FunctionType -> Bool
$c/= :: FunctionType -> FunctionType -> Bool
== :: FunctionType -> FunctionType -> Bool
$c== :: FunctionType -> FunctionType -> Bool
Eq)