Skip to main content Svelte Highlight v7.21.1

Dhall language preview

1. Typed config

let bindings, records, and builtin types
horizon-dark
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }
atom-one-dark
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }
github-dark
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }
dracula
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }
nord
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }
github
let Port : Type = Natural

let Server =
  { host : Text, port : Port, tls : Bool }

let defaults : Server =
  { host = "localhost", port = 8080, tls = False }

in  defaults // { tls = True }

2. Functions and lists

lambdas, List/map, and string interpolation
horizon-dark
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts
atom-one-dark
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts
github-dark
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts
dracula
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts
nord
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts
github
let makeUrl =
  \(host : Text) -> \(port : Natural) -> "https://${host}:${Natural/show port}"

let hosts = [ "a.example.com", "b.example.com" ]

in  List/map Text Text (\(h : Text) -> makeUrl h 443) hosts