Open
Description
Suppose that I have a union type in Dhall : let MBText = < Noth | Smth Text>
To decode it, I use:
data MBText = Smth Text | Noth ()
mbtextDecoder = union (
(Smth <$> constructor "Smth" strictText)
<> (Noth <$> constructor "Noth" unit)
)
First reading of the documentation I got confused into thinking that the appropriate Dhall code would be:
let MBText = < Noth {} | Smth Text>
while in fact it is <Noth | Smth Text>
Is it true that the existing documentation is not sufficiently clear, or is it my fault ?
Merry Christmas, and thank you for this beautiful work !
Metadata
Assignees
Labels
No labels