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