File: hpack-debug.hs

package info (click to toggle)
haskell-http2 5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,180 kB
  • sloc: haskell: 8,657; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Main where

import Data.Aeson (eitherDecode)
import qualified Data.ByteString.Lazy as BL

import HPACKDecode
import JSON

main :: IO ()
main = do
    bs <- BL.getContents
    let etc = eitherDecode bs :: Either String Test
    res <- case etc of
        Left e -> return $ Just e
        Right tc -> do
            res <- run True tc
            case res of
                Pass -> return Nothing
                Fail e -> return $ Just e
    print res