summaryrefslogtreecommitdiff
path: root/lib/bio/geti.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio/geti.myr')
-rw-r--r--lib/bio/geti.myr24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/bio/geti.myr b/lib/bio/geti.myr
index ee9a631..4e9faca 100644
--- a/lib/bio/geti.myr
+++ b/lib/bio/geti.myr
@@ -5,23 +5,23 @@ use "types"
pkg bio =
/* unsigned big endian */
- generic getbe8 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getbe16 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getbe32 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getbe64 : (f : file# -> std.result(@a::(numeric,integral), err))
+ generic getbe8 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getbe16 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getbe32 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getbe64 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
/* signed big endian */
- generic getle8 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getle16 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getle32 : (f : file# -> std.result(@a::(numeric,integral), err))
- generic getle64 : (f : file# -> std.result(@a::(numeric,integral), err))
+ generic getle8 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getle16 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getle32 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
+ generic getle64 : (f : file# -> std.result(@a, err)) :: numeric,integral @a
;;
/*
reads a single integer-like value to the output stream, in
little endian format
*/
-generic getle = {f, n -> std.result(@a::(numeric,integral), err)
+generic getle = {f, n -> std.result(@a, err) :: numeric,integral @a
match ensureread(f, n)
| `std.Err e : -> `std.Err e
| `std.Ok _:
@@ -29,7 +29,7 @@ generic getle = {f, n -> std.result(@a::(numeric,integral), err)
for var i = 0; i < n; i++
v |= (f.rbuf[f.rstart++] : uint64) << (8*(i : uint64))
;;
- -> `std.Ok (v : @a::(numeric,integral))
+ -> `std.Ok (v : @a)
;;
}
@@ -37,7 +37,7 @@ generic getle = {f, n -> std.result(@a::(numeric,integral), err)
reads a single integer-like value to the output stream, in
big endian format
*/
-generic getbe = {f, n -> std.result(@a::(numeric,integral), err)
+generic getbe = {f, n -> std.result(@a, err) :: numeric,integral @a
match ensureread(f, n)
| `std.Err e : -> `std.Err e
| `std.Ok _:
@@ -46,7 +46,7 @@ generic getbe = {f, n -> std.result(@a::(numeric,integral), err)
v <<= 8
v |= (f.rbuf[f.rstart++] : uint64)
;;
- -> `std.Ok (v : @a::(numeric,integral))
+ -> `std.Ok (v : @a)
;;
}