Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / queue / queue.fun
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 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
8functor Queue(Q: BASIC_QUEUE): QUEUE =
9struct
10
11val {error, ...} = Error.errors("queue", "queue")
12
13structure Q' = Sequence(structure I = Integer
14 structure S = Q)
15
16open Q Q'
17
18fun deque q =
19 case destruct q of
20 SOME xq => xq
21 | NONE => error "deque"
22
23end