packages feed

ghc-boot 8.4.4 → 8.6.1

raw patch · 5 files changed

+61/−30 lines, 5 filesdep ~basedep ~ghc-boot-thPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc-boot-th

API changes (from Hackage documentation)

+ GHC.HandleEncoding: configureHandleEncoding :: IO ()

Files

+ GHC/HandleEncoding.hs view
@@ -0,0 +1,31 @@+-- | See GHC #10762 and #15021.+module GHC.HandleEncoding (configureHandleEncoding) where++import GHC.IO.Encoding (textEncodingName)+import System.Environment+import System.IO++-- | Handle GHC-specific character encoding flags, allowing us to control how+-- GHC produces output regardless of OS.+configureHandleEncoding :: IO ()+configureHandleEncoding = do+   env <- getEnvironment+   case lookup "GHC_CHARENC" env of+    Just "UTF-8" -> do+     hSetEncoding stdout utf8+     hSetEncoding stderr utf8+    _ -> do+     -- Avoid GHC erroring out when trying to display unhandled characters+     hSetTranslit stdout+     hSetTranslit stderr++-- | Change the character encoding of the given Handle to transliterate+-- on unsupported characters instead of throwing an exception+hSetTranslit :: Handle -> IO ()+hSetTranslit h = do+    menc <- hGetEncoding h+    case fmap textEncodingName menc of+        Just name | '/' `notElem` name -> do+            enc' <- mkTextEncoding $ name ++ "//TRANSLIT"+            hSetEncoding h enc'+        _ -> return ()
GHC/PackageDb.hs view
@@ -80,9 +80,7 @@ import System.IO import System.IO.Error import GHC.IO.Exception (IOErrorType(InappropriateType))-#if MIN_VERSION_base(4,10,0) import GHC.IO.Handle.Lock-#endif import System.Directory  @@ -209,12 +207,7 @@   }  -- | Represents a lock of a package db.-newtype PackageDbLock = PackageDbLock-#if MIN_VERSION_base(4,10,0)-  Handle-#else-  ()  -- no locking primitives available in base < 4.10-#endif+newtype PackageDbLock = PackageDbLock Handle  -- | Acquire an exclusive lock related to package DB under given location. lockPackageDb :: FilePath -> IO PackageDbLock@@ -222,8 +215,6 @@ -- | Release the lock related to package DB. unlockPackageDb :: PackageDbLock -> IO () -#if MIN_VERSION_base(4,10,0)- -- | Acquire a lock of given type related to package DB under given location. lockPackageDbWith :: LockMode -> FilePath -> IO PackageDbLock lockPackageDbWith mode file = do@@ -273,15 +264,6 @@ #endif     hClose hnd --- MIN_VERSION_base(4,10,0)-#else--lockPackageDb _file = return $ PackageDbLock ()-unlockPackageDb _lock = return ()---- MIN_VERSION_base(4,10,0)-#endif- -- | Mode to open a package db in. data DbMode = DbReadOnly | DbReadWrite @@ -410,7 +392,7 @@   -- shared lock on non-Windows platform because we update the database with an   -- atomic rename, so readers will always see the database in a consistent   -- state.-#if MIN_VERSION_base(4,10,0) && defined(mingw32_HOST_OS)+#if defined(mingw32_HOST_OS)     bracket (lockPackageDbWith SharedLock file) unlockPackageDb $ \_ -> do #endif       (, DbOpenReadOnly) <$> decodeFileContents
GHC/Serialized.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}@@ -34,16 +33,10 @@ -- | If the 'Serialized' value contains something of the given type, then use the specified deserializer to return @Just@ that. -- Otherwise return @Nothing@. fromSerialized :: forall a. Typeable a => ([Word8] -> a) -> Serialized -> Maybe a-#if MIN_VERSION_base(4,10,0) fromSerialized deserialize (Serialized the_type bytes)   | the_type == rep = Just (deserialize bytes)   | otherwise       = Nothing   where rep = typeRep (Proxy :: Proxy a)-#else-fromSerialized deserialize (Serialized the_type bytes)-  | the_type == typeOf (undefined :: a) = Just (deserialize bytes)-  | otherwise                           = Nothing-#endif  -- | Use a 'Data' instance to implement a serialization scheme dual to that of 'deserializeWithData' serializeWithData :: Data a => a -> [Word8]
changelog.md view
@@ -1,3 +1,27 @@+## 8.6.1  *August 2018*++  * Bundled with GHC 8.6.1++## 8.4.2  *April 2018*++  * Bundled with GHC 8.4.2+	+## 8.4.1  *March 2018*++  * Bundled with GHC 8.4.1++## 8.2.2  *November 2018*++  * Bundled with GHC 8.2.2++## 8.2.1  *July 2017*++  * Bundled with GHC 8.2.1++## 8.0.2  *January 2017*++  * Bundled with GHC 8.0.2+ ## 8.0.1  *May 2016*    * Bundled with GHC 8.0.1
ghc-boot.cabal view
@@ -1,6 +1,6 @@ cabal-version:  1.22 name:           ghc-boot-version:        8.4.4+version:        8.6.1  license:        BSD3 license-file:   LICENSE@@ -37,10 +37,11 @@             GHC.PackageDb             GHC.Serialized             GHC.ForeignSrcLang+            GHC.HandleEncoding -    build-depends: base       >= 4.8 && < 4.12,+    build-depends: base       >= 4.10 && < 4.13,                    binary     == 0.8.*,                    bytestring == 0.10.*,                    directory  >= 1.2 && < 1.4,                    filepath   >= 1.3 && < 1.5,-                   ghc-boot-th == 8.4.4+                   ghc-boot-th == 8.6.1