From d8c5e33f6015e3f17aaf5fd290b1834e6e6c1049 Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Thu, 13 Aug 2020 16:01:49 +0200 Subject: dhall: BREAKING CHANGE update dhall config for 1.33+ compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since dhall 1.33.0 lang version the `Optional/fold` function is removed from the language and can be replaced by the usage of the `merge` function which now works on Optional values 🎉 since 1.29 https://github.com/dhall-lang/dhall-haskell/pull/1608 This new code is thus not compatible with versions of dhall <1.29.0 (due to the new feature of the `merge` fonction). --- dhall/server/service/plugin/correlationId.dhall | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'dhall') diff --git a/dhall/server/service/plugin/correlationId.dhall b/dhall/server/service/plugin/correlationId.dhall index d5d5928..41c5720 100644 --- a/dhall/server/service/plugin/correlationId.dhall +++ b/dhall/server/service/plugin/correlationId.dhall @@ -2,22 +2,16 @@ let Plugin = ./Plugin.dhall let config = ./Config.dhall -in λ(generator : Optional Text) - → { name = - "correlation-id" +in λ(generator : Optional Text) → + { name = "correlation-id" , config = config.CorrelationId - { header_name = - "X-correl" - , echo_downstream = - True - , generator = - Optional/fold - Text - generator - Text - (λ(t : Text) → t) - "uuid#counter" - } + { header_name = "X-correl" + , echo_downstream = True + , generator = + merge + { None = "uuid#counter", Some = λ(x : Text) → x } + generator + } } : Plugin -- cgit v1.2.3