Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Compiler_Typed_Sema.H File Reference

Typed semantic pass connecting the AST, the name pass, and type constraints. More...

#include <sstream>
#include <string>
#include <Compiler_Sema.H>
#include <Compiler_Types.H>
#include <tpl_constraints.H>
#include <tpl_scope.H>
Include dependency graph for Compiler_Typed_Sema.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Aleph::Compiler_Expr_Type_Assignment
 Recorded inferred type for one expression node. More...
 
struct  Aleph::Compiler_Function_Type_Assignment
 Recorded inferred type for one function declaration. More...
 
struct  Aleph::Compiler_Let_Type_Assignment
 Recorded inferred type for one let binding. More...
 
struct  Aleph::Compiler_Param_Type_Assignment
 Recorded inferred type for one function parameter. More...
 
struct  Aleph::Compiler_Typed_Semantic_Options
 Options controlling the typed semantic pass. More...
 
class  Aleph::Compiler_Typed_Semantic_Analyzer
 Inference-oriented semantic pass for the MVP compiler front-end. More...
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Type_Scheme
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Value_Binding
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Type_Name_Binding
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Function_Annotation_Type_Variable
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Active_Binding
 
struct  Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Module_Type_Binding
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Detailed Description

Typed semantic pass connecting the AST, the name pass, and type constraints.

Compiler_Typed_Semantic_Analyzer performs a small inference-oriented pass over the MVP AST. It uses Compiler_Sema.H as an optional precheck and generates constraints over Compiler_Types.H with the unifier from tpl_constraints.H.

The current typed pass covers:

  • literal typing
  • lexical binding of inferred local and global types
  • explicit type annotations for parameters, let bindings, and returns
  • nominal type declarations for struct, enum, and transparent aliases
  • basic polymorphic schemes for explicitly generic declarations and generalized let
  • operator typing for arithmetic, comparison, logical, and assignment-like operators
  • boolean conditions for if and while
  • call constraints of the form callee ~ fn(args...) -> result
  • return-value constraints against the inferred function result type

This is still intentionally modest: it does not yet solve traits, overloads, advanced module-level typing, or nominal value operations such as field access and enum construction.

Definition in file Compiler_Typed_Sema.H.