packages feed

OptDir 0.0.4 → 0.1.0

raw patch · 4 files changed

+19/−30 lines, 4 filesdep +deepseqdep ~hashablePVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

Dependency ranges changed: hashable

API changes (from Hackage documentation)

- Data.OptDir: instance GHC.Arr.Ix Data.OptDir.OptDir
+ Data.OptDir: instance Control.DeepSeq.NFData Data.OptDir.OptDir
+ Data.OptDir: instance GHC.Ix.Ix Data.OptDir.OptDir

Files

+ ChangeLog.md view
@@ -0,0 +1,12 @@+# Changelog for `OptDir`++All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),+and this project adheres to the+[Haskell Package Versioning Policy](https://pvp.haskell.org/).++## 0.1.0.0++* Drop support for `hashable <1.2`+* Add `NFData` instance
OptDir.cabal view
@@ -1,5 +1,5 @@ Name:           OptDir-Version:        0.0.4+Version:        0.1.0 Cabal-Version:  >= 1.10 License:        BSD3 License-file:   LICENSE@@ -12,13 +12,14 @@ Build-Type:	Simple Extra-Source-Files:    README.md+   ChangeLog.md  Source-Repository head   type:     git   location: git://github.com/msakai/haskell-optdir.git  Library-  Build-Depends:      base >=4 && <5, syb, hashable >=1.1.2.5+  Build-Depends:      base >=4 && <5, syb, hashable >=1.2, deepseq >=1.4.4.0   Hs-Source-Dirs:     src   Exposed-Modules:    Data.OptDir   Default-Language:   Haskell2010
README.md view
@@ -1,7 +1,7 @@ OptDir ====== -[![Build Status](https://travis-ci.org/msakai/haskell-optdir.svg?branch=master)](https://travis-ci.org/msakai/haskell-optdir)+[![build](https://github.com/msakai/haskell-optdir/actions/workflows/build.yaml/badge.svg)](https://github.com/msakai/haskell-optdir/actions/workflows/build.yaml) [![Hackage](https://img.shields.io/hackage/v/OptDir.svg)](https://hackage.haskell.org/package/OptDir) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) 
src/Data/OptDir.hs view
@@ -20,6 +20,7 @@     OptDir (..)   ) where +import Control.DeepSeq import Data.Ix import Data.Typeable import Data.Generics hiding (Generic)@@ -34,31 +35,6 @@   | OptMax -- ^ maximization   deriving (Bounded, Enum, Eq, Data, Ord, Read, Show, Ix, Generic, Typeable) -instance Hashable OptDir where hashWithSalt = hashUsing fromEnum--#if !MIN_VERSION_hashable(1,2,0)--- Copied from hashable-1.2.0.7:--- Copyright   :  (c) Milan Straka 2010---                (c) Johan Tibell 2011---                (c) Bryan O'Sullivan 2011, 2012+instance NFData OptDir where rnf = rwhnf --- | Transform a value into a 'Hashable' value, then hash the--- transformed value using the given salt.------ This is a useful shorthand in cases where a type can easily be--- mapped to another type that is already an instance of 'Hashable'.--- Example:------ > data Foo = Foo | Bar--- >          deriving (Enum)--- >--- > instance Hashable Foo where--- >     hashWithSalt = hashUsing fromEnum-hashUsing :: (Hashable b) =>-             (a -> b)           -- ^ Transformation function.-          -> Int                -- ^ Salt.-          -> a                  -- ^ Value to transform.-          -> Int-hashUsing f salt x = hashWithSalt salt (f x)-{-# INLINE hashUsing #-}-#endif+instance Hashable OptDir where hashWithSalt = hashUsing fromEnum