2 | import HTTP.API.Decode
21 | decodeTest : (0 a : Type) -> Decode a => Show a => String -> IO ()
23 | either (putStrLn . interpolate) printLn . decodeAs a . fromString
33 | decodeManyTest : (0 a : Type) -> DecodeMany a => Show a => String -> IO ()
34 | decodeManyTest a s =
35 | case parseURI Virtual (fromString s) of
36 | Left err => putStrLn "\{err}"
37 | Right u => case decodeMany {a} u.path of
38 | Right ([],v) => printLn v
39 | Right (b::bs,v) => putStrLn "only consumed up to \{b}: \{show v}"
40 | Left x => putStrLn "\{x}"