Skip to content

Commit

Permalink
Merge pull request #58 from docopt/containers-upgrade
Browse files Browse the repository at this point in the history
Support newer `containers` and GHC
  • Loading branch information
DigitalBrains1 authored Feb 24, 2024
2 parents a2e8653 + d5d835d commit 54ce31b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
6 changes: 5 additions & 1 deletion System/Console/Docopt/QQ/Instances.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveLift#-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
Expand All @@ -9,7 +10,10 @@ module System.Console.Docopt.QQ.Instances where

import System.Console.Docopt.Types
import Language.Haskell.TH.Syntax (Lift)
import Data.Map.Internal (Map(..))

#if !MIN_VERSION_containers(0,6,6)
import Data.Map.Internal (Map(..))
deriving instance Lift (Map Option OptionInfo)
#endif

deriving instance Lift (Docopt)
20 changes: 6 additions & 14 deletions docopt.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,30 @@ source-repository head
type: git
location: https://github.com/docopt/docopt.hs.git

flag template-haskell
default: True
manual: True
description:
Build with QuasiQuoter usage parsers, which requires Template Haskell

library
exposed-modules: System.Console.Docopt.NoTH
System.Console.Docopt

other-modules: System.Console.Docopt.ApplicativeParsec
System.Console.Docopt.ParseUtils
System.Console.Docopt.Types
System.Console.Docopt.UsageParse
System.Console.Docopt.OptParse
System.Console.Docopt.Public
System.Console.Docopt.QQ
System.Console.Docopt.QQ.Instances

build-depends: base >= 4.9 && < 5.0,
parsec >= 3.1.14 && < 3.2,
containers >= 0.6.2 && < 0.6.6
containers >= 0.6.2 && < 0.7,
template-haskell >= 2.11.0 && < 2.22

ghc-options: -Wall
-fno-warn-unused-binds
-fno-warn-unused-do-bind
-fno-warn-unused-matches
-fno-warn-name-shadowing

if impl(ghc >= 6.10) && flag(template-haskell)
exposed-modules: System.Console.Docopt
other-modules: System.Console.Docopt.QQ
System.Console.Docopt.QQ.Instances
build-depends: template-haskell >= 2.11.0 && < 2.18

default-language: Haskell2010

test-suite tests
Expand All @@ -83,7 +75,7 @@ test-suite tests
aeson,
bytestring,
text,
template-haskell >= 2.11.0 && < 2.18
template-haskell

other-modules: System.Console.Docopt
System.Console.Docopt.ApplicativeParsec
Expand Down
9 changes: 5 additions & 4 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# http://docs.haskellstack.org/en/stable/yaml_configuration/

# ghc 8.10.7
resolver: lts-18.10
# ghc 9.0.1
# resolver: nightly-2021-07-16

# resolver: lts-18.10
# ghc 9.6.1
resolver: lts-22.11
# ghc 9.8.1
# resolver: nightly-2024-02-22
packages:
- '.'
- examples/
Expand Down

0 comments on commit 54ce31b

Please sign in to comment.