diff --git a/cabal.project.local b/cabal.project.local index b417894..375399c 100644 --- a/cabal.project.local +++ b/cabal.project.local @@ -3,4 +3,4 @@ tests: True allow-newer: base allow-newer: Cabal allow-newer: random --- flags: with-pg \ No newline at end of file +-- flags: +with-pg \ No newline at end of file diff --git a/ch05/dicegame.hs b/ch05/dicegame.hs index 63747c9..b5bb087 100644 --- a/ch05/dicegame.hs +++ b/ch05/dicegame.hs @@ -1,3 +1,4 @@ +import Control.Monad import Control.Monad.RWS import System.Random diff --git a/ch05/gcd.hs b/ch05/gcd.hs index 700fb4e..4178f0e 100644 --- a/ch05/gcd.hs +++ b/ch05/gcd.hs @@ -1,3 +1,4 @@ +import Data.Monoid import Control.Monad.Writer gcd' :: Integral a => a -> a -> a diff --git a/ch05/reader.hs b/ch05/reader.hs index 9bd6dd3..2a7034a 100644 --- a/ch05/reader.hs +++ b/ch05/reader.hs @@ -1,5 +1,6 @@ {-# LANGUAGE NamedFieldPuns #-} +import Control.Monad import Control.Monad.Reader data Config = Config { diff --git a/ch05/weapons.hs b/ch05/weapons.hs index 5783a16..16d6842 100644 --- a/ch05/weapons.hs +++ b/ch05/weapons.hs @@ -1,4 +1,5 @@ import Data.List (group, sort) +import Control.Monad import Control.Monad.State import System.Random import System.Random.Stateful (uniformRM, uniformM) diff --git a/ch12/th/projectors/Projectors.hs b/ch12/th/projectors/Projectors.hs index 67d44dc..e0ec6d3 100644 --- a/ch12/th/projectors/Projectors.hs +++ b/ch12/th/projectors/Projectors.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TemplateHaskell #-} + module Projectors where import Language.Haskell.TH @@ -52,10 +53,13 @@ mkProjType n k = sigD nm funTy where nm = mkProjName n k + plainTV' :: Name -> TyVarBndr Specificity + plainTV' name = PlainTV name specifiedSpec + funTy = do resTy <- newName "res" tys <- mapM (getTy resTy) [0..n-1] - forallT (map plainTV tys) + forallT (map plainTV' tys) (pure []) [t| $(mkTuple tys) -> $(varT resTy) |] diff --git a/ch13/doors/SingGen.hs b/ch13/doors/SingGen.hs index 087f314..1bc08e8 100644 --- a/ch13/doors/SingGen.hs +++ b/ch13/doors/SingGen.hs @@ -15,7 +15,7 @@ #endif -import Data.Singletons.TH +import Data.Singletons.Base.TH $(singletons [d| data DoorState = Opened | Closed diff --git a/ch13/elevator/Elevator/Safe/Operations.hs b/ch13/elevator/Elevator/Safe/Operations.hs index c7e484e..d2cb60f 100644 --- a/ch13/elevator/Elevator/Safe/Operations.hs +++ b/ch13/elevator/Elevator/Safe/Operations.hs @@ -22,7 +22,7 @@ module Elevator.Safe.Operations where import Data.Type.Nat -import Data.Singletons.TH +import Data.Singletons.Base.TH import Control.Monad.Trans import qualified Elevator.LowLevel as LL diff --git a/ch15/opaleye/DBActions.hs b/ch15/opaleye/DBActions.hs index 481a35a..9398d39 100644 --- a/ch15/opaleye/DBActions.hs +++ b/ch15/opaleye/DBActions.hs @@ -37,13 +37,13 @@ filmsCategories conn films = catMaybes <$> mapM runSingle films runSelect conn (Q.filmCategories filmTitle) setRating :: Connection -> Rating -> Text -> IO Int64 -setRating conn r filmTitle = runUpdate_ conn (Q.setRating r filmTitle) +setRating conn r filmTitle = runUpdate conn (Q.setRating r filmTitle) findOrAddCategory :: Connection -> Text -> IO [CatId] findOrAddCategory conn catName = do cats <- runSelect conn (Q.catIdByName catName) case cats of - [] -> runInsert_ conn (Q.newCategory catName) + [] -> runInsert conn (Q.newCategory catName) (cid:_) -> pure [cid] isAssigned :: Connection -> CatId -> FilmId -> IO Bool @@ -56,7 +56,7 @@ assignUnlessAssigned conn cid fid = do b <- isAssigned conn cid fid case b of True -> pure 0 - False -> runInsert_ conn (Q.assignCategory cid fid) + False -> runInsert conn (Q.assignCategory cid fid) assignCategory :: Connection -> Text -> Text -> IO Int64 assignCategory conn catName filmTitle = do @@ -71,5 +71,5 @@ unassignCategory conn catName filmTitle = do catIds <- runSelect conn (Q.catIdByName catName) filmIds <- runSelect conn (Q.filmIdByTitle filmTitle) case (catIds, filmIds) of - ([cid], [fid]) -> runDelete_ conn (Q.unassignCategory cid fid) + ([cid], [fid]) -> runDelete conn (Q.unassignCategory cid fid) _ -> pure 0 diff --git a/ch15/opaleye/Tables.hs b/ch15/opaleye/Tables.hs index b1ac63d..9fa6f73 100644 --- a/ch15/opaleye/Tables.hs +++ b/ch15/opaleye/Tables.hs @@ -3,6 +3,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE TypeOperators #-} module Tables where @@ -25,8 +26,8 @@ instance DefaultFromField PGRating Rating where instance pgf ~ FieldNullable PGRating => Default ToFields Rating pgf where def = dimap fromRating - (unsafeCast "mpaa_rating") - (def :: ToFields Text (Field PGText)) + (unsafeCoerceColumn . unsafeCast "mpaa_rating") + (def :: ToFields Text (Field SqlText)) makeAdaptorAndInstanceInferrable "pFilmId" ''FilmId' makeAdaptorAndInstanceInferrable "pFilmLength" ''FilmLength' diff --git a/du/AppTypes.hs b/du/AppTypes.hs index d34b929..e7f10c7 100644 --- a/du/AppTypes.hs +++ b/du/AppTypes.hs @@ -17,7 +17,7 @@ data AppEnv = AppEnv { } initialEnv :: AppConfig -> AppEnv -initialEnv config @ AppConfig {..} = AppEnv { +initialEnv config@AppConfig {..} = AppEnv { cfg = config , path = basePath , depth = 0 diff --git a/expr/ShuntingYard.hs b/expr/ShuntingYard.hs index e9e181e..45a7765 100644 --- a/expr/ShuntingYard.hs +++ b/expr/ShuntingYard.hs @@ -3,6 +3,7 @@ module ShuntingYard (convertToExpr) where import Data.Char (isDigit, isSpace) import Data.List (groupBy) import Data.Foldable (traverse_) +import Control.Monad import Control.Monad.State import Expr diff --git a/expr/rpn/EvalRPNExcept.hs b/expr/rpn/EvalRPNExcept.hs index 7b1a72a..a8cd270 100644 --- a/expr/rpn/EvalRPNExcept.hs +++ b/expr/rpn/EvalRPNExcept.hs @@ -2,6 +2,7 @@ module EvalRPNExcept where +import Control.Monad import Control.Monad.State import Control.Monad.Reader import Control.Monad.Except diff --git a/expr/rpn/EvalRPNTrans.hs b/expr/rpn/EvalRPNTrans.hs index ff49a4e..f19b956 100644 --- a/expr/rpn/EvalRPNTrans.hs +++ b/expr/rpn/EvalRPNTrans.hs @@ -1,5 +1,6 @@ module EvalRPNTrans where +import Control.Monad import Control.Monad.State import Control.Applicative import Text.Read (readMaybe) diff --git a/expr/rpn/EvalRPNTrans2.hs b/expr/rpn/EvalRPNTrans2.hs index 3094d34..5807fc1 100644 --- a/expr/rpn/EvalRPNTrans2.hs +++ b/expr/rpn/EvalRPNTrans2.hs @@ -1,5 +1,6 @@ module EvalRPNTrans2 where +import Control.Monad import Control.Monad.State import Control.Applicative import Text.Read (readMaybe) diff --git a/hid-examples.cabal b/hid-examples.cabal index 6c4328e..fcd8811 100644 --- a/hid-examples.cabal +++ b/hid-examples.cabal @@ -1,10 +1,10 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.33.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack -- --- hash: cc0594af8853ca44b3768289d1945f8282faca9d7a799eb64e7960b6175122de +-- hash: 206a7b89a8cb55f3eab8ddd8ac3ce0d2a7d0d52e5601a8711abfc5c9782f5609 name: hid-examples version: 0.5 @@ -17,7 +17,8 @@ author: Vitaly Bragilevsky maintainer: Vitaly Bragilevsky license: BSD3 license-file: LICENSE -tested-with: GHC == 8.6.5, GHC == 8.8.3 +tested-with: + GHC == 8.6.5, GHC == 8.8.3, GHC == 9.4.7, GHC == 9.6.3 build-type: Simple extra-source-files: ChangeLog.md @@ -68,7 +69,7 @@ library empty ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 library contexts @@ -78,8 +79,8 @@ library contexts ch02 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 library expr-simple @@ -89,7 +90,7 @@ library expr-simple expr ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , text-show >=3.0 && <4 default-language: Haskell2010 @@ -100,8 +101,8 @@ library ipgen-lib ip/gen ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , hedgehog >=0.5 && <1.1 + base >=4.12 && <5 + , hedgehog >=0.5 && <1.5 , iplookup-lib default-language: Haskell2010 @@ -113,12 +114,13 @@ library iplookup-lib FastLookup hs-source-dirs: ip/lookup - other-extensions: TypeApplications + other-extensions: + TypeApplications ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-incomplete-uni-patterns build-depends: - base >=4.12 && <4.15 - , fingertree >=0.1 && <0.2 - , split >=0.2 && <0.3 + base >=4.12 && <5 + , fingertree ==0.1.* + , split ==0.2.* default-language: Haskell2010 library isprime-lib @@ -129,7 +131,7 @@ library isprime-lib ch09/isprime ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 library radar-lib @@ -139,7 +141,7 @@ library radar-lib ch02/radar ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 library rpc-lib @@ -152,21 +154,23 @@ library rpc-lib RemoteIO RemoteParser Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/rpc/lib ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , bytestring >=0.10 && <0.12 - , cereal >=0.5 && <0.6 - , connection >=0.3 && <0.4 - , exceptions >=0.10 && <0.11 + base >=4.12 && <5 + , bytestring >=0.10 && <0.13 + , cereal ==0.5.* + , crypton-connection ==0.3.* + , exceptions ==0.10.* , haskell-src-exts >=1.20 && <1.24 , haskell-src-meta >=0.6 && <0.9 - , mtl >=2.0 && <2.3 + , mtl >=2.0 && <2.4 , network >=2.8 && <3.2 , network-simple >=0.4.5 && <0.5 - , template-haskell >=2.13 && <2.17 + , template-haskell >=2.13 && <2.22 default-language: Haskell2010 library shunting-yard @@ -176,9 +180,9 @@ library shunting-yard expr ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , expr-simple - , mtl >=2.0 && <2.3 + , mtl >=2.0 && <2.4 , text-show >=3.0 && <4 default-language: Haskell2010 @@ -186,13 +190,15 @@ executable api-servant main-is: ch13/api/ApiServant.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - aeson >=1.2 && <1.6 - , base >=4.12 && <4.15 - , blaze-html >=0.9 && <0.10 + aeson >=1.2 && <2.3 + , base >=4.12 && <5 + , blaze-html ==0.9.* , servant-blaze >=0.7 && <0.10 - , servant-server >=0.14 && <0.19 + , servant-server >=0.14 && <0.21 , warp >=3.2 && <3.4 default-language: Haskell2010 @@ -200,67 +206,94 @@ executable api-stage0 main-is: ch13/api/Api0.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable api-stage1 main-is: ch13/api/Api1.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable api-stage2 main-is: ch13/api/Api2.hs other-modules: Paths_hid_examples - other-extensions: KindSignatures TypeOperators PolyKinds DataKinds TypeFamilies + autogen-modules: + Paths_hid_examples + other-extensions: + KindSignatures + TypeOperators + PolyKinds + DataKinds + TypeFamilies ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable api-stage3 main-is: ch13/api/Api3.hs other-modules: Paths_hid_examples - other-extensions: KindSignatures TypeOperators PolyKinds DataKinds TypeFamilies FlexibleInstances InstanceSigs ScopedTypeVariables + autogen-modules: + Paths_hid_examples + other-extensions: + KindSignatures + TypeOperators + PolyKinds + DataKinds + TypeFamilies + FlexibleInstances + InstanceSigs + ScopedTypeVariables ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable async-exc main-is: ch16/async-exc.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable basic-deriv main-is: basic-deriv.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/deriv/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable chars main-is: ch14/chars.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , streaming >=0.2.2 && <0.4 default-language: Haskell2010 @@ -268,44 +301,52 @@ executable coerce main-is: coerce.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/deriv/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable conc-hello main-is: ch16/conc-hello.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable copy main-is: ch14/copy.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , filepath >=1.4.1 && <1.5 - , resourcet >=1.2 && <1.3 + , resourcet >=1.2 && <1.4 , streaming >=0.2.2 && <0.4 - , streaming-bytestring >=0.1.7 && <0.3 + , streaming-bytestring >=0.1.7 && <0.4 default-language: Haskell2010 executable countzeros main-is: countzeros.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable covid @@ -314,134 +355,167 @@ executable covid CovidCSVParser CovidData Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch14/covid ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - attoparsec >=0.13 && <0.14 - , base >=4.12 && <4.15 - , bytestring >=0.10 && <0.12 - , containers >=0.5 && <0.7 - , lens >=4.17 && <4.20 - , resourcet >=1.2 && <1.3 + attoparsec >=0.13 && <0.15 + , base >=4.12 && <5 + , bytestring >=0.10 && <0.13 + , containers >=0.5 && <0.8 + , lens >=4.17 && <5.3 + , resourcet >=1.2 && <1.4 , streaming >=0.2.2 && <0.4 - , streaming-bytestring >=0.1.7 && <0.3 - , streaming-utils >=0.2 && <0.3 - , text >=1.2 && <1.3 + , streaming-bytestring >=0.1.7 && <0.4 + , streaming-utils ==0.2.* + , text >=1.2 && <2.2 , text-show >=3.0 && <4 - , time >=1.8 && <1.12 + , time >=1.8 && <1.13 default-language: Haskell2010 executable csv-simple main-is: ch14/csv-simple.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - attoparsec >=0.13 && <0.14 - , base >=4.12 && <4.15 - , bytestring >=0.10 && <0.12 - , resourcet >=1.2 && <1.3 + attoparsec >=0.13 && <0.15 + , base >=4.12 && <5 + , bytestring >=0.10 && <0.13 + , resourcet >=1.2 && <1.4 , streaming >=0.2.2 && <0.4 - , streaming-bytestring >=0.1.7 && <0.3 - , streaming-utils >=0.2 && <0.3 - , text >=1.2 && <1.3 + , streaming-bytestring >=0.1.7 && <0.4 + , streaming-utils ==0.2.* + , text >=1.2 && <2.2 default-language: Haskell2010 executable dicegame main-is: dicegame.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 - , random >=1.2 && <1.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 + , random ==1.2.* default-language: Haskell2010 executable div main-is: div.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch07 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , exceptions >=0.10 && <0.11 + base >=4.12 && <5 + , exceptions ==0.10.* default-language: Haskell2010 executable door main-is: ch13/doors/SingManual.hs other-modules: Paths_hid_examples - other-extensions: DataKinds GADTs TypeOperators KindSignatures StandaloneDeriving + autogen-modules: + Paths_hid_examples + other-extensions: + DataKinds + GADTs + TypeOperators + KindSignatures + StandaloneDeriving ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-unticked-promoted-constructors build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable door-gen main-is: ch13/doors/SingGen.hs other-modules: Paths_hid_examples - other-extensions: DataKinds GADTs TypeOperators KindSignatures StandaloneDeriving + autogen-modules: + Paths_hid_examples + other-extensions: + DataKinds + GADTs + TypeOperators + KindSignatures + StandaloneDeriving ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-unticked-promoted-constructors build-depends: - base >=4.12 && <4.15 - , singletons >=2.5 && <2.8 + base >=4.12 && <5 + , singletons ==3.0.* + , singletons-base >=3.0 && <3.4 default-language: Haskell2010 executable dots main-is: ch16/dots.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable dots-async main-is: ch16/dots-async.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 default-language: Haskell2010 executable dots-async-cancel main-is: ch16/dots-async-cancel.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 - , random >=1.2 && <1.3 + , base >=4.12 && <5 + , random ==1.2.* default-language: Haskell2010 executable dots-async-interrupted main-is: ch16/dots-async-interrupted.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 default-language: Haskell2010 executable dots-stm main-is: ch16/dots-stm.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 , stm >=2.4 && <2.6 default-language: Haskell2010 @@ -457,31 +531,40 @@ executable du FileCounter Utils Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: du - default-extensions: RecordWildCards NamedFieldPuns OverloadedStrings - other-extensions: GeneralizedNewtypeDeriving + default-extensions: + RecordWildCards + NamedFieldPuns + OverloadedStrings + other-extensions: + GeneralizedNewtypeDeriving ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , directory >=1.3 && <1.4 + base >=4.12 && <5 + , directory ==1.3.* , extra >=1.5 && <1.8 , filepath >=1.4.1 && <1.5 - , mtl >=2.0 && <2.3 - , optparse-applicative >=0.14 && <0.17 - , text >=1.2 && <1.3 + , mtl >=2.0 && <2.4 + , optparse-applicative >=0.14 && <0.19 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 - , unix-compat >=0.5 && <0.6 + , unix-compat >=0.5 && <0.8 default-language: Haskell2010 executable dynvalues-gadt main-is: ch11/dynvalues-gadt.hs other-modules: Paths_hid_examples - other-extensions: GADTs + autogen-modules: + Paths_hid_examples + other-extensions: + GADTs ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable elevator @@ -496,11 +579,12 @@ executable elevator ch13/elevator/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-unticked-promoted-constructors build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , dec >=0.0.3 && <0.1 - , fin >=0.1 && <0.3 - , mtl >=2.0 && <2.3 - , singletons >=2.5 && <2.8 + , fin >=0.1 && <0.4 + , mtl >=2.0 && <2.4 + , singletons ==3.0.* + , singletons-base >=3.0 && <3.4 default-language: Haskell2010 executable evalrpn1 @@ -511,8 +595,8 @@ executable evalrpn1 expr/rpn ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable evalrpn2 @@ -523,8 +607,8 @@ executable evalrpn2 expr/rpn ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable evalrpn3 @@ -534,33 +618,44 @@ executable evalrpn3 EvalRPNTrans2 hs-source-dirs: expr/rpn - other-extensions: FlexibleInstances MultiParamTypeClasses UndecidableInstances InstanceSigs LambdaCase + other-extensions: + FlexibleInstances + MultiParamTypeClasses + UndecidableInstances + InstanceSigs + LambdaCase ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 - , transformers >=0.5 && <0.6 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 + , transformers >=0.5 && <0.7 default-language: Haskell2010 executable expr-gadt main-is: expr/gadts/Main.hs other-modules: Paths_hid_examples - other-extensions: GADTSyntax GADTs + autogen-modules: + Paths_hid_examples + other-extensions: + GADTSyntax + GADTs ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-type-defaults -Wno-missing-signatures build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable filecount main-is: filecount.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , extra >=1.5 && <1.8 default-language: Haskell2010 @@ -568,26 +663,32 @@ executable gcd main-is: gcd.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable genSQL main-is: genSQL.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 - other-extensions: OverloadedStrings ViewPatterns + other-extensions: + OverloadedStrings + ViewPatterns ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 - , text >=1.2 && <1.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 + , text >=1.2 && <2.2 default-language: Haskell2010 executable generic-sql @@ -595,21 +696,26 @@ executable generic-sql other-modules: GenericSQL Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/genSQL/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , text >=1.2 && <1.3 + base >=4.12 && <5 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 default-language: Haskell2010 executable hasql other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 + default-language: Haskell2010 if flag(with-pg) main-is: Main.hs other-modules: @@ -621,23 +727,25 @@ executable hasql ch15/hasql ch15 build-depends: - hasql >=1.3 && <1.5 - , hasql-th >=0.4 && <0.5 - , mtl >=2.0 && <2.3 + hasql >=1.3 && <1.7 + , hasql-th ==0.4.* + , mtl >=2.0 && <2.4 , profunctors >=5.3 && <5.7 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 - , vector >=0.11 && <0.13 + , vector >=0.11 && <0.14 else main-is: empty/Main.hs - default-language: Haskell2010 executable hdbc other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 + default-language: Haskell2010 if flag(with-pg) main-is: hdbc.hs other-modules: @@ -646,19 +754,18 @@ executable hdbc ch15 build-depends: HDBC >=2.3 && <2.5 - , HDBC-postgresql >=2.3 && <2.5 + , HDBC-postgresql >=2.4 && <2.6 , convertible >=1.0 && <1.2 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 else main-is: empty/Main.hs - default-language: Haskell2010 executable hello main-is: intro/hello.hs ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable hello-th @@ -669,62 +776,72 @@ executable hello-th ch12/th/hello/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , template-haskell >=2.13 && <2.17 + base >=4.12 && <5 + , template-haskell >=2.13 && <2.22 default-language: Haskell2010 executable interleaving main-is: ch16/interleaving.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable ioref main-is: ioref.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable ipgen main-is: ip/gen/Main.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , exceptions >=0.10 && <0.11 - , hedgehog >=0.5 && <1.1 + base >=4.12 && <5 + , exceptions ==0.10.* + , hedgehog >=0.5 && <1.5 , ipgen-lib - , optparse-applicative >=0.14 && <0.17 + , optparse-applicative >=0.14 && <0.19 default-language: Haskell2010 executable iplookup main-is: ip/lookup/Main.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , exceptions >=0.10 && <0.11 + base >=4.12 && <5 + , exceptions ==0.10.* , iplookup-lib - , optparse-applicative >=0.14 && <0.17 + , optparse-applicative >=0.14 && <0.19 default-language: Haskell2010 executable iplookup-simulation main-is: ip/iplookup-simulation.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , iplookup-lib default-language: Haskell2010 @@ -736,45 +853,51 @@ executable isprime ch09/isprime ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , isprime-lib - , timeit >=2.0 && <2.1 + , timeit ==2.0.* default-language: Haskell2010 executable lens-ex main-is: ch14/lens-ex.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , lens >=4.17 && <4.20 + base >=4.12 && <5 + , lens >=4.17 && <5.3 default-language: Haskell2010 executable logging main-is: logging.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch07 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , monad-logger >=0.3 && <0.4 - , mtl >=2.0 && <2.3 - , text >=1.2 && <1.3 - , transformers >=0.5 && <0.6 + base >=4.12 && <5 + , monad-logger ==0.3.* + , mtl >=2.0 && <2.4 + , text >=1.2 && <2.2 + , transformers >=0.5 && <0.7 default-language: Haskell2010 executable maybe main-is: maybe.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable mstr-literals @@ -785,30 +908,34 @@ executable mstr-literals ch12/th/mstr-lits/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-missing-signatures -Wno-incomplete-patterns build-depends: - base >=4.12 && <4.15 - , template-haskell >=2.13 && <2.17 + base >=4.12 && <5 + , template-haskell >=2.13 && <2.22 default-language: Haskell2010 executable mvar-deadlocks main-is: ch16/mvar-deadlocks.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded -Wno-unused-do-bind build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 default-language: Haskell2010 executable newtype main-is: newtype.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/deriv/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable nummod-rank-n @@ -816,20 +943,26 @@ executable nummod-rank-n other-modules: NumUtils Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch11/nummod-rank-n/ - other-extensions: RankNTypes + other-extensions: + RankNTypes ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable opaleye other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 + default-language: Haskell2010 if flag(with-pg) main-is: Main.hs other-modules: @@ -842,25 +975,26 @@ executable opaleye ch15/opaleye ch15 build-depends: - bytestring >=0.10 && <0.12 - , opaleye >=0.7 && <0.8 + bytestring >=0.10 && <0.13 + , opaleye >=0.8 && <0.11 , postgresql-simple >=0.5 && <0.7 - , product-profunctors >=0.11 && <0.12 + , product-profunctors ==0.11.* , profunctors >=5.3 && <5.7 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 else main-is: empty/Main.hs - default-language: Haskell2010 executable ordered-threads main-is: ch16/ordered-threads.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 , stm >=2.4 && <2.6 default-language: Haskell2010 @@ -872,7 +1006,7 @@ executable person-derived ch02/person ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable person-implemented @@ -883,7 +1017,7 @@ executable person-implemented ch02/person ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable person-text @@ -894,16 +1028,19 @@ executable person-text ch02/person ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , text-show >=3.0 && <4 default-language: Haskell2010 executable pg-simple other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 + default-language: Haskell2010 if flag(with-pg) main-is: pg-simple.hs other-modules: @@ -912,13 +1049,12 @@ executable pg-simple hs-source-dirs: ch15 build-depends: - bytestring >=0.10 && <0.12 + bytestring >=0.10 && <0.13 , postgresql-simple >=0.5 && <0.7 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 else main-is: empty/Main.hs - default-language: Haskell2010 executable ping-client main-is: client.hs @@ -928,9 +1064,9 @@ executable ping-client ch12/rpc/ping/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , cereal >=0.5 && <0.6 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , cereal ==0.5.* + , mtl >=2.0 && <2.4 , rpc-lib default-language: Haskell2010 @@ -942,9 +1078,9 @@ executable ping-server ch12/rpc/ping/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , cereal >=0.5 && <0.6 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , cereal ==0.5.* + , mtl >=2.0 && <2.4 , rpc-lib default-language: Haskell2010 @@ -956,8 +1092,8 @@ executable predicates ch12/th/predicates/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-missing-signatures -Wno-incomplete-patterns build-depends: - base >=4.12 && <4.15 - , template-haskell >=2.13 && <2.17 + base >=4.12 && <5 + , template-haskell >=2.13 && <2.22 default-language: Haskell2010 executable prefix-postfix @@ -969,8 +1105,8 @@ executable prefix-postfix expr ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 , text-show >=3.0 && <4 default-language: Haskell2010 @@ -982,20 +1118,22 @@ executable projectors ch12/th/projectors/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , template-haskell >=2.13 && <2.17 + base >=4.12 && <5 + , template-haskell >=2.13 && <2.22 default-language: Haskell2010 executable pub-sub main-is: ch16/pub-sub.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 , stm >=2.4 && <2.6 - , stm-chans >=3.0 && <3.1 + , stm-chans ==3.0.* default-language: Haskell2010 executable radar @@ -1004,10 +1142,11 @@ executable radar Radar hs-source-dirs: ch02/radar - other-extensions: DeriveAnyClass + other-extensions: + DeriveAnyClass ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , fmt >=0.5 && <0.7 default-language: Haskell2010 @@ -1015,13 +1154,16 @@ executable reader main-is: reader.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 - other-extensions: NamedFieldPuns + other-extensions: + NamedFieldPuns ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable rpnexpr @@ -1030,23 +1172,26 @@ executable rpnexpr EvalRPNExcept hs-source-dirs: expr/rpn - other-extensions: OverloadedStrings + other-extensions: + OverloadedStrings ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 - , text >=1.2 && <1.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 - , transformers >=0.5 && <0.6 + , transformers >=0.5 && <0.7 default-language: Haskell2010 executable simple-streaming main-is: ch14/simple-streaming.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable stockquotes @@ -1058,101 +1203,121 @@ executable stockquotes QuoteData StatReport Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: stockquotes - other-extensions: RecordWildCards OverloadedStrings DeriveGeneric DeriveAnyClass + other-extensions: + RecordWildCards + OverloadedStrings + DeriveGeneric + DeriveAnyClass ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: Chart >=1.8 && <1.10 , Chart-diagrams >=1.8 && <1.10 - , base >=4.12 && <4.15 + , base >=4.12 && <5 , blaze-colonnade >=1.1 && <1.3 - , blaze-html >=0.9 && <0.10 - , bytestring >=0.10 && <0.12 - , cassava >=0.5 && <0.6 + , blaze-html ==0.9.* + , bytestring >=0.10 && <0.13 + , cassava ==0.5.* , colonnade >=1.1 && <1.3 , fmt >=0.5 && <0.7 - , optparse-applicative >=0.14 && <0.17 - , text >=1.2 && <1.3 - , time >=1.8 && <1.12 + , optparse-applicative >=0.14 && <0.19 + , text >=1.2 && <2.2 + , time >=1.8 && <1.13 default-language: Haskell2010 executable strategies main-is: strategies.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/deriv/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - aeson >=1.2 && <1.6 - , base >=4.12 && <4.15 + aeson >=1.2 && <2.3 + , base >=4.12 && <5 default-language: Haskell2010 executable stream main-is: ch14/stream.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable stref main-is: stref.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable sum-numbers main-is: ch16/sum-numbers.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 default-language: Haskell2010 executable sum-numbers-many-workers main-is: ch16/sum-numbers-many-workers.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 , stm >=2.4 && <2.6 - , stm-chans >=3.0 && <3.1 + , stm-chans ==3.0.* default-language: Haskell2010 executable sumlist main-is: sumlist.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable sumtab main-is: ch14/sumtab.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , extra >=1.5 && <1.8 , streaming >=0.2.2 && <0.4 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 default-language: Haskell2010 @@ -1166,33 +1331,43 @@ executable suntimes SunTimes Types Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: suntimes - default-extensions: OverloadedStrings - other-extensions: RecordWildCards DeriveGeneric + default-extensions: + OverloadedStrings + other-extensions: + RecordWildCards + DeriveGeneric ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - aeson >=1.2 && <1.6 - , base >=4.12 && <4.15 - , bytestring >=0.10 && <0.12 - , exceptions >=0.10 && <0.11 + aeson >=1.2 && <2.3 + , base >=4.12 && <5 + , bytestring >=0.10 && <0.13 + , exceptions ==0.10.* , http-client >=0.4 && <0.8 - , mtl >=2.0 && <2.3 - , optparse-applicative >=0.14 && <0.17 - , req >=2.0 && <3.10 - , text >=1.2 && <1.3 - , time >=1.8 && <1.12 - , transformers >=0.5 && <0.6 + , mtl >=2.0 && <2.4 + , optparse-applicative >=0.14 && <0.19 + , req >=2.0 && <3.14 + , text >=1.2 && <2.2 + , time >=1.8 && <1.13 + , transformers >=0.5 && <0.7 default-language: Haskell2010 executable temp-kinds main-is: temp-kinds.hs hs-source-dirs: ch11/temperature - other-extensions: GeneralizedNewtypeDeriving ScopedTypeVariables PolyKinds AllowAmbiguousTypes TypeApplications + other-extensions: + GeneralizedNewtypeDeriving + ScopedTypeVariables + PolyKinds + AllowAmbiguousTypes + TypeApplications ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-unticked-promoted-constructors build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable temp-proxies @@ -1202,10 +1377,14 @@ executable temp-proxies UnitNameProxies hs-source-dirs: ch11/temperature - other-extensions: GeneralizedNewtypeDeriving ScopedTypeVariables PolyKinds InstanceSigs + other-extensions: + GeneralizedNewtypeDeriving + ScopedTypeVariables + PolyKinds + InstanceSigs ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable temp-type-apps @@ -1215,20 +1394,27 @@ executable temp-type-apps UnitNameTypeApps hs-source-dirs: ch11/temperature - other-extensions: GeneralizedNewtypeDeriving ScopedTypeVariables PolyKinds AllowAmbiguousTypes TypeApplications + other-extensions: + GeneralizedNewtypeDeriving + ScopedTypeVariables + PolyKinds + AllowAmbiguousTypes + TypeApplications ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable tree-async main-is: ch16/tree-async.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: async >=2.0 && <2.3 - , base >=4.12 && <4.15 + , base >=4.12 && <5 default-language: Haskell2010 executable type-families @@ -1239,13 +1425,17 @@ executable type-families Unescape XListable Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch11/type-families - other-extensions: TypeFamilies FlexibleInstances + other-extensions: + TypeFamilies + FlexibleInstances ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-type-defaults build-depends: - base >=4.12 && <4.15 - , containers >=0.5 && <0.7 + base >=4.12 && <5 + , containers >=0.5 && <0.8 default-language: Haskell2010 executable type-lits @@ -1255,28 +1445,37 @@ executable type-lits SuffixedStrings hs-source-dirs: ch11/type-lits - other-extensions: DataKinds KindSignatures ScopedTypeVariables + other-extensions: + DataKinds + KindSignatures + ScopedTypeVariables ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable type-operators main-is: ch11/type-operators.hs - other-extensions: TypeOperators NoStarIsType + other-extensions: + TypeOperators + NoStarIsType ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable unboxed main-is: ch09/unboxed.hs other-modules: Paths_hid_examples - other-extensions: UnboxedTuples UnboxedSums + autogen-modules: + Paths_hid_examples + other-extensions: + UnboxedTuples + UnboxedSums ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable unsafe-elevator @@ -1288,30 +1487,34 @@ executable unsafe-elevator ch13/elevator/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 default-language: Haskell2010 executable via main-is: via.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/deriv/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable view-generic main-is: view-generic.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch12/generics/ ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-missing-signatures build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 default-language: Haskell2010 executable vocab1 @@ -1320,8 +1523,8 @@ executable vocab1 ch01 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , text >=1.2 && <1.3 + base >=4.12 && <5 + , text >=1.2 && <2.2 default-language: Haskell2010 executable vocab2 @@ -1330,43 +1533,48 @@ executable vocab2 ch01 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , text >=1.2 && <1.3 + base >=4.12 && <5 + , text >=1.2 && <2.2 default-language: Haskell2010 executable vocab3 main-is: vocab3.hs hs-source-dirs: ch01 - other-extensions: OverloadedStrings + other-extensions: + OverloadedStrings ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , fmt >=0.5 && <0.7 - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 default-language: Haskell2010 executable wait-completion main-is: ch16/wait-completion.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -threaded build-depends: - base >=4.12 && <4.15 - , random >=1.2 && <1.3 + base >=4.12 && <5 + , random ==1.2.* default-language: Haskell2010 executable weapons main-is: weapons.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: ch05 ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , mtl >=2.0 && <2.3 - , random >=1.2 && <1.3 + base >=4.12 && <5 + , mtl >=2.0 && <2.4 + , random ==1.2.* default-language: Haskell2010 test-suite expr-simple-test @@ -1376,7 +1584,7 @@ test-suite expr-simple-test tests/expr ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , expr-simple , hint >=0.7 && <0.10 , text-show >=3.0 && <4 @@ -1387,11 +1595,13 @@ test-suite iplookup-doctest main-is: tests/iplookup-doctest/Doctests.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , doctest >=0.12 && <0.19 - , split >=0.2 && <0.3 + base >=4.12 && <5 + , doctest >=0.12 && <0.23 + , split ==0.2.* default-language: Haskell2010 test-suite iplookup-test @@ -1403,19 +1613,22 @@ test-suite iplookup-test ParseIPSpec Props Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: tests/iplookup ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans -Wno-type-defaults build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , filepath >=1.4.1 && <1.5 - , hedgehog >=0.5 && <1.1 + , hedgehog >=0.5 && <1.5 + , hspec >=2.10 && <2.12 , ipgen-lib , iplookup-lib - , tasty >=0.11 && <1.5 - , tasty-golden >=2.3 && <2.4 - , tasty-hedgehog >=0.1 && <1.1 - , tasty-hspec >=1.1 && <1.2 + , tasty >=0.11 && <1.6 + , tasty-golden ==2.3.* + , tasty-hedgehog >=0.1 && <1.5 + , tasty-hspec >=1.1 && <1.3 default-language: Haskell2010 test-suite radar-test @@ -1425,9 +1638,9 @@ test-suite radar-test tests/radar ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , radar-lib - , random >=1.2 && <1.3 + , random ==1.2.* default-language: Haskell2010 test-suite shunting-yard-test @@ -1437,9 +1650,9 @@ test-suite shunting-yard-test tests/expr ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 + base >=4.12 && <5 , shunting-yard - , text >=1.2 && <1.3 + , text >=1.2 && <2.2 , text-show >=3.0 && <4 default-language: Haskell2010 @@ -1455,13 +1668,15 @@ benchmark iplookup-bench Data NFUtils Paths_hid_examples + autogen-modules: + Paths_hid_examples hs-source-dirs: benchmarks/iplookup ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , criterion >=1.4 && <1.6 - , deepseq >=1.3 && <1.5 + base >=4.12 && <5 + , criterion >=1.4 && <1.7 + , deepseq >=1.3 && <1.6 , iplookup-lib default-language: Haskell2010 @@ -1470,9 +1685,11 @@ benchmark primcheck main-is: benchmarks/primcheck.hs other-modules: Paths_hid_examples + autogen-modules: + Paths_hid_examples ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wno-unused-top-binds -Wno-orphans build-depends: - base >=4.12 && <4.15 - , criterion >=1.4 && <1.6 + base >=4.12 && <5 + , criterion >=1.4 && <1.7 , isprime-lib default-language: Haskell2010 diff --git a/package.yaml b/package.yaml index 57c549b..5e54675 100644 --- a/package.yaml +++ b/package.yaml @@ -27,9 +27,9 @@ data-files: - data/tests/iplookup/*.* - data/benchmarks/iplookup/*.* -tested-with: GHC == 8.6.5, GHC == 8.8.3 +tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 9.4.7, GHC == 9.6.3 -dependencies: base >=4.12 && <4.15 +dependencies: base >=4.12 && <5 flags: with-pg: @@ -56,12 +56,12 @@ executables: source-dirs: ch01 main: vocab1.hs other-modules: [] - dependencies: text >=1.2 && <1.3 + dependencies: text >=1.2 && <2.2 vocab2: source-dirs: ch01 main: vocab2.hs other-modules: [] - dependencies: text >=1.2 && <1.3 + dependencies: text >=1.2 && <2.2 vocab3: source-dirs: ch01 main: vocab3.hs @@ -69,7 +69,7 @@ executables: other-extensions: - OverloadedStrings dependencies: - - text >=1.2 && <1.3 + - text >=1.2 && <2.2 - fmt >=0.5 && <0.7 # Chapter 2 # 2.1 @@ -106,11 +106,11 @@ executables: - DeriveGeneric - DeriveAnyClass dependencies: - - bytestring >=0.10 && <0.12 + - bytestring >=0.10 && <0.13 - blaze-html >=0.9 && <0.10 - - optparse-applicative >=0.14 && <0.17 - - time >=1.8 && <1.12 - - text >=1.2 && <1.3 + - optparse-applicative >=0.14 && <0.19 + - time >=1.8 && <1.13 + - text >=1.2 && <2.2 - fmt >=0.5 && <0.7 - Chart >=1.8 && <1.10 - Chart-diagrams >=1.8 && <1.10 @@ -127,7 +127,7 @@ executables: other-extensions: - NamedFieldPuns dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 genSQL: source-dirs: ch05 main: genSQL.hs @@ -135,23 +135,23 @@ executables: - OverloadedStrings - ViewPatterns dependencies: - - text >=1.2 && <1.3 - - mtl >=2.0 && <2.3 + - text >=1.2 && <2.2 + - mtl >=2.0 && <2.4 gcd: source-dirs: ch05 main: gcd.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 sumlist: source-dirs: ch05 main: sumlist.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 weapons: source-dirs: ch05 main: weapons.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - random >=1.2 && <1.3 prefix-postfix: source-dirs: expr @@ -159,12 +159,12 @@ executables: other-modules: [Expr, ShuntingYard] dependencies: - text-show >=3.0 && <4 - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 dicegame: source-dirs: ch05 main: dicegame.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - random >=1.2 && <1.3 ioref: source-dirs: ch05 @@ -186,20 +186,20 @@ executables: main: evalrpn1.hs other-modules: [EvalRPN] dependencies: - - mtl >= 2.0 && < 2.3 + - mtl >= 2.0 && < 2.4 evalrpn2: source-dirs: expr/rpn main: evalrpn2.hs other-modules: [EvalRPNTrans] dependencies: - - mtl >= 2.0 && < 2.3 + - mtl >= 2.0 && < 2.4 evalrpn3: source-dirs: expr/rpn main: evalrpn3.hs other-modules: [MyMaybeT, EvalRPNTrans2] dependencies: - - mtl >= 2.0 && < 2.3 - - transformers >= 0.5 && < 0.6 + - mtl >= 2.0 && < 2.4 + - transformers >=0.5 && <0.7 other-extensions: - FlexibleInstances - MultiParamTypeClasses @@ -210,12 +210,12 @@ executables: source-dirs: du main: Main.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - filepath >= 1.4.1 && < 1.5 - directory >= 1.3 && < 1.4 - - unix-compat >= 0.5 && < 0.6 - - optparse-applicative >= 0.14 && < 0.17 - - text >=1.2 && <1.3 + - unix-compat >= 0.5 && < 0.8 + - optparse-applicative >= 0.14 && < 0.19 + - text >=1.2 && <2.2 - text-show >=3.0 && <4 - extra >=1.5 && <1.8 default-extensions: @@ -233,9 +233,9 @@ executables: other-extensions: - OverloadedStrings dependencies: - - mtl >= 2.0 && < 2.3 - - transformers >= 0.5 && < 0.6 - - text >=1.2 && <1.3 + - mtl >= 2.0 && < 2.4 + - transformers >=0.5 && <0.7 + - text >=1.2 && <2.2 - text-show >=3.0 && <4 div: source-dirs: ch07 @@ -246,16 +246,16 @@ executables: source-dirs: suntimes main: Main.hs dependencies: - - mtl >= 2.0 && < 2.3 - - transformers >= 0.5 && < 0.6 - - time >=1.8 && <1.12 - - text >=1.2 && <1.3 + - mtl >= 2.0 && < 2.4 + - transformers >=0.5 && <0.7 + - time >=1.8 && <1.13 + - text >=1.2 && <2.2 - exceptions >= 0.10 && < 0.11 - - aeson >= 1.2 && < 1.6 - - req >= 2.0 && < 3.10 + - aeson >= 1.2 && < 2.3 + - req >= 2.0 && < 3.14 - http-client >= 0.4 && < 0.8 - - optparse-applicative >= 0.14 && < 0.17 - - bytestring >= 0.10 && < 0.12 + - optparse-applicative >= 0.14 && < 0.19 + - bytestring >= 0.10 && < 0.13 default-extensions: - OverloadedStrings other-extensions: @@ -266,23 +266,23 @@ executables: main: logging.hs dependencies: - monad-logger >= 0.3 && < 0.4 - - mtl >= 2.0 && < 2.3 - - transformers >= 0.5 && < 0.6 - - text >=1.2 && <1.3 + - mtl >= 2.0 && < 2.4 + - transformers >=0.5 && <0.7 + - text >=1.2 && <2.2 # Chapter 8 iplookup: main: ip/lookup/Main.hs dependencies: - exceptions >= 0.10 && < 0.11 - - optparse-applicative >= 0.14 && < 0.17 + - optparse-applicative >= 0.14 && < 0.19 - iplookup-lib ipgen: main: ip/gen/Main.hs dependencies: - ipgen-lib - exceptions >= 0.10 && < 0.11 - - optparse-applicative >= 0.14 && < 0.17 - - hedgehog >= 0.5 && < 1.1 + - optparse-applicative >= 0.14 && < 0.19 + - hedgehog >= 0.5 && < 1.5 # Chapter 9 unboxed: main: ch09/unboxed.hs @@ -355,7 +355,7 @@ executables: ghc-options: -Wno-type-defaults dependencies: - - containers >= 0.5 && < 0.7 + - containers >= 0.5 && < 0.8 dynvalues-gadt: main: ch11/dynvalues-gadt.hs other-extensions: @@ -382,7 +382,7 @@ executables: source-dirs: ch12/deriv/ main: strategies.hs dependencies: - - aeson >= 1.2 && < 1.6 + - aeson >= 1.2 && < 2.3 coerce: source-dirs: ch12/deriv/ main: coerce.hs @@ -390,7 +390,7 @@ executables: source-dirs: ch12/deriv/ main: newtype.hs dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 via: source-dirs: ch12/deriv/ main: via.hs @@ -404,7 +404,7 @@ executables: source-dirs: ch12/genSQL/ main: Main.hs dependencies: - - text >=1.2 && <1.3 + - text >=1.2 && <2.2 - text-show >=3.0 && <4 # 12.3 hello-th: @@ -412,19 +412,19 @@ executables: main: Main.hs other-modules: [ Hello ] dependencies: - - template-haskell >=2.13 && <2.17 + - template-haskell >=2.13 && <2.22 projectors: source-dirs: ch12/th/projectors/ main: Main.hs other-modules: [ Projectors ] dependencies: - - template-haskell >=2.13 && <2.17 + - template-haskell >=2.13 && <2.22 predicates: source-dirs: ch12/th/predicates/ main: Main.hs other-modules: [ Predicates ] dependencies: - - template-haskell >=2.13 && <2.17 + - template-haskell >=2.13 && <2.22 ghc-options: - -Wno-missing-signatures - -Wno-incomplete-patterns @@ -433,7 +433,7 @@ executables: main: Main.hs other-modules: [ Str ] dependencies: - - template-haskell >=2.13 && <2.17 + - template-haskell >=2.13 && <2.22 ghc-options: - -Wno-missing-signatures - -Wno-incomplete-patterns @@ -443,7 +443,7 @@ executables: other-modules: [ PingCommon ] dependencies: - rpc-lib - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - cereal >= 0.5 && <0.6 ping-client: source-dirs: ch12/rpc/ping/ @@ -451,7 +451,7 @@ executables: other-modules: [ PingCommon ] dependencies: - rpc-lib - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - cereal >= 0.5 && <0.6 # Chapter 13 api-stage0: @@ -480,17 +480,17 @@ executables: api-servant: main: ch13/api/ApiServant.hs dependencies: - - servant-server >=0.14 && <0.19 + - servant-server >=0.14 && <0.21 - servant-blaze >=0.7 && <0.10 - warp >=3.2 && < 3.4 - - aeson >= 1.2 && < 1.6 + - aeson >= 1.2 && < 2.3 - blaze-html >=0.9 && <0.10 unsafe-elevator: source-dirs: ch13/elevator/ main: UseUnsafe.hs other-modules: [Elevator.LowLevel, Elevator.Unsafe] dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 door: main: ch13/doors/SingManual.hs other-extensions: @@ -510,7 +510,8 @@ executables: - KindSignatures - StandaloneDeriving dependencies: - - singletons >= 2.5 && < 2.8 + - singletons >= 3.0 && < 3.1 + - singletons-base >= 3.0 && < 3.4 ghc-options: - -Wno-unticked-promoted-constructors elevator: @@ -523,10 +524,11 @@ executables: - Elevator.Safe.Operations - Elevator.Safe.Moves dependencies: - - fin >= 0.1 && < 0.3 + - fin >= 0.1 && < 0.4 - dec >= 0.0.3 && < 0.1 - - singletons >= 2.5 && < 2.8 - - mtl >=2.0 && <2.3 + - singletons >= 3.0 && < 3.1 + - singletons-base >= 3.0 && < 3.4 + - mtl >=2.0 && <2.4 ghc-options: - -Wno-unticked-promoted-constructors # Chapter 14 @@ -539,7 +541,7 @@ executables: dependencies: - streaming >=0.2.2 && <0.4 - extra >=1.5 && <1.8 - - text >=1.2 && <1.3 + - text >=1.2 && <2.2 - text-show >=3.0 && <4 chars: main: ch14/chars.hs @@ -549,38 +551,38 @@ executables: main: ch14/copy.hs dependencies: - streaming >=0.2.2 && <0.4 - - streaming-bytestring >=0.1.7 && <0.3 - - resourcet >=1.2 && <1.3 + - streaming-bytestring >=0.1.7 && <0.4 + - resourcet >=1.2 && <1.4 - filepath >= 1.4.1 && < 1.5 csv-simple: main: ch14/csv-simple.hs dependencies: - - text >=1.2 && <1.3 - - attoparsec >=0.13 && <0.14 - - bytestring >=0.10 && <0.12 + - text >=1.2 && <2.2 + - attoparsec >=0.13 && <0.15 + - bytestring >=0.10 && <0.13 - streaming-utils >=0.2 && <0.3 - - streaming-bytestring >=0.1.7 && <0.3 + - streaming-bytestring >=0.1.7 && <0.4 - streaming >=0.2.2 && <0.4 - - resourcet >=1.2 && <1.3 + - resourcet >=1.2 && <1.4 lens-ex: main: ch14/lens-ex.hs dependencies: - - lens >= 4.17 && < 4.20 + - lens >= 4.17 && < 5.3 covid: source-dirs: ch14/covid main: Main.hs dependencies: - - bytestring >=0.10 && <0.12 - - time >=1.8 && <1.12 - - text >=1.2 && <1.3 + - bytestring >=0.10 && <0.13 + - time >=1.8 && <1.13 + - text >=1.2 && <2.2 - text-show >=3.0 && <4 - - containers >= 0.5 && < 0.7 - - lens >= 4.17 && < 4.20 + - containers >= 0.5 && < 0.8 + - lens >= 4.17 && < 5.3 - streaming-utils >=0.2 && <0.3 - - streaming-bytestring >=0.1.7 && <0.3 + - streaming-bytestring >=0.1.7 && <0.4 - streaming >=0.2.2 && <0.4 - - resourcet >=1.2 && <1.3 - - attoparsec >=0.13 && <0.14 + - resourcet >=1.2 && <1.4 + - attoparsec >=0.13 && <0.15 # Chapter 15 hdbc: when: @@ -591,9 +593,9 @@ executables: other-modules: [FilmInfo.Data] dependencies: - HDBC >= 2.3 && < 2.5 - - HDBC-postgresql >= 2.3 && < 2.5 + - HDBC-postgresql >= 2.4 && < 2.6 - convertible >= 1.0 && < 1.2 - - text >= 1.2 && < 1.3 + - text >= 1.2 && < 2.2 - text-show >= 3.0 && < 4 else: main: empty/Main.hs @@ -606,8 +608,8 @@ executables: other-modules: [FilmInfo.Data, FilmInfo.FromField] dependencies: - postgresql-simple >= 0.5 && < 0.7 - - bytestring >= 0.10 && < 0.12 - - text >= 1.2 && < 1.3 + - bytestring >= 0.10 && < 0.13 + - text >= 1.2 && < 2.2 - text-show >= 3.0 && < 4 else: main: empty/Main.hs @@ -623,13 +625,13 @@ executables: - Sessions - DBActions dependencies: - - hasql >= 1.3 && < 1.5 + - hasql >= 1.3 && < 1.7 - hasql-th >= 0.4 && < 0.5 - - vector >= 0.11 && < 0.13 - - text >= 1.2 && < 1.3 + - vector >= 0.11 && < 0.14 + - text >= 1.2 && < 2.2 - text-show >= 3.0 && < 4 - profunctors >= 5.3 && < 5.7 - - mtl >= 2.0 && < 2.3 + - mtl >= 2.0 && < 2.4 else: main: empty/Main.hs opaleye: @@ -645,13 +647,13 @@ executables: - Queries - DBActions dependencies: - - opaleye >= 0.7 && < 0.8 + - opaleye >= 0.8 && < 0.11 - postgresql-simple >= 0.5 && < 0.7 - - text >= 1.2 && < 1.3 + - text >= 1.2 && < 2.2 - text-show >= 3.0 && < 4 - product-profunctors >= 0.11 && < 0.12 - profunctors >= 5.3 && < 5.7 - - bytestring >= 0.10 && < 0.12 + - bytestring >= 0.10 && < 0.13 else: main: empty/Main.hs # Chapter 16 @@ -753,7 +755,7 @@ internal-libraries: exposed-modules: Contexts other-modules: [] dependencies: - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 # Chapter 5 shunting-yard: source-dirs: expr @@ -761,7 +763,7 @@ internal-libraries: other-modules: [] dependencies: - expr-simple - - mtl >=2.0 && <2.3 + - mtl >=2.0 && <2.4 - text-show >=3.0 && <4 # Chapter 8 iplookup-lib: @@ -786,7 +788,7 @@ internal-libraries: other-modules: [] dependencies: - iplookup-lib - - hedgehog >= 0.5 && < 1.1 + - hedgehog >= 0.5 && < 1.5 # Chapter 9 isprime-lib: source-dirs: ch09/isprime @@ -802,14 +804,14 @@ internal-libraries: - ServerUtils - RpcCommon dependencies: - - bytestring >=0.10 && <0.12 - - mtl >=2.0 && <2.3 + - bytestring >=0.10 && <0.13 + - mtl >=2.0 && <2.4 - cereal >= 0.5 && <0.6 - network >= 2.8 && <3.2 - - connection >= 0.3 && <0.4 + - crypton-connection >= 0.3 && <0.4 - network-simple >=0.4.5 && <0.5 - exceptions >= 0.10 && < 0.11 - - template-haskell >= 2.13 && <2.17 + - template-haskell >= 2.13 && <2.22 - haskell-src-exts >= 1.20 && <1.24 - haskell-src-meta >= 0.6 && < 0.9 tests: @@ -837,7 +839,7 @@ tests: dependencies: - shunting-yard - text-show >=3.0 && <4 - - text >=1.2 && <1.3 + - text >=1.2 && <2.2 # Chapter 8 iplookup-test: main: Test.hs @@ -845,10 +847,11 @@ tests: dependencies: - iplookup-lib - ipgen-lib - - tasty >= 0.11 && < 1.5 - - tasty-hspec >= 1.1 && < 1.2 - - tasty-hedgehog >= 0.1 && < 1.1 - - hedgehog >= 0.5 && < 1.1 + - tasty >= 0.11 && < 1.6 + - tasty-hspec >= 1.1 && < 1.3 + - hspec >= 2.10 && < 2.12 + - tasty-hedgehog >= 0.1 && < 1.5 + - hedgehog >= 0.5 && < 1.5 - tasty-golden >= 2.3 && < 2.4 - filepath >= 1.4.1 && < 1.5 ghc-options: @@ -856,7 +859,7 @@ tests: iplookup-doctest: main: tests/iplookup-doctest/Doctests.hs dependencies: - - doctest >= 0.12 && < 0.19 + - doctest >= 0.12 && < 0.23 - split >= 0.2 && < 0.3 benchmarks: @@ -865,14 +868,14 @@ benchmarks: main: benchmarks/primcheck.hs dependencies: - isprime-lib - - criterion >= 1.4 && < 1.6 + - criterion >= 1.4 && < 1.7 iplookup-bench: source-dirs: benchmarks/iplookup main: Bench.hs dependencies: - iplookup-lib - - criterion >= 1.4 && < 1.6 - - deepseq >= 1.3 && <1.5 + - criterion >= 1.4 && < 1.7 + - deepseq >= 1.3 && <1.6 library: source-dirs: empty diff --git a/stack.yaml b/stack.yaml index 1b9f346..6446c48 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-18.21 +resolver: nightly-2023-10-22 packages: - . @@ -10,24 +10,7 @@ flags: # with-pg: True extra-deps: - - Chart-diagrams-1.9.3 - - HDBC-postgresql-2.4.0.0 - - SVGFonts-1.7.0.1 - - active-0.2.0.15 - - blaze-colonnade-1.2.2.1 - - colonnade-1.2.0.2 - - diagrams-core-1.5.0 - - diagrams-lib-1.4.5.1 - - diagrams-postscript-1.5 - - diagrams-svg-1.4.3.1 - - dual-tree-0.2.3.0 - - fast-builder-0.1.3.0 - - hasql-th-0.4.0.10 - - headed-megaparsec-0.2.0.2 - - json-stream-0.4.2.4 - - monoid-extras-0.6.1 - - postgresql-syntax-0.4 - - statestack-0.3 - - streaming-utils-0.2.1.0 - - svg-builder-0.1.1 - - template-haskell-compat-v0208-0.1.5 + - Chart-1.9.5 + - Chart-diagrams-1.9.5.1 + - streaming-utils-0.2.5.0 + - HDBC-postgresql-2.4.0.0 \ No newline at end of file diff --git a/tests/iplookup/LookupIPSpec.hs b/tests/iplookup/LookupIPSpec.hs index 2107c61..717777e 100644 --- a/tests/iplookup/LookupIPSpec.hs +++ b/tests/iplookup/LookupIPSpec.hs @@ -1,6 +1,6 @@ module LookupIPSpec where -import Test.Tasty.Hspec +import Test.Hspec import IPTypes import LookupIP diff --git a/tests/iplookup/ParseIPSpec.hs b/tests/iplookup/ParseIPSpec.hs index 8fa3599..dbf7f31 100644 --- a/tests/iplookup/ParseIPSpec.hs +++ b/tests/iplookup/ParseIPSpec.hs @@ -1,7 +1,7 @@ module ParseIPSpec where import Data.Maybe -import Test.Tasty.Hspec +import Test.Hspec import IPTypes import ParseIP