1module Main where
2
3import Data.Aeson (eitherDecode)
4import qualified Data.ByteString.Lazy as BL
5
6import JSON
7import HPACKDecode
8
9main :: IO ()
10main = do
11    bs <- BL.getContents
12    let etc = eitherDecode bs :: Either String Test
13    res <- case etc of
14        Left e   -> return $ Just e
15        Right tc -> do
16            res <- run True tc
17            case res of
18                Pass   -> return Nothing
19                Fail e -> return $ Just e
20    print res
21