Skip to content

LcicC/Simple-Calculus-in-Haskell-with-typechecker-and-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Calculus-in-Haskell-with-typechecker-and-parser

How to use

Load the Project1.hs file into ghci. My_Parser.hs is the Parser module and it must be contained in the same directory of Project1.hs

Functionalities:

  • Interpreter: starts an interactive interpreter. It will ask you to insert a term. (e.g. if iszero zero then succ zero else succ succ zero)
  • typeTestT: this function returns True if all the expressions you pass as an argument are well typed
  • typeTestF: this function returns True if all the expressions you pass as an argument contain type errors

Text Files

I provide three files that I used to test the functions

  • FalseTest: a list of expressions to use with typeTestF
  • TrueTest: a list of expressions to use with typeTestT
  • TestExp: expressions that must be parsed (calling Interpreter) and the values to obtain

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published