Created
February 13, 2017 19:41
-
-
Save aav/4b7c72034b983360540cbe046753cc2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type InvalidProtobuf is (UnexpectedEOF, InvalidVarint) | |
type PBSInt32 is I32 | |
primitive PBSInt32IO is ZigZag | |
fun read(reader: WireReader ref): (PBSInt32 | InvailidProtobuf) => | |
match reader.readVariantU32() | |
| let u32: U32 => _decodeZigZag32(u32) | |
| let e: InvalidVariant => e | |
else | |
// what to return here?? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment