feat: add Console.readLine and Console.readInt, guessing game project

Add readLine and readInt operations to the Console effect for interactive
input. Create a number guessing game project demonstrating ADTs, pattern
matching, effects, and game state management.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 17:58:00 -05:00
parent 44f88afcf8
commit 719bc77243
3 changed files with 231 additions and 1 deletions

View File

@@ -780,6 +780,16 @@ impl TypeEnv {
params: Vec::new(),
return_type: Type::String,
},
EffectOpDef {
name: "readLine".to_string(),
params: Vec::new(),
return_type: Type::String,
},
EffectOpDef {
name: "readInt".to_string(),
params: Vec::new(),
return_type: Type::Int,
},
],
},
);