moved some funcs to aux, added a universal definition of int and char, updated usages in both tcs

This commit is contained in:
sebastianselander 2023-03-30 11:38:06 +02:00
parent 59676605cd
commit c4477d3df4
3 changed files with 25 additions and 23 deletions

View file

@ -6,7 +6,7 @@
module TypeChecker.TypeCheckerBidir (typecheck, getVars) where
import Auxiliary (maybeToRightM, snoc)
import Auxiliary (maybeToRightM, snoc, int, char)
import Control.Applicative (Alternative, Applicative (liftA2),
(<|>))
import Control.Monad.Except (ExceptT, MonadError (throwError),
@ -484,7 +484,7 @@ infer = \case
-- Γ ⊢ e₁ + e₂ ↓ Int ⊣ Δ
EAdd e1 e2 -> do
cxt <- get
let t = TLit "Int"
let t = int
e1' <- check e1 t
put cxt
e2' <- check e2 t