Added haddock documentation

This commit is contained in:
macocianradu
2021-11-30 22:33:44 +01:00
parent 70baa17a4e
commit ff25395b68
18 changed files with 136 additions and 73 deletions

View File

@@ -6,6 +6,7 @@ import Semantic.ExpressionChecker
import Semantic.TypeChecker
import Data.Either
-- |Checks if all the inputs and the out of a function call have valid types, and then checks that the assign-output expression is valid
checkFunction :: ([Type], [Symbol]) -> Function -> Either [TypeCheckError] Function
checkFunction (definedTypes, definedFunctions) (MakeFunction name desc inp out ex)
| isRight checkedEx && isRight checkedOut && null (lefts checkedIn) = Right $ MakeFunction name desc (rights checkedIn) (fromRightUnsafe checkedOut) ex