Commit graph

2 commits

Author SHA1 Message Date
Leonardo de Moura
df9ce10623 feat(library/compiler): special support for initialization functions of the form def initFn : IO Unit
We can now write
```
@[init] def initFn : IO Unit := ...
```
instead of
```
def initFn : IO Unit := ...
@[init initFn] constant execInitFn : Unit := ()
```
2019-03-23 08:46:38 -07:00
Leonardo de Moura
412d0ea578 feat(library/init/lean/options): add setOptionFromString
We can use this primitive to process command line arguments of the form
`-D <key> = <value>`

TODO: allow users to attach `[init]` to definitions of the form
```
@[init] def foo : IO Unit := ...
```
and avoid the awkward auxiliary constant.
2019-03-22 17:26:43 -07:00