diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-05-21 01:38:51 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-05-21 01:38:51 +0000 |
| commit | fe406edaea77cc4297b5721ff2b40d9d33d29644 (patch) | |
| tree | 238e986e92998e22ca49005ac523e06a7a21f1ff /lib/drl | |
| parent | a0b04a0f6d14d1b89d97d184e516aaa7e3099084 (diff) | |
| download | Sakura-fe406edaea77cc4297b5721ff2b40d9d33d29644.tar.gz Sakura-fe406edaea77cc4297b5721ff2b40d9d33d29644.zip | |
Have `Qualified_name.try_parse` return a `Condition.t`
Diffstat (limited to 'lib/drl')
| -rw-r--r-- | lib/drl/executor.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/drl/executor.ml b/lib/drl/executor.ml index 666ca37..3900f73 100644 --- a/lib/drl/executor.ml +++ b/lib/drl/executor.ml @@ -5,7 +5,6 @@ module Make (NT : Nt.S) = struct let parse_error error = condition "parse-error" ("message" |=| (of_string error)) let relation_not_found name = condition "relation-not-found" ("name" |=| (of_string name)) let unsupported_operator msg = condition "unsupported-operator" ("message" |=| (of_string msg)) - let unqualified_name name = condition "unqualified-name" ("name" |=| (of_string name)) end let ( let* ) = Result.bind @@ -18,9 +17,8 @@ module Make (NT : Nt.S) = struct (q : Ast.query) : (Nt.plan_node, Condition.t) result = match q with | Ast.Base name -> - (match Qualified_name.try_parse name with - | Error s -> Error (Error.unqualified_name s) - | Ok fqn -> Ok (Nt.Scan { path = resolve fqn; args = [] })) + let* fqn = Qualified_name.try_parse name in + Ok (Nt.Scan { path = resolve fqn; args = [] }) | Ast.Join (on_attrs, q1, q2) -> let* p1 = compile resolve q1 in let* p2 = compile resolve q2 in |
