Apply codespell -w throughout
This commit is contained in:
parent
100f5aabb6
commit
84b0a3707a
108 changed files with 135 additions and 135 deletions
|
@ -19,7 +19,7 @@ import Data.ByteString.UTF8 (fromString, toString)
|
|||
import Data.Char
|
||||
|
||||
-- | This uses the FileSystemEncoding, so it can be used on Strings
|
||||
-- that repesent filepaths containing arbitrarily encoded characters.
|
||||
-- that represent filepaths containing arbitrarily encoded characters.
|
||||
toB64 :: String -> String
|
||||
toB64 = toString . B64.encode . encodeBS
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{- bloomfilter compatability wrapper
|
||||
{- bloomfilter compatibility wrapper
|
||||
-
|
||||
- Copyright 2014 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
|
|
|
@ -67,7 +67,7 @@ daemonize cmd params openlogfd pidfile changedirectory a = do
|
|||
envvar = "DAEMONIZED"
|
||||
#endif
|
||||
|
||||
{- To run an action that is normally daemonized in the forground. -}
|
||||
{- To run an action that is normally daemonized in the foreground. -}
|
||||
#ifndef mingw32_HOST_OS
|
||||
foreground :: IO Fd -> Maybe FilePath -> IO () -> IO ()
|
||||
foreground openlogfd pidfile a = do
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
- error. This was bad.
|
||||
-
|
||||
- So, a committee was formed. And it arrived at a committee-like decision,
|
||||
- which satisfied noone, confused everyone, and made the world an uglier
|
||||
- which satisfied no one, confused everyone, and made the world an uglier
|
||||
- place. As with all committees, this was meh. Or in this case, "mib".
|
||||
-
|
||||
- And the drive manufacturers happily continued selling drives that are
|
||||
|
@ -82,7 +82,7 @@ storageUnits =
|
|||
, Unit (p 4) "TB" "terabyte"
|
||||
, Unit (p 3) "GB" "gigabyte"
|
||||
, Unit (p 2) "MB" "megabyte"
|
||||
, Unit (p 1) "kB" "kilobyte" -- weird capitalization thanks to committe
|
||||
, Unit (p 1) "kB" "kilobyte" -- weird capitalization thanks to committee
|
||||
, Unit 1 "B" "byte"
|
||||
]
|
||||
where
|
||||
|
@ -122,7 +122,7 @@ bandwidthUnits =
|
|||
, Unit (p 4) "Tbit" "terabit"
|
||||
, Unit (p 3) "Gbit" "gigabit"
|
||||
, Unit (p 2) "Mbit" "megabit"
|
||||
, Unit (p 1) "kbit" "kilobit" -- weird capitalization thanks to committe
|
||||
, Unit (p 1) "kbit" "kilobit" -- weird capitalization thanks to committee
|
||||
]
|
||||
where
|
||||
p :: Integer -> Integer
|
||||
|
|
|
@ -52,7 +52,7 @@ watchDir dir ignored scanevents hooks = do
|
|||
else maybe (runhook delHook Nothing) handleadd
|
||||
=<< getstatus (eventPath evt)
|
||||
{- Add hooks are run when a file is modified for
|
||||
- compatability with INotify, which calls the add
|
||||
- compatibility with INotify, which calls the add
|
||||
- hook when a file is closed, and so tends to call
|
||||
- both add and modify for file modifications. -}
|
||||
when (hasflag eventFlagItemModified && not (hasflag eventFlagItemIsDir)) $ do
|
||||
|
|
|
@ -33,7 +33,7 @@ watchDir dir ignored scanevents hooks = do
|
|||
(Modified _ _)
|
||||
| isDirectory evt -> noop
|
||||
{- Add hooks are run when a file is modified for
|
||||
- compatability with INotify, which calls the add
|
||||
- compatibility with INotify, which calls the add
|
||||
- hook when a file is closed, and so tends to call
|
||||
- both add and modify for file modifications. -}
|
||||
| otherwise -> do
|
||||
|
|
|
@ -284,7 +284,7 @@ props_macs_stable = map (\(desc, mac, result) -> (desc ++ " stable", calcMac mac
|
|||
|
||||
data IncrementalHasher = IncrementalHasher
|
||||
{ updateIncrementalHasher :: S.ByteString -> IO ()
|
||||
-- ^ Called repeatedly on each peice of the content.
|
||||
-- ^ Called repeatedly on each piece of the content.
|
||||
, finalizeIncrementalHasher :: IO (Maybe String)
|
||||
-- ^ Called once the full content has been sent, returns
|
||||
-- the hash. (Nothing if unableIncremental was called.)
|
||||
|
|
|
@ -48,7 +48,7 @@ isHtmlBs = isHtml . B8.unpack
|
|||
|
||||
-- | Check if the file is html.
|
||||
--
|
||||
-- It would be equivilant to use isHtml <$> readFile file,
|
||||
-- It would be equivalent to use isHtml <$> readFile file,
|
||||
-- but since that would not read all of the file, the handle
|
||||
-- would remain open until it got garbage collected sometime later.
|
||||
isHtmlFile :: FilePath -> IO Bool
|
||||
|
|
|
@ -53,13 +53,13 @@ isLoopbackAddress :: SockAddr -> Bool
|
|||
isLoopbackAddress (SockAddrInet _ ipv4) = case hostAddressToTuple ipv4 of
|
||||
-- localhost
|
||||
(127,_,_,_) -> True
|
||||
-- current network; functions equivilant to loopback
|
||||
-- current network; functions equivalent to loopback
|
||||
(0,_,_, _) -> True
|
||||
_ -> False
|
||||
isLoopbackAddress (SockAddrInet6 _ _ ipv6 _) = case hostAddress6ToTuple ipv6 of
|
||||
-- localhost
|
||||
(0,0,0,0,0,0,0,1) -> True
|
||||
-- unspecified address; functions equivilant to loopback
|
||||
-- unspecified address; functions equivalent to loopback
|
||||
(0,0,0,0,0,0,0,0) -> True
|
||||
v -> maybe False
|
||||
(isLoopbackAddress . SockAddrInet 0)
|
||||
|
|
|
@ -131,7 +131,7 @@ replaceInode :: FileID -> InodeCache -> InodeCache
|
|||
replaceInode inode (InodeCache (InodeCachePrim _ sz mtime)) =
|
||||
InodeCache (InodeCachePrim inode sz mtime)
|
||||
|
||||
{- For backwards compatability, support low-res mtime with no
|
||||
{- For backwards compatibility, support low-res mtime with no
|
||||
- fractional seconds. -}
|
||||
data MTime = MTimeLowRes EpochTime | MTimeHighRes POSIXTime
|
||||
deriving (Show, Ord)
|
||||
|
@ -249,7 +249,7 @@ data SentinalStatus = SentinalStatus
|
|||
- On Windows, time stamp differences are ignored, since they change
|
||||
- with the timezone.
|
||||
-
|
||||
- When the sential file does not exist, InodeCaches canot reliably be
|
||||
- When the sential file does not exist, InodeCaches cannot reliably be
|
||||
- compared, so the assumption is that there is has been a change.
|
||||
-}
|
||||
checkSentinalFile :: SentinalFile -> IO SentinalStatus
|
||||
|
|
|
@ -81,7 +81,7 @@ dropLock :: LockHandle -> IO ()
|
|||
dropLock = closeHandle
|
||||
|
||||
{- If the initial lock fails, this is a BUSY wait, and does not
|
||||
- guarentee FIFO order of waiters. In other news, Windows is a POS. -}
|
||||
- guarantee FIFO order of waiters. In other news, Windows is a POS. -}
|
||||
waitToLock :: IO (Maybe lockhandle) -> IO lockhandle
|
||||
waitToLock locker = takelock
|
||||
where
|
||||
|
|
|
@ -39,7 +39,7 @@ import Prelude
|
|||
-- or the Seconds timeout if the pid lock is held by another process.
|
||||
--
|
||||
-- There are two levels of locks. A STM lock is used to handle
|
||||
-- fine-grained locking amoung threads, locking a specific lockfile,
|
||||
-- fine-grained locking among threads, locking a specific lockfile,
|
||||
-- but only in memory. The pid lock handles locking between processes.
|
||||
--
|
||||
-- The pid lock is only taken once, and LockShared is used for it,
|
||||
|
|
|
@ -38,7 +38,7 @@ lockExclusive file = fmap fst <$> tryMakeLockHandle P.lockPool file
|
|||
(\f _ -> fmap mk <$> F.lockExclusive f)
|
||||
|
||||
{- If the initial lock fails, this is a BUSY wait, and does not
|
||||
- guarentee FIFO order of waiters. In other news, Windows is a POS. -}
|
||||
- guarantee FIFO order of waiters. In other news, Windows is a POS. -}
|
||||
waitToLock :: IO (Maybe lockhandle) -> IO lockhandle
|
||||
waitToLock = F.waitToLock
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import Common
|
|||
import Data.Kind
|
||||
|
||||
{- A Token can be an Operation of an arbitrary type, or one of a few
|
||||
- predefined peices of syntax. -}
|
||||
- predefined pieces of syntax. -}
|
||||
data Token op = Operation op | And | Or | Not | Open | Close
|
||||
deriving (Show, Eq)
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ prop_segment_regressionTest :: Bool
|
|||
prop_segment_regressionTest = all id
|
||||
-- Even an empty list is a segment.
|
||||
[ segment (== "--") [] == [[]]
|
||||
-- There are two segements in this list, even though the first is empty.
|
||||
-- There are two segments in this list, even though the first is empty.
|
||||
, segment (== "--") ["--", "foo", "bar"] == [[],["foo","bar"]]
|
||||
]
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ import Utility.FileSystemEncoding
|
|||
-
|
||||
- This does not guarantee that two paths that refer to the same location,
|
||||
- and are both relative to the same location (or both absolute) will
|
||||
- yeild the same result. Run both through normalise from System.RawFilePath
|
||||
- yield the same result. Run both through normalise from System.RawFilePath
|
||||
- to ensure that.
|
||||
-}
|
||||
simplifyPath :: RawFilePath -> RawFilePath
|
||||
|
@ -90,7 +90,7 @@ upFrom dir
|
|||
|
||||
{- Checks if the first RawFilePath is, or could be said to contain the second.
|
||||
- For example, "foo/" contains "foo/bar". Also, "foo", "./foo", "foo/" etc
|
||||
- are all equivilant.
|
||||
- are all equivalent.
|
||||
-}
|
||||
dirContains :: RawFilePath -> RawFilePath -> Bool
|
||||
dirContains a b = a == b
|
||||
|
|
|
@ -37,7 +37,7 @@ import Utility.FileSystemEncoding
|
|||
- Also simplifies it using simplifyPath.
|
||||
-
|
||||
- The first parameter is a base directory (ie, the cwd) to use if the path
|
||||
- is not already absolute, and should itsef be absolute.
|
||||
- is not already absolute, and should itself be absolute.
|
||||
-
|
||||
- Does not attempt to deal with edge cases or ensure security with
|
||||
- untrusted inputs.
|
||||
|
|
|
@ -352,7 +352,7 @@ contentDispositionFilename s
|
|||
headRequest :: Request -> Request
|
||||
headRequest r = r
|
||||
{ method = methodHead
|
||||
-- remove defaut Accept-Encoding header, to get actual,
|
||||
-- remove default Accept-Encoding header, to get actual,
|
||||
-- not gzip compressed size.
|
||||
, requestHeaders = (hAcceptEncoding, B.empty) :
|
||||
filter (\(h, _) -> h /= hAcceptEncoding)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{- Yesod stuff, that's typically found in the scaffolded site.
|
||||
-
|
||||
- Also a bit of a compatability layer for older versions of yesod.
|
||||
- Also a bit of a compatibility layer for older versions of yesod.
|
||||
-
|
||||
- Copyright 2012-2014 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue