Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YarinHeffes committed Dec 30, 2024
1 parent 60b697b commit f3d9a11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/typechecker/parse-type.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
(type partial-type-env env)
(values tc:ty))
(let ((alias (tc:lookup-type-alias (partial-type-env-env env) (tc:tycon-name type) :no-error t)))
(when alias
(if alias
;; Kind information is tracked with type aliases.
;; So, kind mismatch is caught earlier and we do not check for it here.
(if (zerop (length (tc:type-alias-entry-tyvars alias)))
Expand Down Expand Up @@ -66,7 +66,7 @@
;; Check if the foremost tapp-from is an alias.
(if (typep (first flattened-tapp) 'tc:tycon)
(let ((alias (tc:lookup-type-alias (partial-type-env-env env) (tc:tycon-name (first flattened-tapp)) :no-error t)))
(when alias
(if alias
(let ((var-count (length (tc:type-alias-entry-tyvars alias)))
(arg-count (length (rest flattened-tapp))))
;; Kind mismatches are caught earlier.
Expand Down Expand Up @@ -125,7 +125,7 @@
(make-partial-type-env :env env)
env)))

(when (typep env 'tc:environment)
(if (typep env 'tc:environment)
(loop :for tvar :in (parser:collect-type-variables parser-ty)
:for tvar-name := (parser:tyvar-name tvar)
:do (partial-type-env-add-var partial-env tvar-name)))
Expand Down

0 comments on commit f3d9a11

Please sign in to comment.