Commit graph

9 commits

Author SHA1 Message Date
Leonardo de Moura
5b08bf18c5 feat(library/init/lean): improving options
@kha It will be awesome to automate the following idiom with a macro :)
```
def defIndent  := 4
def getIndent (o : Options) : Nat   := o.get `format.indent defIndent
@[init] def indentOption : IO Unit :=
registerOption `format.indent { defValue := defIndent, group := "format", descr := "indentation" }
```
2019-03-24 09:30:20 -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
Leonardo de Moura
1c671965c5 feat(library/init/lean/options): add registerOption 2019-03-22 17:26:43 -07:00
Leonardo de Moura
dc73d5443d refactor(library/init/lean): add MData abbreviation 2019-03-22 17:26:43 -07:00
Leonardo de Moura
04e20623e6 chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47 chore(*): renaming files 2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43 chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
Leonardo de Moura
a49de9ccd3 feat(library/init/lean): add kvmap
We use it to implement `expr.mdata` and `options`
2018-06-15 16:05:11 -07:00
Sebastian Ullrich
3796c73b85 feat(library/init/lean/options): add lean.options 2018-05-18 14:51:40 +02:00