diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index 66b41a15840074063b7b683e521315886997d297..809772f7c084113c8ed4e5f49613ad996e461a2d 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -44,7 +44,7 @@ class JSONPlaceholder; typedef long NixInt; -typedef float NixFloat; +typedef double NixFloat; /* External values must descend from ExternalValueBase, so that * type-agnostic nix functions (e.g. showType) can be implemented diff --git a/src/libutil/json.cc b/src/libutil/json.cc index 813b257016e444e9c30f37a7d82cc38145747906..0a6fb65f0605739d0d5b3c2a53c45ba2fdb62f57 100644 --- a/src/libutil/json.cc +++ b/src/libutil/json.cc @@ -31,6 +31,7 @@ template<> void toJSON<unsigned long>(std::ostream & str, const unsigned long & template<> void toJSON<long long>(std::ostream & str, const long long & n) { str << n; } template<> void toJSON<unsigned long long>(std::ostream & str, const unsigned long long & n) { str << n; } template<> void toJSON<float>(std::ostream & str, const float & n) { str << n; } +template<> void toJSON<double>(std::ostream & str, const double & n) { str << n; } template<> void toJSON<std::string>(std::ostream & str, const std::string & s) {