Question

find that there are many ML compilers which i do not know which compiler is suitable for these code, and do not know how to compile it

and find that haskell has operads package which is suitable for usage of category is it possible to translate to haskell?

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

when compile with ocaml, got error

# #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
Was it helpful?

Solution

The link you posted is incorrect, the file can actually be found here.

It says which language it is right in the header

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

So you need a Standard ML (SML) compiler. Probably you need one that's compatible with code written over 25 years ago - your guess is as good as mine as to whether a modern SML compiler will be able to compile this code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top