'a和之间有什么区别'_l?
我正在看这个错误,无法理解它:
Error: This expression has type ('a -> float polynomial) list but an expression was expected of type float polynomial list derivlist: ('_l ? float polynomial) list
Run Code Online (Sandbox Code Playgroud) module <name> =
struct
..
end;;
module type <name> =
struct (* should have been sig *)
..
end;;
Run Code Online (Sandbox Code Playgroud) module type ELEMENT =
sig
type element_i
end
module Element:ELEMENT =
struct
type element_i = N of int | CNN of cnn
end
module type SEMIRING =
functor (E:ELEMENT)->
sig
type elements
end
module Semiring:SEMIRING =
functor(Element:ELEMENT) ->
struct
let zero = (Element.element_i 0) (*ERROR: Unbounded Value; Same with N 0*)
end
Run Code Online (Sandbox Code Playgroud)
如何在Semiring模块中创建element_i类型的对象?