Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to dhall 1.26.1 and merge types and terms #54

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dhall-1.21.0.nix → dhall-1.26.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ let
'';
};
in
mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77"
mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"
6 changes: 6 additions & 0 deletions dhall/Addon.dhall
Original file line number Diff line number Diff line change
@@ -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 }
62 changes: 37 additions & 25 deletions dhall/Config.dhall
Original file line number Diff line number Diff line change
@@ -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 }
1 change: 0 additions & 1 deletion dhall/addon/Addon.dhall

This file was deleted.

3 changes: 0 additions & 3 deletions dhall/addon/Postgresql.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/addon/functions.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/functions.dhall

This file was deleted.

33 changes: 0 additions & 33 deletions dhall/mkConfig.dhall

This file was deleted.

1 change: 1 addition & 0 deletions dhall/package.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Addon = ./Addon.dhall, Config = ./Config.dhall, Vault = ./Vault.dhall }
1 change: 0 additions & 1 deletion dhall/types.dhall

This file was deleted.