I built a compiler for a controlled English-like mathematical language in Haskell — looking for compiler design feedback An independent developer has released HumMac, a prototype compiler written in Haskell (GHC 9.10.3, Cabal) that translates a controlled, English-like mathematical language into a Structured Mathematical IR (SMIR), and is seeking compiler-design feedback on the project's GitHub repository. HumMac currently supports arithmetic expressions, implicit multiplication, bounded repetition, conditionals and six comparison operators, and its pipeline includes a parser building an abstract syntax tree, a symbol table with explicit identifiers, SMIR generation, expression and proposition inference, numeric type promotion, semantic validation, definite-initialization analysis across conditional branches, and termination-analysis infrastructure. The project distinguishes free mathematical symbols, which may remain unassigned, from runtime variables subject to definite-initialization analysis; a complete SMIR execution engine is not yet available. I’ve been developing HumMac , a compiler for a controlled, English-like mathematical language, using Haskell. the final idea is to build towards a human-to-machine language compiler The project explores how a human-readable mathematical language can be given precise semantics and translated into a structured intermediate representation. The compiler is organized around several components: - A parser that constructs a structured abstract syntax tree - A symbol table with explicit symbol identifiers - Conversion from the source representation into Structured Mathematical IR SMIR - Expression and proposition inference - Numeric type promotion and semantic validation - Definite-initialization analysis, including conditional branches - Termination-analysis infrastructure HumMac currently supports arithmetic expressions, implicit multiplication, bounded repetition, conditionals and six comparison operators. The compiler successfully parses this program, generates SMIR, constructs its symbol table and infers the types of its variables. Since it is currently a compiler rather than an execution environment, variables do not necessarily need to be initialized before they can be introduced or referenced. In particular, the language distinguishes free mathematical symbols, which can remain unassigned, from runtime variables, for which definite-initialization analysis is performed. This distinction allows mathematical expressions to contain symbolic variables without treating them as uninitialized runtime values. One design distinction was separating free mathematical symbols from runtime variables. An unassigned mathematical symbol can represent a free variable in an expression, whereas a runtime variable may require definite-initialization analysis. The project is still a prototype. SMIR generation and analysis are implemented, but a complete SMIR execution engine is not yet available. Implementation: Haskell GHC 9.10.3, Cabal Repository: GitHub - RupsaMC/HumMac: A termination-verified controlled natural-language compiler implemented in Haskell. · GitHub https://github.com/RupsaMC/HumMac I’d be glad to hear thoughts from the Haskell community, particularly on: - The organization of compiler passes and intermediate representations - Representing mathematical expressions and proposition in Haskell - Semantic analysis and type inference architecture - Approaches to making the implementation easier to extend as the language grows This is my independent project and I’m sharing it in the hope of receiving useful technical feedback. Why Haskell? I chose Haskell partly because of my interest in the relationship between convergence and divergence in lambda calculus, and the way these ideas connect to the behaviour and evaluation of computational expressions. Haskell’s functional and strongly typed approach made it an interesting language in which to explore these ideas while building HumMac’s parser, intermediate representation and semantic analysis pipeline.