djs55 / ocaml-xenstore

A xenstore protocol implementation in ocaml
Other
6 stars 0 forks source link

Fix pattern match exhaustivity warnings #17

Closed djs55 closed 10 years ago

djs55 commented 10 years ago

Although the function names aren't obvious, these were both on the request marshalling path. These functions are only used by our well-behaved request marshaller, which should never marshal either Errors or Watchevents as requests.

Fixed by making one function total, and the other an explicit exception and a note describing why it can never happen. Perhaps we could encode this in the types somehow.

Fixes [djs55/ocaml-xenstore#13]

Signed-off-by: David Scott dave.scott@eu.citrix.com