Skip to content

Build fails due to syntax error on Set.Make(String) #55

Open
@jordr

Description

$ dune.build
File "frontc/cxml.ml", line 43, characters 19-20:
Error: Syntax error

This is because of this code bit:

FrontC/frontc/cxml.ml

Lines 42 to 59 in c95d785

let validate_identifiers toplevel =
let open Set.Make(String) in
let rec node ids x ~accept ~reject = match x with
| TEXT _ | COM _ | PI _ -> accept ids
| ELT (_,attrs,xs) as elt ->
match List.assoc_opt "id" attrs with
| None -> nodes ids xs ~accept ~reject
| Some "" -> reject elt
| Some id -> if mem id ids
then reject elt
else nodes (add id ids) xs ~reject ~accept
and nodes ids xs ~accept ~reject = match xs with
| [] -> accept ids
| x :: xs -> node ids x ~reject ~accept:(fun ids ->
nodes ids xs ~accept ~reject) in
node empty toplevel
~accept:(fun _ -> Ok toplevel)
~reject:(fun elt -> Error elt)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions