gopt{|Bool|} = BinaryFlag (const True) (const False)
gopt{|Int|} = Positionals [("INT", \s _->if (and [isDigit c\\c<-:s]) (Ok $ toInt s) (Error ["Not an integer"]))]
gopt{|Char|} = Positionals [("CHAR", \s _->if (size s == 1) (Ok s.[0]) (Error ["Not a single character"]))]
gopt{|String|} = Positionals [("STRING", \s _->Ok s)]
gopt{|Bool|} = BinaryFlag (const True) (const False)
gopt{|Int|} = Positionals [("INT", \s _->if (and [isDigit c\\c<-:s]) (Ok $ toInt s) (Error ["Not an integer"]))]
gopt{|Char|} = Positionals [("CHAR", \s _->if (size s == 1) (Ok s.[0]) (Error ["Not a single character"]))]
gopt{|String|} = Positionals [("STRING", \s _->Ok s)]