Fun fact: you can write a Daml template in one line (though this is not very useful)

I was playing around a bit with the Daml template syntax.

Using Haskell’s alternative syntax for indentation, new line and do blocks, you can transform a Daml template like this.

The second version is written in one line. This is just interesting, because it makes your code totally unreadable.

4 Likes

Hi @gyorgybalazsi that is quite interesting.

While a One-Liner is an odd beast, if you wanted to write a Bash or Python-based Generator, that inputted the various variable values, into that string and made a valid Template, that’d be handy.

1 Like