【问题标题】:how to compile category code with ML compiler?如何使用 ML 编译器编译类别代码?
【发布时间】:2014-03-02 22:08:02
【问题描述】:

发现有很多ML编译器,不知道哪个编译器适合这些代码,也不知道怎么编译

发现haskell有适合category使用的operads包 可以翻译成haskell吗?

cs.man.ac.uk/~david/categories/programs/cat

使用ocaml编译时出错

# #use "C:/Documents and Settings/wilson/My Documents/Downloads/ML/cat.ml";;
File "C:/Documents and Settings/wilson/My Documents/Downloads/ML/cat.ml", line 20, characters 13-14:
Error: Syntax error: operator expected.
# #use "C:/Documents and Settings/wilson/My Documents/Downloads/ML/functorcat.ml";;
File "C:/Documents and Settings/wilson/My Documents/Downloads/ML/functorcat.ml", line 12, characters 13-14:
Error: Syntax error: operator expected.
# #use "C:/Documents and Settings/wilson/My Documents/Downloads/ML/basic.ml";;
File "C:/Documents and Settings/wilson/My Documents/Downloads/ML/basic.ml", line 7, characters 15-16:
Error: Syntax error

【问题讨论】:

  • 也许你应该包含一些代码。您发布的链接似乎无效。
  • 代码可以在链接中下载,如果不可用,网络存档有它。太多的代码。哪个 ML 家族可以编译它?

标签: haskell ocaml ml


【解决方案1】:

你发的链接不正确,文件实际上可以找到here

它在标题中说明它是正确的语言

(*                COMPUTATIONAL CATEGORY THEORY
                           Oct. 1987
               Programming Language: Standard ML    *)

因此,您需要一个标准 ML (SML) 编译器。可能您需要一个与 25 年前编写的代码兼容的代码 - 关于现代 SML 编译器是否能够编译此代码,您的猜测与我一样好。

【讨论】:

    猜你喜欢
    • 2018-07-08
    • 1970-01-01
    • 2022-08-13
    • 2014-01-10
    • 1970-01-01
    • 2016-02-14
    • 2016-04-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多