Skip to content

Commit

Permalink
Merge pull request #262 from mirage/new-entropy-sig
Browse files Browse the repository at this point in the history
Change mirage tool to apply Entropy_unix functor
  • Loading branch information
avsm committed Jul 7, 2014
2 parents ae3c966 + 75eab41 commit fc8d2c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/mirage.ml
Expand Up @@ -436,10 +436,12 @@ module Entropy = struct
let name _ =
"entropy"

let module_name () =
let module_name () = "Entropy"

let construction () =
match !mode with
| `Unix -> "Entropy_unix"
| `Xen -> "Entropy_xen"
| `Unix -> "Entropy_unix.Make (OS.Time)"
| `Xen -> "Entropy_xen"

let packages () =
match !mode with
Expand All @@ -449,6 +451,8 @@ module Entropy = struct
let libraries = packages

let configure t =
append_main "module %s = %s" (module_name t) (construction t) ;
newline_main () ;
append_main "let %s () =" (name t);
append_main " %s.connect ()" (module_name t);
newline_main ()
Expand Down

0 comments on commit fc8d2c3

Please sign in to comment.