I’m currently writing a Dhall wrapper over KMonad configuration files, which is their own Lisp-ish format to configure itself.
KMonad, being a keyboard configuration app, uses what they call “blueprints” which essentially is a “picture” of your keyboard, but in plain text.
As an example, here’s the blueprint of my keyboard ( Kinesis Advantage 2):
(defsrc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt slck pause = 1 2 3 4 5 6 7 8 9 0 - tab q w e r t y u i o p \ caps a s d f g h j k l ; ' lsft z x c v b n m , . / rsft ` \ left rght up down lmet home end del bspc lctl lctl pgup ret spc lalt pgdn )
So my first move in order to convert this to Dhall was to use Lists of Lists to specify the blueprint. But the issue is that Dhall Format will automatically convert
defsrc [ [esc, f1, f2, f3, ...] , [eq, n1, n2, n3, ...] ]
defsrc [ [esc , f1 , f2 , f3 , ... ] , [eq , n1 , n2 , n3 , ... ] ]
Which already defies the point of the blueprint, and makes it very confusing.
Perhaps there’s a way to make a workaround for this issue that I’m not seeing? Use records, define some functions in some kind of way?
I don’t know, any ideas on how to approach this?
Ideally, I would like to avoid telling users to “just disable Dhall Format” because it would be a huge disadvantage from my point of view.