Top 1,000 Features Creators Events Podcasts Extensions Interviews Blog Explorer CSV

Dhall

< >

Dhall is a data notation created in 2017.

#133on PLDB 7Years Old 817Repos
Download source code:
git clone https://github.com/dhall-lang/dhall-lang
Homepage · REPL · Source Code · Twitter

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 X

View source

- Build the next great programming language · About · Resources · Acknowledgements · Part of the World Wide Scroll