glados-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

AST.Semantics.Type

Synopsis

Documentation

data Type Source #

Enumeration of all possible types in the language.

Instances

Instances details
Show Type Source # 
Instance details

Defined in AST.Semantics.Type

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Eq Type Source # 
Instance details

Defined in AST.Semantics.Type

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

data StructDef Source #

Definition of a structure (Name + Field Map).

Constructors

StructDef 

Instances

Instances details
Show StructDef Source # 
Instance details

Defined in AST.Semantics.Type

data CheckEnv Source #

Verification Environment.

Constructors

CheckEnv 

Instances

Instances details
Show CheckEnv Source # 
Instance details

Defined in AST.Semantics.Type

emptyEnv :: CheckEnv Source #

Initial empty environment.

parseType :: Text -> Type Source #

Parses a raw type string (from Parser) into a Semantic Type.

typeToString :: Type -> String Source #

Helper to convert a Semantic Type back to a readable String.

areTypesCompatible :: Type -> Type -> Bool Source #

Checks if two types are semantically compatible. Replaces usage of (==) with explicit pattern matching.