gopdt
[clean-tests.git] / gopt / gopt.icl
index 6db4936..1713a6b 100644 (file)
@@ -35,7 +35,7 @@ combine` sel app p s t = p s (sel t) >>= \(l, as)->pure ((app (const l) t), as)
 
 ar0 s f as = Ok o flip tuple as o f
 
-generic gopt a :: Opt a
+generic gopt a *! :: Opt a
 gopt{|Bool|} = BinaryFlag (const True) (const False)
 gopt{|Int|} = Positionals [\s _->if (and [isDigit c\\c<-:s]) (Ok $ toInt s) (Error ["Not an integer"])]
 gopt{|Char|} = Positionals [\s _->if (size s == 1) (Ok s.[0]) (Error ["Not a single character"])]
@@ -118,7 +118,7 @@ parseOpts _ args a = Ok (a, args)
 :: T2 = {f :: Int}
 :: C = A Int | B | C
 //:: T2 = T Int Int
-derive bimap Opt, [], (,), MaybeError
+derive binumap Opt, [], (,), MaybeError
 derive gopt T, T2, C
 
 Start w