git.iko.soy/rowtype-yoga/purescript-protobuf
on master help sign in
README
commitd627b95a2493c287886a9241b3a0f6eb52edbe78 authorJames Brock <jamesbrock@gmail.com> dateTue 13 Oct 2020, 17:12 (6 years ago) parent9adfa74
1 file changed+5−5
README.md+5−5
README.md+5−5
@@ -144,8 +144,8 @@ do
144144Now we'll deserialize `Rectangle` from the `ArrayBuffer`.
145145
146146```purescript
147− result <- runParserT (whole arraybuffer) $ do
148− rectangle <- parseRectangle (byteLength arraybuffer)
147+ result <- runParserT (whole arraybuffer) $ do
148+ rectangle <- parseRectangle (byteLength arraybuffer)
149149```
150150
151151Now at this point, we've consumed all of the parser input, but
@@ -164,9 +164,9 @@ on the `Rectangle` message type works well, or we might want to use some of the
164164convenience parsing functions supplied by `Protobuf.Library`, like `parseMaybe`.
165165
166166```purescript
167− width <- parseMaybe "Missing required width" (unwrap rectangle).width
168− height <- parseMaybe "Missing required height" (unwrap rectangle).height
169− pure $ Tuple width height
167+ width <- parseMaybe "Missing required width" (unwrap rectangle).width
168+ height <- parseMaybe "Missing required height" (unwrap rectangle).height
169+ pure $ Tuple width height
170170```
171171
172172The `result` will now be `:: Either ParseError (Tuple Number Number)`.