summaryrefslogtreecommitdiff
path: root/script.it/script_event/complete_path.ml
blob: 4383a2e4adeee47be2ad2ce73a4558e781cfdc44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
open StdLabels
module State = Script_state.State

type t = Outline.t

let process newPath state =
  let paths = List.map
      state.State.paths
      ~f:(fun line ->
          match Outline.(newPath.id = line.id) with
          | true -> newPath
          | false -> line) in
  { state with paths }