Skip to content

Add debug option for flambda2#1252

Merged
Gbury merged 4 commits intooxcaml:mainfrom
Gbury:debug
Apr 3, 2023
Merged

Add debug option for flambda2#1252
Gbury merged 4 commits intooxcaml:mainfrom
Gbury:debug

Conversation

@Gbury
Copy link
Copy Markdown
Contributor

@Gbury Gbury commented Mar 23, 2023

This PR adds a debug option for flambda2. This option can be used either via a CLI flag -flamdba2-debug or via en env variable FLAMBDA2_DEBUG.

Currently, setting this to true only gives unique names to every continuation, which makes it a lot easier to follow what happens to which continuation.

Additionally, Simplify_import now defines the debug () function, that can be used in code to add debugging statements such as if debug () then Format.eprintf ...., which happens quite a lot in my experience.

@mshinwell mshinwell added the flambda2 Prerequisite for, or part of, flambda2 label Mar 24, 2023
@Gbury
Copy link
Copy Markdown
Contributor Author

Gbury commented Mar 29, 2023

@mshinwell comments have been addressed, this is ready for another review

@Gbury Gbury merged commit 8f37bf3 into oxcaml:main Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flambda2 Prerequisite for, or part of, flambda2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants