From dbf9c17d9f69e93b634d329d532b2c5983bd213f Mon Sep 17 00:00:00 2001 From: pca006132 Date: Sat, 10 Jul 2021 16:23:07 +0800 Subject: [PATCH] added assumption --- hm-inference/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hm-inference/README.md b/hm-inference/README.md index e2a6f46..62d675a 100644 --- a/hm-inference/README.md +++ b/hm-inference/README.md @@ -27,6 +27,9 @@ User can define functions/types by adding them to the prelude. Note that variables can be used before definition for now, we would do another pass after type checking to prevent this. The pass would also check for return. +We assume that class type do not contain any unbound type variables. (methods +can contain unbound type variables, if the variable is bound to the class) + ## TODO - Parse class/function definition. - Occur check to prevent infinite function types. @@ -45,4 +48,3 @@ pass after type checking to prevent this. The pass would also check for return. relationship, check whether the type variable can be instantiated to a certain type. -