lib: add showWarnings

This commit is contained in:
Jan Malakhovski
2019-03-08 11:19:18 +02:00
committed by danbst
parent e84cf5edad
commit 570aed4b46
3 changed files with 4 additions and 5 deletions
+2 -1
View File
@@ -259,9 +259,10 @@ rec {
# TODO: figure out a clever way to integrate location information from
# something like __unsafeGetAttrPos.
warn = msg: builtins.trace "WARNING: ${msg}";
warn = msg: builtins.trace "warning: ${msg}";
info = msg: builtins.trace "INFO: ${msg}";
showWarnings = warnings: res: lib.fold (w: x: warn w x) res warnings;
## Function annotations