summaryrefslogtreecommitdiff
path: root/utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/src/main.rs b/utils/src/main.rs
index 4428ac3..ea267d8 100644
--- a/utils/src/main.rs
+++ b/utils/src/main.rs
@@ -64,13 +64,17 @@ fn main () {
// imported: just wrap our input code into a dhall "let"-statement.
// Probably doesn't scale very vell, though ...
let code = format!(
- "let Question = {} \nlet Answers = {} \nlet Lang = {}\nin {}",
+ "let Question = {} \nlet Lang = {}\nin {}",
Question::static_type(),
- AnswerSpace::static_type(),
Lang::static_type(),
config_file
);
match serde_dhall::from_str(&code)
+ .substitute_names(vec![
+ ("Question".to_string(),Question::static_type()),
+ ("Answers".to_string(), AnswerSpace::static_type()),
+ ("Lang".to_string(), Lang::static_type())
+ ].iter().cloned().collect())
.static_type_annotation()
.parse::<Survey>()
{