所以我有一个简单的数据结构,它有一些ByteString
s. 我想将这些序列化为 Dhall 文件。但是,我显然不能自动派生ToDhall
,因为没有ToDhall
. 我该怎么写?
data WordBounds = WordBounds { zipFile :: Prelude.FilePath
, start :: BS.ByteString
, end :: BS.ByteString
} deriving (Show, Generic, ToDhall)
我已经尝试过instance ToDhall BS.ByteString
了,我想我越来越近了,但我仍然不太明白 of 的语法instance
试图做什么,和/或如何让它与 Dhall 一起工作。