aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/declare.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/declare.ml b/library/declare.ml
index 91fcc7df6c..1a1d46d3f0 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -25,11 +25,13 @@ let make_strength = function
let make_strength_0 () = make_strength (Lib.cwd())
let make_strength_1 () =
- let path = try List.tl (List.tl (Lib.cwd())) with Failure _ -> [] in
+ let cwd = Lib.cwd() in
+ let path = try list_firstn (List.length cwd - 1) cwd with Failure _ -> [] in
make_strength path
let make_strength_2 () =
- let path = try List.tl (Lib.cwd()) with Failure _ -> [] in
+ let cwd = Lib.cwd() in
+ let path = try list_firstn (List.length cwd - 2) cwd with Failure _ -> [] in
make_strength path