equal
deleted
inserted
replaced
128 |
128 |
129 (* base element *) |
129 (* base element *) |
130 |
130 |
131 fun split_path f (path as Path xs) = |
131 fun split_path f (path as Path xs) = |
132 (case try split_last xs of |
132 (case try split_last xs of |
133 Some (prfx, Basic s) => f (prfx, s) |
133 SOME (prfx, Basic s) => f (prfx, s) |
134 | _ => error ("Cannot split path into dir/base: " ^ quote (pack path))); |
134 | _ => error ("Cannot split path into dir/base: " ^ quote (pack path))); |
135 |
135 |
136 val dir = split_path (fn (prfx, _) => Path prfx); |
136 val dir = split_path (fn (prfx, _) => Path prfx); |
137 val base = split_path (fn (_, s) => Path [Basic s]); |
137 val base = split_path (fn (_, s) => Path [Basic s]); |
138 |
138 |