Skip to content

Instantly share code, notes, and snippets.

@keizo042
Last active February 6, 2017 19:53
Show Gist options
  • Save keizo042/255213b92bf31fad18fbd68dc3c850a3 to your computer and use it in GitHub Desktop.
Save keizo042/255213b92bf31fad18fbd68dc3c850a3 to your computer and use it in GitHub Desktop.

quic frame degin idea

frame
*.hi
*.o
module Main where
import Data.ByteString
main = undefined
class Frame a where
decodeFrame :: a -> ByteString
encodeFrame :: ByteString -> a
data AckFrame = AckFrame
decodeAckFrame :: AckFrame -> ByteString
decodeAckFrame = undefined
encodeAckFrame :: ByteString -> AckFrame
encodeAckFrame = undefined
instance Frame AckFrame where
decodeFrame = decodeAckFrame
encodeFrame = encodeAckFrame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment