Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | structure Vector = | |
9 | let | |
10 | structure V = Vector (local | |
11 | open Pervasive.Vector | |
12 | in | |
13 | type 'a t = 'a vector | |
14 | exception New = Size | |
15 | val length = length | |
16 | val sub = sub | |
17 | val unfoldi = MLton.Vector.unfoldi | |
18 | val unsafeSub = Unsafe.Vector.sub | |
19 | end) | |
20 | in | |
21 | struct | |
22 | open V | |
23 | ||
24 | type 'a vector = 'a t | |
25 | ||
26 | (* The built-in concat is faster in MLton because it can use | |
27 | * Vector.fromArray. | |
28 | * See src/basis-library/arrays-and-vectors/sequence.fun. | |
29 | *) | |
30 | val concat = Pervasive.Vector.concat | |
31 | end | |
32 | end |