Use proper sum type wrapped.t

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-29 15:00:21 +03:00
parent f9ad608e8c
commit d0b937c25e
1 changed files with 5 additions and 5 deletions

View File

@ -865,11 +865,11 @@ module Library = struct
| Yes_with_transition of string
let dparse =
if_list
~then_:(
Syntax.since Stanza.syntax (1, 2) >>= fun () ->
sum ["transition", string >>| fun x -> Yes_with_transition x])
~else_:(bool >>| fun w -> Simple w)
sum
[ "true", return (Simple true)
; "false", return (Simple false)
; "transition", string >>| fun x -> Yes_with_transition x
]
let field = field "wrapped" ~default:(Simple true) dparse