Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Type inference for macros #229

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Draft: Type inference for macros #229

wants to merge 2 commits into from

Commits on Oct 18, 2024

  1. Configuration menu
    Copy the full SHA
    7ae79a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Type inference of macros

    This commit implements a simple type-inference pass for macros,
    see HsBindgen.C.Tc.Macro. It implements a type system with:
    
      - variables
      - function types
      - type constructors
      - quantified types
    
    Type inference for a macro function definition proceeds in the
    following stages:
    
      1. constraint generation following Algorithm W, creating new
         metavariables and carrying a substitution,
      2. constraint solving: constraint simplification and defaulting
      3. quantification over remaining (undefaulted) type variables
         and remaining (unsolved) constraints.
    sheaf committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    ee9df71 View commit details
    Browse the repository at this point in the history