Sunday, 15 September 2013

OCaml constructor error

OCaml constructor error

I am trying to create a function for object creation, and I am receiving a
very generic Error: Syntax error on the function. The class:
class dataframe csv_file =
object
val mutable csv = csv_file
end
The function to create the object:
let import_data dataframe_name filepath =
let dataframe_name = new dataframe (Csv.load file);;
note: (Csv.load file) returns the user defined type t : string list list
however I don't see this as being a problem since csv_file is polymorphic.

No comments:

Post a Comment