13 | repr : Vect 16 Bits8 -> String
15 | case map (\x => aux (x `shiftR` 4) ++ aux (0x0f .&. x)) xs of
16 | [x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x10, x11, x12, x13, x14, x15] =>
17 | "\{x00}\{x01}\{x02}\{x03}-\{x04}\{x05}-\{x06}\{x07}" ++
18 | "-\{x08}\{x09}-\{x10}\{x11}\{x12}\{x13}\{x14}\{x15}"
21 | aux : Bits8 -> String
32 | interface Ord UUID => UUIDGen where
35 | fromBytes : Vect 16 Bits8 -> Maybe UUID
36 | fromBytes = parse . repr
40 | toBytes : UUID -> Vect 16 Bits8
49 | uuid1 : IO (UUID, Bool)
55 | uuid3 : (namespace' : Vect 16 Bits8) -> (name : String) -> UUID
70 | uuid5 : (namespace' : Vect 16 Bits8) -> (name : String) -> UUID
74 | parse : String -> Maybe UUID
78 | unparse : UUID -> String