about summary refs log tree commit diff
path: root/src/libexpr/value-to-json.cc
AgeCommit message (Collapse)AuthorFilesLines
2015-07-23 Optimize small listsEelco Dolstra1-3/+3
The value pointers of lists with 1 or 2 elements are now stored in the list value itself. In particular, this makes the "concatMap (x: if cond then [(f x)] else [])" idiom cheaper.
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-14/+14
2014-12-02 Make all ExternalValueBase functions constShea Levy1-1/+1
2014-12-02 Allow external code using libnixexpr to add typesShea Levy1-0/+11
Code that links to libnixexpr (e.g. plugins loaded with importNative, or nix-exec) may want to provide custom value types and operations on values of those types. For example, nix-exec is currently using sets where a custom IO value type would be more appropriate. This commit provides a generic hook for such types in the form of tExternal and the ExternalBase virtual class, which contains all functions necessary for libnixexpr's type-polymorphic functions (e.g. `showType`) to be implemented.
2014-09-30 Support control characters in JSON outputEelco Dolstra1-0/+3
2013-11-19 Refactor JSON outputEelco Dolstra1-13/+6
2013-11-19 Add a toJSON primopEelco Dolstra1-0/+93