小编Zub*_*ani的帖子

'a和'_l有什么区别?

'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)

ocaml

11
推荐指数
1
解决办法
3332
查看次数

6
推荐指数
2
解决办法
788
查看次数

跨模块键入定义

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类型的对象?

ocaml types module

2
推荐指数
1
解决办法
87
查看次数

标签 统计

ocaml ×3

module ×2

types ×1