Rewrote using unification-fd. Heavily inspired (aka copied) from:
https://byorgey.wordpress.com/2021/09/08/implementing-hindley-milner-with-the-unification-fd-library/
This commit is contained in:
parent
f1b77a7efa
commit
eafe0fea0b
5 changed files with 314 additions and 21 deletions
|
|
@ -5,7 +5,8 @@ import Grammar.Par (myLexer, pProgram)
|
|||
import Grammar.Print (printTree)
|
||||
import System.Environment (getArgs)
|
||||
import System.Exit (exitFailure, exitSuccess)
|
||||
import TypeChecker.TypeChecker (typecheck)
|
||||
-- import TypeChecker.TypeChecker (typecheck)
|
||||
import TypeChecker.Unification (typecheck)
|
||||
import Renamer.Renamer (rename)
|
||||
import Grammar.Print (prt)
|
||||
|
||||
|
|
@ -43,4 +44,4 @@ main = getArgs >>= \case
|
|||
putStrLn ""
|
||||
putStrLn " ----- TYPECHECKER ----- "
|
||||
putStrLn ""
|
||||
putStrLn . printTree $ prg
|
||||
putStrLn . show $ prg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue