【发布时间】:2020-08-13 01:33:20
【问题描述】:
由于谷歌上没有这方面的内容,我打开了这个问题。
我正在尝试编译这段代码:
module Random: Mirage_random.S = struct
include Mirage_random_stdlib
end
module Ipv4: Static_ipv4.Make(Random, Clock, Ethernet, Arp) = struct
include Static_ipv4
end
但我明白了:
root@66f08fd7c55b:/workspaces/ocaml_env/mirage-tcpip/examples/raw_ip_tcp_example# dune build raw_ip_tcp_example.exe
Entering directory '/workspaces/ocaml_env/mirage-tcpip'
File "examples/raw_ip_tcp_example/raw_ip_tcp_example.ml", line 44, characters 36-37:
44 | module Ipv4: Static_ipv4.Make(Random, Clock, Ethern
^
Error: Syntax error: module path expected.
你可以在这里看到static_ipv4文件https://github.com/mirage/mirage-tcpip/blob/master/src/ipv4/static_ipv4.mli#L17
我不知道为什么会发生此错误。我没有包括Clock、Ethernet、Arp,因为错误已经在Random 上。你可以在这里看到随机签名:https://github.com/mirage/mirage-random/blob/master/src/mirage_random.ml 和我在这里包含的实现https://github.com/mirage/mirage-random-stdlib
【问题讨论】:
标签: functional-programming ocaml