brandonspark / mulligan

A stepping debugger for Standard ML (SML)
MIT License
20 stars 3 forks source link

How to install mulligan on Mac ? #5

Open Prague2049 opened 8 months ago

Prague2049 commented 8 months ago

when I run make under terminal, I get some error: ➜ make mlton -mlb-path-var 'COMPAT mlton' -const 'Exn.keepHistory true' -default-ann 'allowOrPats true' -output mulligan src/top/sources.mlb Warning: src/util/sources.mlb 1.5-1.33. Unrecognized annotation: milletDiagnosticsIgnore all. Error: src/util/sources.mlb 2.3-2.23. File ../../cmlib/cmlib.mlb does not exist. Error: src/util/printf.sml 25.15-25.27. Undefined structure: Symbol. Error: src/util/printf.sml 26.16-26.28. Undefined structure: Symbol. Error: src/util/printf.sml 58.39-58.52. Undefined structure: Symbol. Error: src/util/printf.sml 63.56-63.69. Undefined structure: Symbol. Error: src/util/fresh_sym.sml 19.23-19.35. Undefined structure: Symbol. Error: src/util/fresh_sym.sml 35.9-35.24. Undefined structure: Symbol. Error: src/util/ids.sml 33.20-33.32. Undefined structure: Symbol. Error: src/util/ids.sml 51.19-51.32. Undefined structure: Symbol. Error: src/util/ids.sml 26.15-26.27. Undefined structure: Symbol. Error: src/util/ids.sml 22.3-31.5. Variable in structure disagrees with signature (type): new. structure: val new: _ -> _ * [?.<Symbol.symbol>] option defn at: src/util/ids.sml 38.9-38.11 signature: val new: _ -> _ * [?.<Symbol.symbol>] option spec at: src/util/ids.sml 26.9-26.11 Error: src/util/ids.sml 67.22-67.33. Undefined functor: RedBlackDict. Error: src/util/ids.sml 68.23-68.34. Undefined functor: RedBlackDict. Error: src/util/ids.sml 69.24-69.35. Undefined functor: RedBlackDict. Error: src/util/sources.mlb 47.13-47.20. Undefined structure: TyIdDict. Error: src/util/sources.mlb 48.13-48.21. Undefined structure: AbsIdDict. Error: src/util/sources.mlb 49.13-49.22. Undefined structure: ContIdDict. Error: src/directive_parser/lex/token.sml 21.18-21.30. Undefined structure: Symbol. Error: src/directive_parser/lex/token.sml 46.43-46.56. Undefined structure: Symbol. Error: src/directive_parser/lex/lexer.fun 4.28-4.37. Undefined signature: STREAMABLE. make: *** [mulligan] Error 1

brandonspark commented 8 months ago

mulligan depends on the submodule cmlib. This is the error I would expect if you hadn't pulled in the submodule properly.

Is your mulligan/cmlib folder empty? You can fix that by doing a git submodule update --init.

Prague2049 commented 8 months ago

Thanks! How to setup set breakpoints?
breakfn sets a breakpoint for when the function value bound to is invoked. what is the id? Could you give an example?

brandonspark commented 8 months ago

As in, the identifier corresponding to the function's name.

For instance, you may, in the following program:

fun f x = x
val x = 2

use step to step the program in mulligan to at the val x = 2 declaration, and then write breakfn f, which will place a breakpoint at the function value bound to f.