Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2021-05-08 | inject_types -> with_builtin_typessubstitutions | stuebinm | 1 | -3/+3 | |
at request of Nadrieril. | |||||
2021-05-02 | substitute_names -> inject_types | stuebinm | 1 | -7/+30 | |
This does three things: 1. rename the substitute_names function into inject_types, and makes it accept anything that implements IntoIterator instead of just HashMaps 2. adds an extra function to inject just a single type 3. makes these functions chainable; before, each call to substitute_names would discard previous invocations. However, this currently comes at the cost of a lot of ugly copying. also, more tests! | |||||
2021-05-01 | remove forgotten println | stuebinm | 1 | -1/+0 | |
2021-04-10 | substitutions: add documentation | stuebinm | 1 | -0/+37 | |
2021-04-10 | add type substitutions to serde_dhall | stuebinm | 1 | -2/+28 | |
this adds subsititutions, which work similar to the `Dhall.substitutions` mechanism of the Haskell dhall package, and which can be used e.g. like this: ```rust serde_dhall.from_str(...) .substitute_names(hashmap!["Newtype" => static_type]) .parse::<SimpleType>()? ``` The idea behind this is to make it easy to add programmer-defined types which may be used in configs for programs, without forcing the program's users to re-import the same type definitions each time (or the programmers to keep the dhall-based definitions in sync with their rust types, since these are now generated automatically). Caveats so far: - makes some of the code ugly (dhall internals are now used in serde_dhall/src/lib.rs, for example) - haven't tested error messages so far - some unecessary copying of strings and static type values | |||||
2020-12-18 | chore: convert doc links to intra-doc links | Nadrieril | 2 | -48/+36 | |
2020-12-07 | Unify `skip_resolve_expr` with normal resolution | Nadrieril | 1 | -1/+1 | |
2020-12-07 | Thread cx everywhere else imports are read | Nadrieril | 1 | -0/+1 | |
2020-12-07 | Thread cx through normalization | Nadrieril | 1 | -19/+21 | |
2020-12-07 | Don't store internal structures of `dhall` in `serde_dhall` | Nadrieril | 1 | -4/+7 | |
2020-11-20 | Expose binary parsing in the API | Nadrieril | 1 | -0/+41 | |
2020-10-28 | Fix clippy and formatting | Nadrieril | 1 | -1/+1 | |
2020-10-28 | Add missing documentation | Nadrieril | 1 | -0/+184 | |
2020-10-28 | Make type annotation optional to allow serializing SimpleValue | Nadrieril | 3 | -55/+49 | |
2020-10-28 | Implement serialization | Nadrieril | 3 | -0/+441 | |