egison-5.0.0: Programming language with non-linear pattern-matching against non-free data
LicenseMIT
Safe HaskellNone
LanguageGHC2021

Language.Egison.EnvBuilder

Description

This module implements Phase 2: Environment Building Phase. It collects all declarations from TopExpr list before type inference and evaluation.

Environment Building Phase (Phase 2): 1. Data constructor definitions collection (from InductiveDecl) 2. Type class definitions collection (from ClassDeclExpr) 3. Instance definitions collection (from InstanceDeclExpr) 4. Type signature collection (from Define, DefineWithType)

This phase must be completed BEFORE type inference (Phase 5) begins, ensuring all necessary information is available for type checking.

Synopsis

Documentation

buildEnvironments :: [TopExpr] -> EvalM EnvBuildResult Source #

Build all environments from a list of top-level expressions. This function implements Phase 2 of the processing flow. It must be called AFTER expandLoads (Phase 1) and BEFORE type inference (Phase 5).

data EnvBuildResult Source #

Result of environment building phase

Constructors

EnvBuildResult 

Fields

Instances

Instances details
Show EnvBuildResult Source # 
Instance details

Defined in Language.Egison.EnvBuilder