PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Dhall

Dhall

Dhall is a data notation created in 2017.

#291on PLDB 5Years Old 4.1kUsers
0Books 0Papers 817Repos

Try now: Web · Riju

Maintainable configuration files


Example from the web:
-- ./company.dhall let Prelude = https://prelude.dhall-lang.org/v19.0.0/package.dhall sha256:eb693342eb769f782174157eba9b5924cf8ac6793897fc36a31ccbd6f56dafe2 let companyName = "Example Dot Com" let User = { name : Text, account : Text, age : Natural } let users : List User = [ { name = "John Doe", account = "john", age = 23 } , { name = "Jane Smith", account = "jane", age = 29 } , { name = "William Allen", account = "bill", age = 41 } ] let toEmail = \(user : User) -> "${user.account}@example.com" let Bio = { name : Text, age : Natural } let toBio = \(user : User) -> user.(Bio) let companySize = Prelude.List.length User users let greetingPage = '' <html> <title>Welcome to ${companyName}!</title> <body> <p>Welcome to our humble company of ${Natural/show companySize} people!</p> </body> </html> '' in { emails = Prelude.List.map User Text toEmail users , bios = Prelude.List.map User Bio toBio users , greetingPage = greetingPage }
Example from Riju:
{ output = "Hello, world!" }

Language features

Feature Supported Example Token
Comments
-- A comment
Line Comments
-- A comment
--
Semantic Indentation ϴ
xojo.html · dhall.html · perl-6.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com