diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 01:30:08 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 01:30:08 +0000 |
| commit | 0f5161930584eaf91fd195b891ce7d9130c7b7f1 (patch) | |
| tree | a505f4b7bfe8dc0b0efa06c42b75502aeb2f247a /lib/evaluators | |
| parent | 0b1c7ca41a6d8ce41b9783153b567c16250913ff (diff) | |
| download | RNT-0f5161930584eaf91fd195b891ce7d9130c7b7f1.tar.gz RNT-0f5161930584eaf91fd195b891ce7d9130c7b7f1.zip | |
Forsake `fmap`
Diffstat (limited to '')
| -rw-r--r-- | lib/evaluators/FOL.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/evaluators/FOL.ml b/lib/evaluators/FOL.ml index 90f79ca..f337d61 100644 --- a/lib/evaluators/FOL.ml +++ b/lib/evaluators/FOL.ml @@ -53,13 +53,13 @@ let rec term_of_bencode = | Bencode.Tagged ('b', segments) -> strings segments |> Result.map (fun segments -> Base (Kernel.Path.of_list segments)) | Bencode.Tagged ('p', data) -> - let* term = Bencode.field "term" data |> fmap term_of_bencode in - let* attributes = Bencode.field "attributes" data |> fmap strings in + let* term = Bencode.field "term" data |>> term_of_bencode in + let* attributes = Bencode.field "attributes" data |>> strings in Ok (Project (term, BatFingerTree.of_list attributes)) | _ -> Error (Error.malformed_program ()) let encode term = bencode_of_term term |> Bencode.to_bytes |> Bytes.to_string -let decode source = Bencode.of_bytes (Bytes.of_string source) |> Utilities.Result.fmap term_of_bencode +let decode source = Utilities.Result.(Bencode.of_bytes (Bytes.of_string source) |>> term_of_bencode) (* TODO: To strenghten our checks for self references, we need to construct a graph and see raise a condition if there are self @@ -105,7 +105,7 @@ let rec describe = let open Utilities.Result in function | Base relation -> Protocols.Relation.heading relation - | Project (plan, attributes) -> describe plan |> fmap (restrict attributes) + | Project (plan, attributes) -> describe plan |>> restrict attributes let rec modes = let open Utilities.Result in |
