Measures Concepts
GitHub icon

Dhall

Dhall - Data notation

< >

Dhall is a data notation created in 2017.

Source code:
git clone https://github.com/dhall-lang/dhall-lang
#287on PLDB 7Years Old 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 Token Example
Comments ✓
-- A comment
Line Comments ✓ --
-- A comment
Semantic Indentation X

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout