我可以在SMLNJ中展开typedef吗?

我可以在SMLNJ中展开typedef吗?,sml,smlnj,ml,Sml,Smlnj,Ml,所以我用标准ML编写了一些代码,并试图用smlnj编译它。我得到了以下错误: Error: operator and operand don't agree [tycon mismatch] operator domain: unit -> Absyn.fundec operand: unit -> (pos * pos) * ((string * int) * (string

所以我用标准ML编写了一些代码,并试图用smlnj编译它。我得到了以下错误:

Error: operator and operand don't agree [tycon mismatch]
  operator domain: unit -> Absyn.fundec
  operand:         unit
                   -> (pos * pos) * 
                      ((string * int) * (string * int) * Absyn.tp * Absyn.tp
                       * Absyn.exp)
现在,根据我对类型的粗略检查,这看起来应该是一个类型匹配。我不打算告诉你们,因为我想要的是一个通用的解决方案,而不是代码中的bug

是否可以将这两种类型都扩展到基本数据类型中,以便找出它们的区别?所有这些typedef都在四处游荡,这让人感到困惑,在.sml文件中挖掘所有定义并将扩展写在纸上似乎是一个乏味的解决方案

我想说的是:

typeof Absyn.fundec

并找出哪种类型的表达式可能会生成有效的fundec。

因为Absyn.fundec不是int、bool等标准类型。必须有一个数据类型或类型声明,可以准确地告诉您Absyn.fundec类型是如何定义的