From 62c9c126ed3eedf981cc087938fd98f7afb17506 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 20 Jul 2017 20:40:38 +0000 Subject: Check the type of the main function (should be Void) --- Sil/Check.dcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Sil/Check.dcl') diff --git a/Sil/Check.dcl b/Sil/Check.dcl index e71448f..a34eb99 100644 --- a/Sil/Check.dcl +++ b/Sil/Check.dcl @@ -5,13 +5,15 @@ from StdOverloaded import class toString from Data.Maybe import :: Maybe from Sil.Syntax import :: Program, :: Name +from Sil.Types import :: Type :: CheckError = NoMainFunction + | MainFunctionInvalidType Type | DuplicateFunctionName Name | DuplicateLocalName Name Name - | ReturnExpressionFromVoidError Name - | NoReturnFromNonVoidError Name + | ReturnExpressionFromVoid Name + | NoReturnFromNonVoid Name | LocalVoid Name Name instance toString CheckError -- cgit v1.2.3