Skip to content

Commit fc8d2c3

Browse files
committed
Merge pull request #262 from mirage/new-entropy-sig
Change mirage tool to apply Entropy_unix functor
2 parents ae3c966 + 75eab41 commit fc8d2c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/mirage.ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,12 @@ module Entropy = struct
436436
let name _ =
437437
"entropy"
438438

439-
let module_name () =
439+
let module_name () = "Entropy"
440+
441+
let construction () =
440442
match !mode with
441-
| `Unix -> "Entropy_unix"
442-
| `Xen -> "Entropy_xen"
443+
| `Unix -> "Entropy_unix.Make (OS.Time)"
444+
| `Xen -> "Entropy_xen"
443445

444446
let packages () =
445447
match !mode with
@@ -449,6 +451,8 @@ module Entropy = struct
449451
let libraries = packages
450452

451453
let configure t =
454+
append_main "module %s = %s" (module_name t) (construction t) ;
455+
newline_main () ;
452456
append_main "let %s () =" (name t);
453457
append_main " %s.connect ()" (module_name t);
454458
newline_main ()

0 commit comments

Comments
 (0)