From 6957a3991184c2e3334124a011350e0d269a30ca Mon Sep 17 00:00:00 2001 From: Jake Wheat Date: Mon, 8 Jan 2024 12:26:44 +0000 Subject: [PATCH] update to work with latest ghc, cabal packages --- Makefile | 6 ++---- simple-sql-parser.cabal | 6 +++--- website/RenderTestCases.lhs | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 037d4fa..9a1aa2a 100644 --- a/Makefile +++ b/Makefile @@ -75,8 +75,6 @@ build-haddock : # todo: handle the deps properly rm -Rf build/haddock mkdir build/haddock/ - - #GHC_VER="$(shell ghc --numeric-version)" - # wtf $(eval GHC_VER="$(shell ghc --numeric-version)") - cp -R dist-newstyle/build/x86_64-linux/ghc-${GHC_VER}/simple-sql-parser-0.6.0/doc/html/simple-sql-parser/* build/haddock/ + $(eval SSP_VER="$(shell cat simple-sql-parser.cabal |grep -P '^version:' | awk '{print $$2}')") + cp -R dist-newstyle/build/x86_64-linux/ghc-${GHC_VER}/simple-sql-parser-${SSP_VER}/doc/html/simple-sql-parser/* build/haddock/ diff --git a/simple-sql-parser.cabal b/simple-sql-parser.cabal index 5f2e7c1..21c44e5 100644 --- a/simple-sql-parser.cabal +++ b/simple-sql-parser.cabal @@ -40,7 +40,7 @@ common shared-properties default-language: Haskell2010 build-depends: base >=4 && <5, parsec >=3.1 && <3.2, - mtl >=2.1 && <2.3, + mtl >=2.1 && <2.4, pretty >= 1.1 && < 1.2 ghc-options: -Wall @@ -62,7 +62,7 @@ Test-Suite Tests main-is: RunTests.lhs hs-source-dirs: tools Build-Depends: simple-sql-parser, - tasty >= 1.1 && < 1.5, + tasty >= 1.1 && < 1.6, tasty-hunit >= 0.9 && < 0.11 Other-Modules: Language.SQL.SimpleSQL.ErrorMessages, @@ -108,7 +108,7 @@ executable Fixity hs-source-dirs: tools Build-Depends: simple-sql-parser, pretty-show >= 1.6 && < 1.10, - tasty >= 1.1 && < 1.5, + tasty >= 1.1 && < 1.6, tasty-hunit >= 0.9 && < 0.11 if flag(fixitytest) buildable: True diff --git a/website/RenderTestCases.lhs b/website/RenderTestCases.lhs index 0d0b9c2..4afcc7e 100644 --- a/website/RenderTestCases.lhs +++ b/website/RenderTestCases.lhs @@ -7,6 +7,7 @@ Converts the test data to asciidoc > import Language.SQL.SimpleSQL.Parse > import Language.SQL.SimpleSQL.Lex > import Data.List +> import Control.Monad (when, unless) > data TableItem = Heading Int String > | Row String String