CakeML / CakeML/cakeml

Make ml_progLib run type inferencer on each call

Open
#647 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Standard ML
Stars
1.2k
Forks
104
Avg merge
2d 21h
Merged PRs (30d)
16

Description

It would be nice to have `process_topdecs` fail immediately when given type-incorrect code to parse. This would be particularly helpful when developing code in `basis`, but is not generally desirable in the bootstrap translation.

I suspect this feature could be implemented by adjusting `ml_progLib` to keep track of the type inferencer state produced by the declarations that have been accumulated this far.

There needs to be a way to turn this feature off, e.g. by making the the type inferencer state information optional: `NONE` means that type inferencer is not run.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating ml_progLib and its process_topdecs entry point, then read how accumulated declarations and type-inference state are represented. Determine how an optional inferencer state would be threaded through calls and how bootstrap translation remains unaffected. Done means type-incorrect input can fail immediately when enabled, while the feature can be disabled.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.