Skip to content

Commit 8b37d75

Browse files
authored
Fix typos (#218)
Found via `codespell -L noes` and `typos --hidden --format brief`
1 parent c03d39e commit 8b37d75

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ binary-0.7.6.0
121121
binary-0.7.5.0
122122
--------------
123123

124-
- Fix performance bug that was noticable when you get a big strict ByteString
124+
- Fix performance bug that was noticeable when you get a big strict ByteString
125125
and the input to the decoder consists of many small chunks.
126126
- https://github.com/kolmodin/binary/issues/73
127127
- https://github.com/kolmodin/binary/pull/76
@@ -196,7 +196,7 @@ binary-0.6.4
196196
binary-0.6.3
197197
------------
198198

199-
- Documentation tweeks, internal restructuring, more tests.
199+
- Documentation tweaks, internal restructuring, more tests.
200200

201201
binary-0.6.2
202202
------------

src/Data/Binary/Get.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ import Data.Binary.FloatCast (wordToFloat, wordToDouble)
257257
-- If it succeeds it will return 'Done' with the resulting value,
258258
-- the position and the remaining input.
259259

260-
-- | A decoder procuced by running a 'Get' monad.
260+
-- | A decoder produced by running a 'Get' monad.
261261
data Decoder a = Fail !B.ByteString {-# UNPACK #-} !ByteOffset String
262262
-- ^ The decoder ran into an error. The decoder either used
263263
-- 'fail' or was not provided enough input. Contains any
@@ -421,7 +421,7 @@ getRemainingLazyByteString :: Get L.ByteString
421421
getRemainingLazyByteString = withInputChunks () consumeAll L.fromChunks resumeOnEOF
422422

423423
------------------------------------------------------------------------
424-
-- Primtives
424+
-- Primitives
425425

426426
-- helper, get a raw Ptr onto a strict ByteString copied out of the
427427
-- underlying lazy byteString.
@@ -586,7 +586,7 @@ getWord32host :: Get Word32
586586
getWord32host = getPtr (sizeOf (undefined :: Word32))
587587
{-# INLINE getWord32host #-}
588588

589-
-- | /O(1)./ Read a Word64 in native host order and host endianess.
589+
-- | /O(1)./ Read a Word64 in native host order and host endianness.
590590
getWord64host :: Get Word64
591591
getWord64host = getPtr (sizeOf (undefined :: Word64))
592592
{-# INLINE getWord64host #-}
@@ -607,7 +607,7 @@ getInt32host :: Get Int32
607607
getInt32host = getPtr (sizeOf (undefined :: Int32))
608608
{-# INLINE getInt32host #-}
609609

610-
-- | /O(1)./ Read an Int64 in native host order and host endianess.
610+
-- | /O(1)./ Read an Int64 in native host order and host endianness.
611611
getInt64host :: Get Int64
612612
getInt64host = getPtr (sizeOf (undefined :: Int64))
613613
{-# INLINE getInt64host #-}

src/Data/Binary/Get/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{-# LANGUAGE CPP, RankNTypes, MagicHash, BangPatterns, TypeFamilies #-}
22

3-
-- CPP C style pre-precessing, the #if defined lines
3+
-- CPP C style pre-processing, the #if defined lines
44
-- RankNTypes forall r. statement
55
-- MagicHash the (# unboxing #), also needs GHC.primitives
66

@@ -56,7 +56,7 @@ import Data.Binary.Internal ( accursedUnutterablePerformIO )
5656

5757
-- Kolmodin 20100427: at zurihac we discussed of having partial take a
5858
-- "Maybe ByteString" and implemented it in this way.
59-
-- The reasoning was that you could accidently provide an empty bytestring,
59+
-- The reasoning was that you could accidentally provide an empty bytestring,
6060
-- and it should not terminate the decoding (empty would mean eof).
6161
-- However, I'd say that it's also a risk that you get stuck in a loop,
6262
-- where you keep providing an empty string. Anyway, no new input should be
@@ -76,7 +76,7 @@ data Decoder a = Fail !B.ByteString String
7676
-- output value you also get the unused input.
7777
| BytesRead {-# UNPACK #-} !Int64 (Int64 -> Decoder a)
7878
-- ^ The decoder needs to know the current position in the input.
79-
-- Given the number of bytes remaning in the decoder, the outer
79+
-- Given the number of bytes remaining in the decoder, the outer
8080
-- decoder runner needs to calculate the position and
8181
-- resume the decoding.
8282

tests/Action.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ prop_fail =
171171
" but got " ++ show off)
172172
| inp /= L.drop (fromIntegral off) lbs ->
173173
error $ "remaining output incorrect, was: " ++ show inp ++
174-
", should hav been: " ++ show (L.drop (fromIntegral off) lbs)
174+
", should have been: " ++ show (L.drop (fromIntegral off) lbs)
175175
| otherwise -> property True
176176
Right (_inp, _off, _value) -> label "test case without 'fail'" $ property True
177177

@@ -197,7 +197,7 @@ failReason _ = "NoFail"
197197

198198
-- | The result of an evaluation.
199199
data Eval = ESuccess Int
200-
-- ^ The evalutation completed successfully. Contains the number of
200+
-- ^ The evaluation completed successfully. Contains the number of
201201
-- remaining bytes of the input.
202202
| EFail FailReason [String] Int
203203
-- ^ The evaluation completed with a failure. Contains the labels up
@@ -212,7 +212,7 @@ data FailReason
212212
deriving (Show,Eq)
213213

214214
-- | Given the number of input bytes and a list of actions, evaluate the
215-
-- actions and return whether the actions succeeed or fail.
215+
-- actions and return whether the actions succeed or fail.
216216
eval :: Int -> [Action] -> Eval
217217
eval inp0 = go inp0 []
218218
where

tests/QC.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ prop_bytesRead lbs =
265265
-- | We're trying to guarantee that the Decoder will not ask for more input
266266
-- with Partial if it has been given Nothing once.
267267
-- In this test we're making the decoder return 'Partial' to get more
268-
-- input, and to get knownledge of the current position using 'BytesRead'.
268+
-- input, and to get knowledge of the current position using 'BytesRead'.
269269
-- Both of these operations, when used with the <|> operator, result internally
270270
-- in that the decoder return with Partial and BytesRead multiple times,
271271
-- in which case we need to keep track of if the user has passed Nothing to a

0 commit comments

Comments
 (0)