From 0b5ddc7f2c10ee84631dd6cb5f6368afbc389449 Mon Sep 17 00:00:00 2001 From: Brian Wignall Date: Fri, 10 Jan 2020 10:47:46 -0500 Subject: Fix more typos, via an improved Levenshtein-style corrector --- libraries/base/GHC/Float.hs | 4 ++-- libraries/base/GHC/Float/RealFracMethods.hs | 2 +- libraries/base/System/Posix/Internals.hs | 2 +- libraries/ghc-boot/GHC/PackageDb.hs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libraries') diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs index de6c8e3860..1e870e0c49 100644 --- a/libraries/base/GHC/Float.hs +++ b/libraries/base/GHC/Float.hs @@ -229,7 +229,7 @@ class (RealFrac a, Floating a) => RealFloat a where -- to wrong results, hence we clamp the -- scaling parameter. -- If n + k would be larger than h, - -- n + clamp b k must be too, simliar + -- n + clamp b k must be too, similar -- for smaller than l - d. -- Add a little extra to keep clear -- from the boundary cases. @@ -1258,7 +1258,7 @@ word2Float (W# w) = F# (word2Float# w) {- Note [realToFrac int-to-float] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Don found that the RULES for realToFrac/Int->Double and simliarly +Don found that the RULES for realToFrac/Int->Double and similarly Float made a huge difference to some stream-fusion programs. Here's an example diff --git a/libraries/base/GHC/Float/RealFracMethods.hs b/libraries/base/GHC/Float/RealFracMethods.hs index 127d99d223..9a31425f64 100644 --- a/libraries/base/GHC/Float/RealFracMethods.hs +++ b/libraries/base/GHC/Float/RealFracMethods.hs @@ -305,7 +305,7 @@ int2Float (I# i) = F# (int2Float# i) -- -- Note: Since the value is integral, the exponent can't be less than -- (-TYP_MANT_DIG), so we need not check the validity of the shift --- distance for the right shfts here. +-- distance for the right shifts here. {-# INLINE double2Integer #-} double2Integer :: Double -> Integer diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 8841f82bec..15a02ff1e1 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -593,7 +593,7 @@ foreign import capi unsafe "stdio.h value SEEK_END" sEEK_END :: CInt Note: Windows types Windows' _read and _write have types that differ from POSIX. They take an -unsigned int for lengh and return a signed int where POSIX uses size_t and +unsigned int for length and return a signed int where POSIX uses size_t and ssize_t. Those are different on x86_64 and equivalent on x86. We import them with the types in Microsoft's documentation which means that c_read, c_safe_read, c_write and c_safe_write have different Haskell types depending on diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs index 31073711d4..3382cf3025 100644 --- a/libraries/ghc-boot/GHC/PackageDb.hs +++ b/libraries/ghc-boot/GHC/PackageDb.hs @@ -30,12 +30,12 @@ -- the internal package format which is specialised just for GHC. -- -- GHC the compiler only needs some of the information which is kept about --- registerd packages, such as module names, various paths etc. On the other +-- registered packages, such as module names, various paths etc. On the other -- hand ghc-pkg has to keep all the information from Cabal packages and be able -- to regurgitate it for users and other tools. -- -- The first trick is that we duplicate some of the information in the package --- database. We essentially keep two versions of the datbase in one file, one +-- database. We essentially keep two versions of the database in one file, one -- version used only by ghc-pkg which keeps the full information (using the -- serialised form of the 'InstalledPackageInfo' type defined by the Cabal -- library); and a second version written by ghc-pkg and read by GHC which has -- cgit v1.2.1