]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
Migrate to dhall 1.26.1 and merge types and terms polykinds 54/head v2.0-test-clementd
authorClement Delafargue <clement.delafargue@fretlink.com>
Wed, 2 Oct 2019 09:02:54 +0000 (11:02 +0200)
committerClement Delafargue <clement.delafargue@fretlink.com>
Wed, 2 Oct 2019 09:28:53 +0000 (11:28 +0200)
.travis.yml
dhall-1.26.1.nix [moved from dhall-1.21.0.nix with 87% similarity]
dhall/Addon.dhall [new file with mode: 0644]
dhall/Config.dhall
dhall/addon/Addon.dhall [deleted file]
dhall/addon/Postgresql.dhall [deleted file]
dhall/addon/functions.dhall [deleted file]
dhall/functions.dhall [deleted file]
dhall/mkConfig.dhall [deleted file]
dhall/package.dhall [new file with mode: 0644]
dhall/types.dhall [deleted file]

index 30043696499cb62c56a15f36a4af741ace1fe05f..4f5d09c4f15a36f43af56e2f0d5cd26f001e35e8 100644 (file)
@@ -5,7 +5,7 @@ sudo: false
 
 install:
   - nix-env -i python2.7-ansible python2.7-ansible-lint ShellCheck-0.7.0
-  - nix-env -if ./dhall-1.21.0.nix
+  - nix-env -if ./dhall-1.26.1.nix
 
   # Check ansible version
   - ansible --version
similarity index 87%
rename from dhall-1.21.0.nix
rename to dhall-1.26.1.nix
index e53369bd7cc7a30d5e070d879f45d076b65a3f0a..918a528a197ee1942ea3490c9ad3fdac850b0d74 100644 (file)
@@ -19,4 +19,4 @@ let
         '';
       };
 in
-  mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77"
+  mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"
diff --git a/dhall/Addon.dhall b/dhall/Addon.dhall
new file mode 100644 (file)
index 0000000..76d2c80
--- /dev/null
@@ -0,0 +1,6 @@
+let Addon = < Postgresql : { name : Text, env_prefix : Text } >
+
+let postgresql =
+      Addon.Postgresql { name = "pg", env_prefix = "POSTGRESQL_ADDON" }
+
+in  { Type = Addon, postgresql = postgresql }
index 5b7eab2c4b3ee02e0b79e1a44bec5ba86b64fc8b..1b9388ec80597e933c74605c875e1fd70bcd9200 100644 (file)
@@ -1,26 +1,38 @@
-let Addon = ./addon/Addon.dhall
+let Addon = (./Addon.dhall).Type
 
-in    λ(Environment : Type)
-    → { clever_app :
-          Text
-      , clever_orga :
-          Text
-      , clever_secret :
-          Text
-      , clever_token :
-          Text
-      , clever_syslog_server :
-          Optional Text
-      , clever_domain :
-          Optional Text
-      , clever_app_tasks_file :
-          Optional Text
-      , clever_haskell_entry_point :
-          Optional Text
-      , clever_disable_metrics :
-          Bool
-      , clever_addons :
-          List Addon
-      , clever_env :
-          Environment
-      }
+let Vault = ./Vault.dhall
+
+let Config =
+        λ(Environment : Type)
+      → { clever_app : Text
+        , clever_orga : Text
+        , clever_secret : Text
+        , clever_token : Text
+        , clever_syslog_server : Optional Text
+        , clever_domain : Optional Text
+        , clever_app_tasks_file : Optional Text
+        , clever_haskell_entry_point : Optional Text
+        , clever_disable_metrics : Bool
+        , clever_addons : List Addon
+        , clever_env : Environment
+        }
+
+let mkConfig =
+        λ(vault : Vault)
+      → λ(app : Text)
+      → λ(organization : Text)
+      →   { clever_app = app
+          , clever_orga = organization
+          , clever_secret = vault.secret
+          , clever_token = vault.token
+          , clever_syslog_server = None Text
+          , clever_domain = None Text
+          , clever_app_tasks_file = None Text
+          , clever_haskell_entry_point = None Text
+          , clever_disable_metrics = False
+          , clever_addons = [] : List Addon
+          , clever_env = {=}
+          }
+        : Config {}
+
+in  { Type = Config, mkConfig = mkConfig }
diff --git a/dhall/addon/Addon.dhall b/dhall/addon/Addon.dhall
deleted file mode 100644 (file)
index 2eb781c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-< Postgresql : { name : Text, env_prefix : Text } >
diff --git a/dhall/addon/Postgresql.dhall b/dhall/addon/Postgresql.dhall
deleted file mode 100644 (file)
index ed6b411..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-let addon = ./Addon.dhall
-
-in  addon.Postgresql { name = "pg", env_prefix = "POSTGRESQL_ADDON" }
diff --git a/dhall/addon/functions.dhall b/dhall/addon/functions.dhall
deleted file mode 100644 (file)
index 65979ac..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{ Postgresql = ./Postgresql.dhall }
diff --git a/dhall/functions.dhall b/dhall/functions.dhall
deleted file mode 100644 (file)
index f047c19..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{ Addon = ./addon/functions.dhall, mkConfig = ./mkConfig.dhall }
diff --git a/dhall/mkConfig.dhall b/dhall/mkConfig.dhall
deleted file mode 100644 (file)
index d2ec034..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-let Config = ./Config.dhall
-
-let Vault = ./Vault.dhall
-
-let Addon = ./addon/Addon.dhall
-
-in    λ(vault : Vault)
-    → λ(app : Text)
-    → λ(organization : Text)
-    →   { clever_app =
-            app
-        , clever_orga =
-            organization
-        , clever_secret =
-            vault.secret
-        , clever_token =
-            vault.token
-        , clever_syslog_server =
-            None Text
-        , clever_domain =
-            None Text
-        , clever_app_tasks_file =
-            None Text
-        , clever_haskell_entry_point =
-            None Text
-        , clever_disable_metrics =
-            False
-        , clever_addons =
-            [] : List Addon
-        , clever_env =
-            {=}
-        }
-      : Config {}
diff --git a/dhall/package.dhall b/dhall/package.dhall
new file mode 100644 (file)
index 0000000..c653ddb
--- /dev/null
@@ -0,0 +1 @@
+{ Addon = ./Addon.dhall, Config = ./Config.dhall, Vault = ./Vault.dhall }
diff --git a/dhall/types.dhall b/dhall/types.dhall
deleted file mode 100644 (file)
index ab153d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{ Vault = ./Vault.dhall, Addon = ./addon/Addon.dhall, Config = ./Config.dhall }