hi-file-parser 0.1.0.0 → 0.1.1.0
raw patch · 3 files changed
+17/−9 lines, 3 filesdep ~binarydep ~bytestringdep ~hspecnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: binary, bytestring, hspec, rio, vector
API changes (from Hackage documentation)
+ HiFileParser: instance Control.DeepSeq.NFData HiFileParser.Dependencies
+ HiFileParser: instance Control.DeepSeq.NFData HiFileParser.Dictionary
+ HiFileParser: instance Control.DeepSeq.NFData HiFileParser.Interface
+ HiFileParser: instance Control.DeepSeq.NFData HiFileParser.Module
+ HiFileParser: instance Control.DeepSeq.NFData HiFileParser.Usage
+ HiFileParser: instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (HiFileParser.List a)
+ HiFileParser: instance GHC.Generics.Generic HiFileParser.Dependencies
+ HiFileParser: instance GHC.Generics.Generic HiFileParser.Interface
Files
- ChangeLog.md +4/−0
- hi-file-parser.cabal +3/−3
- src/HiFileParser.hs +10/−6
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for hi-file-parser +## 0.1.1.0++Add `NFData` instances+ ## 0.1.0.0 Initial release
hi-file-parser.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.1.+-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack ----- hash: 2313c7d2911f3c633e0e5dc904c1a47cfe30b325de4f4aeac2752a703c62823d+-- hash: af191a13968cedda5d64d117ea4e98f2223106716e965411a662809b08a5640c name: hi-file-parser-version: 0.1.0.0+version: 0.1.1.0 synopsis: Parser for GHC's hi files description: Please see the README on Github at <https://github.com/commercialhaskell/stack/blob/master/subs/hi-file-parser/README.md> category: Development
src/HiFileParser.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -32,6 +33,7 @@ import GHC.IO.IOMode (IOMode (..)) import Numeric (showHex) import RIO.ByteString as B (ByteString, hGetSome, null)+import RIO (Generic, NFData) import System.IO (withBinaryFile) type IsBoot = Bool@@ -40,19 +42,19 @@ newtype List a = List { unList :: [a]- } deriving newtype (Show)+ } deriving newtype (Show, NFData) newtype Dictionary = Dictionary { unDictionary :: V.Vector ByteString- } deriving newtype (Show)+ } deriving newtype (Show, NFData) newtype Module = Module { unModule :: ModuleName- } deriving newtype (Show)+ } deriving newtype (Show, NFData) newtype Usage = Usage { unUsage :: FilePath- } deriving newtype (Show)+ } deriving newtype (Show, NFData) data Dependencies = Dependencies { dmods :: List (ModuleName, IsBoot)@@ -60,12 +62,14 @@ , dorphs :: List Module , dfinsts :: List Module , dplugins :: List ModuleName- } deriving (Show)+ } deriving (Show, Generic)+instance NFData Dependencies data Interface = Interface { deps :: Dependencies , usage :: List Usage- } deriving (Show)+ } deriving (Show, Generic)+instance NFData Interface -- | Read a block prefixed with its length withBlockPrefix :: Get a -> Get a