File tree Expand file tree Collapse file tree
prettyprinter-ansi-terminal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ jobs:
139139 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
140140 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
141141 if [ $((HCNUMVER >= 80000 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
142- if [ $((HCNUMVER >= 70800 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
142+ echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
143143 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
144144 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
145145 echo "GHCJSARITH=0" >> "$GITHUB_ENV"
Original file line number Diff line number Diff line change 3333 path : ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
3434 key : ${{ runner.os }}-${{ matrix.ghc }}
3535 - name : Build
36- run : cabal build -f-text prettyprinter:prettyprinter
36+ # There are linking error when building hashable, see #212.
37+ run : cabal build -f-text --constraint 'semigroups -hashable' prettyprinter:prettyprinter
Original file line number Diff line number Diff line change 44-- build only master branch, or PRs to master branch
55branches: master
66
7- -- gauge works only with newer GHC
8-
9- -- FIXME: Enable benchmarks for GHC 9.2 once basement (via gauge) is compatible:
10- -- https://github.com/haskell-foundation/foundation/issues/554
11- benchmarks: >=7.8.4 && <9.2
12-
137-- Doctests fail with GHC 7.10
148
159-- FIXME: Enable tests for GHC 9.2 once doctest is compatible:
Original file line number Diff line number Diff line change 11{-# LANGUAGE DeriveGeneric #-}
2- {-# LANGUAGE LambdaCase #-}
32{-# LANGUAGE OverloadedStrings #-}
43
54{-# OPTIONS_GHC -fno-warn-orphans #-}
@@ -19,14 +18,14 @@ import Data.Text (Text)
1918import qualified Data.Text as T
2019import qualified Data.Text.IO as T
2120import qualified Data.Text.Lazy as TL
22- import Gauge
2321import GHC.Generics
2422import Prettyprinter
2523import Prettyprinter.Render.Terminal as Terminal
2624import qualified Prettyprinter.Render.Text as Text
2725import Test.QuickCheck
2826import Test.QuickCheck.Gen
2927import Test.QuickCheck.Random
28+ import Test.Tasty.Bench
3029
3130
3231
@@ -103,7 +102,7 @@ prettyLambdaForm (LambdaForm free bound body) = prettyExp . (<+> anCol Blue "->"
103102 prettyExp = (<+> prettyExpr body)
104103
105104prettyExpr :: Expr -> Doc AnsiStyle
106- prettyExpr = \ case
105+ prettyExpr = \ expr -> case expr of
107106 Let binds body ->
108107 align (vsep [ anCol Red " let" <+> align (prettyBinds binds)
109108 , anCol Red " in" <+> prettyExpr body ])
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ benchmark large-output
6464 , base-compat >= 0.9.3 && < 0.12
6565 , containers
6666 , deepseq
67- , gauge >= 0.2
67+ , tasty-bench >= 0.2
6868 , prettyprinter
6969 , prettyprinter-ansi-terminal
7070 , QuickCheck >= 2.7
@@ -75,3 +75,7 @@ benchmark large-output
7575 ghc-options : -O2 -rtsopts -Wall
7676 default-language : Haskell2010
7777 type : exitcode-stdio-1.0
78+
79+ -- For GHC.Generics
80+ if !impl(ghc >= 7.6 )
81+ build-depends : ghc-prim
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ module Main (main) where
44
55
66
7- import Gauge.Main
87import Data.Char
98import Data.Text (Text )
109import qualified Data.Text as T
1110import Prettyprinter.Internal
11+ import Test.Tasty.Bench
1212
1313
1414
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ module Main (main) where
99
1010import Control.Monad
1111import Control.Monad.State
12- import Gauge.Main
1312import Data.Text (Text )
1413import qualified Data.Text as T
1514import System.Random
15+ import Test.Tasty.Bench
1616
1717import Prettyprinter
1818import Prettyprinter.Render.Text
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import Prelude.Compat
1010
1111import Control.DeepSeq
1212import Control.Monad.Compat
13- import Gauge
1413import Data.Char
1514import Data.Map (Map )
1615import qualified Data.Map as M
@@ -24,6 +23,7 @@ import GHC.Generics
2423import Test.QuickCheck
2524import Test.QuickCheck.Gen
2625import Test.QuickCheck.Random
26+ import Test.Tasty.Bench
2727import qualified Text.PrettyPrint.ANSI.Leijen as WL
2828
2929
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ benchmark fusion
177177 base >= 4.5 && < 5
178178 , prettyprinter
179179
180- , gauge >= 0.2
180+ , tasty-bench >= 0.2
181181 , mtl >= 2.1
182182 , random >= 1.0
183183 , text
@@ -195,7 +195,7 @@ benchmark faster-unsafe-text
195195 base >= 4.5 && < 5
196196 , prettyprinter
197197
198- , gauge >= 0.2
198+ , tasty-bench >= 0.2
199199 , text
200200
201201 hs-source-dirs : bench
@@ -214,7 +214,7 @@ benchmark large-output
214214 , prettyprinter
215215 , ansi-wl-pprint
216216
217- , gauge >= 0.2
217+ , tasty-bench >= 0.2
218218 , QuickCheck >= 2.7
219219 , containers
220220 , text
@@ -226,6 +226,7 @@ benchmark large-output
226226 default-language : Haskell2010
227227 type : exitcode-stdio-1.0
228228
229+ -- For GHC.Generics
229230 if !impl(ghc >= 7.6 )
230231 build-depends : ghc-prim
231232
You can’t perform that action at this time.
0 commit comments