From 5d3af56735873069f14ad922ed318af5ae019ef7 Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Sun, 13 Aug 2023 20:41:17 -0700 Subject: [PATCH] Allowing wrapping math. --- src/type_infer.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/type_infer.rs b/src/type_infer.rs index 1af1384..a9ac1f5 100644 --- a/src/type_infer.rs +++ b/src/type_infer.rs @@ -1,4 +1,15 @@ -/// A type inference pass for NGR +//! A type inference pass for NGR +//! +//! The type checker implemented here is a relatively straightforward one, designed to be +//! fairly easy to understand rather than super fast. So don't be expecting the fastest +//! type checker in the West, here. +//! +//! The actual type checker operates in three phases. In the first phase, we translate +//! the syntax AST into something that's close to the final IR. During the process, we +//! generate a list of type constraints to solve. In the second phase, we try to solve +//! all the constraints we've generated. If that's successful, in the final phase, we +//! do the final conversion to the IR AST, filling in any type information we've learned +//! along the way. mod ast; mod convert; mod finalize;