我想生成表示一个AST的JSON对象,并且我正在研究ppx_deriving_yojson (更具体地说是to_yojson部分)来实现这一点。现在,当我想求助于定制编码时,当然有一些特殊的情况。type bar = { test: int;[@@derivingto_yojson属性在这里似乎无法识别:
type foo = Bar | Bla of string [@to_yojson fun s -
c) deriving (Show, Eq) data Six a b c = Six (Fivea b c) (One a b c) deriving (Show, Eq)
data Seven a b c = Seven (Five a b c) (Two a b c) derivinga b c d e = Nine (One a b c) (One c d e) deriving (S