tests/testthat/type_environment.R

context("TypeEnvironment")


test_that("", {
  tenv = TypeEnvironment$new(
    "z" = TypeVariable("t3"),
    "x" = TypeVariable("t1")
  )

  sub = Substitution(list(
    "t1" = TypeVariable("t2")
  ))

  applySubstitution(tenv, sub)
})

test_that("", {
  # Related unification problem.
  type1 = FunctionType(TypeVariable("t1"), TypeVariable("t3"))
  type2 = FunctionType(TypeVariable("t2"), TypeVariable("t2"))
})
nick-ulle/typesys documentation built on Jan. 21, 2020, 5:13 p.m.