3
我想從一個非常簡單的Isabelle程序生成代碼。Isabelle - 代碼生成 - typedef
typedef point = "{p::(real*real). True}" by(auto)
definition xCoord :: "point ⇒ real" where "xCoord P ≡ fst(Rep_point P)"
export_code xCoord in Haskell module_name Example file code
,但得到的錯誤:
No code equations for Rep_point
反正我不明白。缺少什麼?
另一種解決方案是將點定義爲數據類型,例如, 'datatype point = Point「real×real」'。 –