From 8c593f9f9243a83b7647ba0aaf2bcbb1cfb9b6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Facundo=20Dom=C3=ADnguez?= Date: Tue, 5 Dec 2023 16:35:54 -0300 Subject: [PATCH] Update stitch-lh benchmark to build with the latest stackage snapshot --- .../stitch-lh/src/Language/Stitch/LH/Check.hs | 28 +++++----- .../stitch-lh/src/Language/Stitch/LH/Eval.hs | 15 +++--- .../stitch-lh/src/Language/Stitch/LH/Monad.hs | 24 ++++----- .../stitch-lh/src/Language/Stitch/LH/Op.hs | 22 ++++---- .../src/Language/Stitch/LH/Pretty.hs | 7 +-- .../src/Language/Stitch/LH/Statement.hs | 11 ++-- .../stitch-lh/src/Language/Stitch/LH/Token.hs | 54 +++++++++---------- .../stitch-lh/src/Language/Stitch/LH/Type.hs | 10 ++-- .../src/Language/Stitch/LH/Unchecked.hs | 37 ++++++------- .../stitch-lh/src/Language/Stitch/LH/Util.hs | 22 ++++---- tests/tests.cabal | 3 +- 11 files changed, 118 insertions(+), 115 deletions(-) diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Check.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Check.hs index a7569a297b..7b560cfab6 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Check.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Check.hs @@ -30,7 +30,9 @@ import Language.Stitch.LH.Type import Language.Stitch.LH.Op import Language.Stitch.LH.Pretty import Language.Stitch.LH.Unchecked -import Text.PrettyPrint.ANSI.Leijen +import Language.Stitch.LH.Util +import Prettyprinter +import Prettyprinter.Render.Terminal {-@ @@ -68,8 +70,8 @@ data Exp {-@ data ScopedExp = ScopedExp (n :: NumVarsInScope) {e : Exp | numFreeVarsExp e <= n } @-} data ScopedExp = ScopedExp NumVarsInScope Exp -instance Pretty ScopedExp where - pretty (ScopedExp n e) = pretty (ScopedUExp n (uncheckExp e)) +prettyScopedExp :: ScopedExp -> Doc AnsiStyle +prettyScopedExp (ScopedExp n e) = prettyScopedUExp (ScopedUExp n (uncheckExp e)) {-@ uncheckExp :: e:Exp -> { uexp:UExp | numFreeVarsExp e = numFreeVars uexp } @-} uncheckExp :: Exp -> UExp @@ -275,23 +277,23 @@ data TyError | TypeMismatch ScopedUExp Ty Ty ScopedUExp -- expression expected_type actual_type context deriving Show -instance Pretty TyError where - pretty = \case +prettyTyError :: TyError -> Doc AnsiStyle +prettyTyError = \case OutOfScopeGlobal name -> - text "Global variable not in scope:" <+> squotes (text name) + pretty "Global variable not in scope:" <+> squotes (pretty name) NotAFunction e ty -> - text "Expected a function instead of" <+> + pretty "Expected a function instead of" <+> squotes (prettyTypedExp e ty) TypeMismatch e expected actual ctx -> - text "Found" <+> squotes (prettyTypedExp e expected) <$$> - text "but expected type" <+> squotes (pretty actual) <$$> + pretty "Found" <+> squotes (prettyTypedExp e expected) $$ + pretty "but expected type" <+> squotes (pretty actual) $$ inTheExpression ctx -prettyTypedExp :: ScopedUExp -> Ty -> Doc -prettyTypedExp e ty = pretty e <+> text ":" <+> pretty ty +prettyTypedExp :: ScopedUExp -> Ty -> Doc AnsiStyle +prettyTypedExp e ty = prettyScopedUExp e <+> pretty ":" <+> pretty ty -inTheExpression :: ScopedUExp -> Doc -inTheExpression e = text "in the expression" <+> squotes (pretty e) +inTheExpression :: ScopedUExp -> Doc AnsiStyle +inTheExpression e = pretty "in the expression" <+> squotes (prettyScopedUExp e) {-@ diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Eval.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Eval.hs index 626b04145f..36021c8be1 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Eval.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Eval.hs @@ -31,7 +31,8 @@ import Language.Stitch.LH.Check import Language.Stitch.LH.Op import Language.Stitch.LH.Type -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter +import Prettyprinter.Render.Terminal ------------------------------------------------ -- Evaluation @@ -58,12 +59,12 @@ data Value @-} data Value = VInt Int | VBool Bool | VFun Exp (Value -> Value) -instance Pretty Value where - pretty = \case - VInt i -> int i - VBool True -> text "true" - VBool False -> text "false" - VFun e _ -> pretty (ScopedExp (numFreeVarsExp e) e) +prettyValue :: Value -> Doc AnsiStyle +prettyValue = \case + VInt i -> pretty i + VBool True -> pretty "true" + VBool False -> pretty "false" + VFun e _ -> prettyScopedExp (ScopedExp (numFreeVarsExp e) e) {-@ // XXX: Why can't we reflect map? diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Monad.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Monad.hs index 654671b177..a043149816 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Monad.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Monad.hs @@ -29,11 +29,11 @@ module Language.Stitch.LH.Monad ( ) where import Language.Stitch.LH.Check -import Language.Stitch.LH.Util import System.Console.Haskeline -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter +import Prettyprinter.Render.Terminal import Control.Monad import Control.Monad.Trans.Maybe @@ -48,8 +48,8 @@ newtype Stitch a = Stitch { unStitch :: MaybeT (StateT Globals (InputT IO)) a } deriving (Monad, Functor, Applicative, MonadState Globals, MonadIO) -- | Like the 'Stitch' monad, but also supporting error messages via 'Doc's -newtype StitchE a = StitchE { unStitchE :: ExceptT Doc Stitch a } - deriving (Monad, Functor, Applicative, MonadError Doc) +newtype StitchE a = StitchE { unStitchE :: ExceptT (Doc AnsiStyle) Stitch a } + deriving (Monad, Functor, Applicative, MonadError (Doc AnsiStyle)) instance MonadReader Globals StitchE where ask = StitchE get @@ -63,14 +63,14 @@ instance MonadReader Globals StitchE where -- | Class for the two stitchorous monads class StitchM m where -- | Print a 'Doc' without a newline at the end - printDoc :: Doc -> m () + printDoc :: Doc AnsiStyle -> m () -- | Print a 'Doc' with a newline - printLine :: Doc -> m () + printLine :: Doc AnsiStyle -> m () instance StitchM Stitch where - printDoc = Stitch . liftIO . displayIO stdout . toSimpleDoc - printLine = Stitch . liftIO . displayIO stdout . toSimpleDoc . (<> hardline) + printDoc = Stitch . liftIO . hPutDoc stdout + printLine = Stitch . liftIO . hPutDoc stdout . (<> hardline) instance StitchM StitchE where printDoc = StitchE . lift . printDoc @@ -84,16 +84,16 @@ prompt = Stitch . lift . lift . getInputLine -- | Abort the 'Stitch' monad quit :: Stitch a quit = do - printLine (text "Good-bye.") + printLine (pretty "Good-bye.") Stitch mzero -- | Abort the computation with an error -issueError :: Doc -> StitchE a +issueError :: Doc AnsiStyle -> StitchE a issueError = StitchE . throwError -- | Hoist an 'Either' into 'StitchE' eitherToStitchE :: Either String a -> StitchE a -eitherToStitchE (Left err) = issueError (text err) +eitherToStitchE (Left err) = issueError (pretty err) eitherToStitchE (Right x) = return x -- | Run a 'Stitch' computation @@ -102,6 +102,6 @@ runStitch thing_inside = void $ flip evalStateT emptyGlobals $ runMaybeT $ unStitch thing_inside -- | Run a 'StitchE' computation -runStitchE :: StitchE a -> Stitch (Either Doc a) +runStitchE :: StitchE a -> Stitch (Either (Doc AnsiStyle) a) runStitchE thing_inside = runExceptT $ unStitchE thing_inside diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Op.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Op.hs index 4a18be41a0..b9f3f73e52 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Op.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Op.hs @@ -24,7 +24,7 @@ import Data.Hashable import Language.Stitch.LH.Type import Language.Stitch.LH.Util (render) -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter {-@ data ArithOp @@ -75,16 +75,16 @@ arithType Equals = TBool -- Pretty-printing instance Pretty ArithOp where - pretty Plus = char '+' - pretty Minus = char '-' - pretty Times = char '*' - pretty Divide = char '/' - pretty Mod = char '%' - pretty Less = char '<' - pretty LessE = text "<=" - pretty Greater = char '>' - pretty GreaterE = text ">=" - pretty Equals = text "==" + pretty Plus = pretty '+' + pretty Minus = pretty '-' + pretty Times = pretty '*' + pretty Divide = pretty '/' + pretty Mod = pretty '%' + pretty Less = pretty '<' + pretty LessE = pretty "<=" + pretty Greater = pretty '>' + pretty GreaterE = pretty ">=" + pretty Equals = pretty "==" instance Show ArithOp where show = render . pretty diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Pretty.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Pretty.hs index c0aebb9704..26fa0df8b6 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Pretty.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Pretty.hs @@ -18,7 +18,8 @@ import Language.Stitch.LH.Op import Language.Stitch.LH.Util import Language.Stitch.LH.Data.Nat -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter +import Prettyprinter.Render.Terminal lamPrec, appPrec, appLeftPrec, appRightPrec, ifPrec :: Prec lamPrec = 1 @@ -46,12 +47,12 @@ precInfo GreaterE = (4, 4, 4) precInfo Equals = (4, 4, 4) -- | A function that changes a 'Doc's color -type ApplyColor = Doc -> Doc +type ApplyColor = Doc AnsiStyle -> Doc AnsiStyle -- | The colors used for all rendered expressions {-@ coloring :: { v : [ApplyColor] | len v > 0 } @-} coloring :: [ApplyColor] -coloring = [red, green, yellow, blue, magenta, cyan] +coloring = map (annotate . color) [Red, Green, Yellow, Blue, Magenta, Cyan] {-@ ignore applyColor @-} -- LH would need a proof that diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Statement.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Statement.hs index 91b3b948de..a38302a6ed 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Statement.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Statement.hs @@ -13,13 +13,14 @@ ---------------------------------------------------------------------------- {-# OPTIONS_GHC -Wno-unused-imports #-} -module Language.Stitch.LH.Statement ( Statement(..) ) where +module Language.Stitch.LH.Statement ( Statement(..), prettyStatement ) where -- XXX: Import Op so LH doesn't fail with: Unknown type constructor `ArithOp` import Language.Stitch.LH.Op import Language.Stitch.LH.Unchecked -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter +import Prettyprinter.Render.Terminal -- | A statement can either be a bare expression, which will be evaluated, -- or an assignment to a global variable. @@ -31,6 +32,6 @@ data Statement = BareExp UExp | NewGlobal String UExp deriving Show -instance Pretty Statement where - pretty (BareExp e) = pretty (ScopedUExp 0 e) - pretty (NewGlobal v e) = text v <+> char '=' <+> pretty (ScopedUExp 0 e) +prettyStatement :: Statement -> Doc AnsiStyle +prettyStatement (BareExp e) = prettyScopedUExp (ScopedUExp 0 e) +prettyStatement (NewGlobal v e) = pretty v <+> pretty '=' <+> prettyScopedUExp (ScopedUExp 0 e) diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Token.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Token.hs index da743dc500..44f6c2f93e 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Token.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Token.hs @@ -20,7 +20,7 @@ module Language.Stitch.LH.Token ( import Language.Stitch.LH.Util import Language.Stitch.LH.Op -import Text.PrettyPrint.ANSI.Leijen as Pretty +import Prettyprinter import Text.Parsec.Pos ( SourcePos, newPos ) import Data.List as List @@ -83,7 +83,7 @@ instance Pretty Token where prettyList = printTogether . List.map printingInfo instance Show Token where - show = render . pretty + show = show . pretty instance Pretty LToken where pretty = pretty . unLoc @@ -92,38 +92,38 @@ instance Pretty LToken where instance Show LToken where show = render . pretty -type PrintingInfo = (Doc, Bool, Bool) +type PrintingInfo ann = (Doc ann, Bool, Bool) -- the bools say whether or not to include a space before or a space after -alone :: Doc -> PrintingInfo +alone :: Doc ann -> PrintingInfo ann alone = (, True, True) -getDoc :: PrintingInfo -> Doc +getDoc :: PrintingInfo ann -> Doc ann getDoc (doc, _, _) = doc -printingInfo :: Token -> PrintingInfo -printingInfo LParen = (char '(', True, False) -printingInfo RParen = (char ')', False, True) -printingInfo Lambda = (char '\\', True, False) -printingInfo Dot = (char '.', False, True) -printingInfo ArrowTok = alone $ text "->" -printingInfo Colon = (char ':', False, False) +printingInfo :: Token -> PrintingInfo ann +printingInfo LParen = (pretty '(', True, False) +printingInfo RParen = (pretty ')', False, True) +printingInfo Lambda = (pretty '\\', True, False) +printingInfo Dot = (pretty '.', False, True) +printingInfo ArrowTok = alone $ pretty "->" +printingInfo Colon = (pretty ':', False, False) printingInfo (ArithOp a) = alone $ pretty a -printingInfo (IntTok i) = alone $ int i -printingInfo (BoolTok True) = alone $ text "true" -printingInfo (BoolTok False) = alone $ text "false" -printingInfo If = alone $ text "if" -printingInfo Then = alone $ text "then" -printingInfo Else = alone $ text "else" -printingInfo FixTok = alone $ text "fix" -printingInfo LetTok = alone $ text "let" -printingInfo InTok = alone $ text "in" -printingInfo Assign = alone $ text "=" -printingInfo Semi = (char ';', False, True) -printingInfo (Name t) = alone $ text t - -printTogether :: [PrintingInfo] -> Doc -printTogether [] = Pretty.empty +printingInfo (IntTok i) = alone $ pretty i +printingInfo (BoolTok True) = alone $ pretty "true" +printingInfo (BoolTok False) = alone $ pretty "false" +printingInfo If = alone $ pretty "if" +printingInfo Then = alone $ pretty "then" +printingInfo Else = alone $ pretty "else" +printingInfo FixTok = alone $ pretty "fix" +printingInfo LetTok = alone $ pretty "let" +printingInfo InTok = alone $ pretty "in" +printingInfo Assign = alone $ pretty "=" +printingInfo Semi = (pretty ';', False, True) +printingInfo (Name t) = alone $ pretty t + +printTogether :: [PrintingInfo ann] -> Doc ann +printTogether [] = mempty printTogether pis = getDoc $ List.foldl1 combine pis where combine (doc1, before_space, inner_space1) (doc2, inner_space2, after_space) diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Type.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Type.hs index ec8db8ac36..1805a098d4 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Type.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Type.hs @@ -17,7 +17,7 @@ module Language.Stitch.LH.Type where import Language.Stitch.LH.Util (Prec, topPrec, maybeParens) -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter import Data.Hashable import GHC.Generics @@ -46,10 +46,10 @@ arrowLeftPrec = 5 arrowRightPrec = 4.9 arrowPrec = 5 -pretty_ty :: Prec -> Ty -> Doc +pretty_ty :: Prec -> Ty -> Doc ann pretty_ty p (TFun arg res) = maybeParens (p >= arrowPrec) $ hsep [ pretty_ty arrowLeftPrec arg - , text "->" + , pretty "->" , pretty_ty arrowRightPrec res ] -pretty_ty _ TInt = text "Int" -pretty_ty _ TBool = text "Bool" +pretty_ty _ TInt = pretty "Int" +pretty_ty _ TBool = pretty "Bool" diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Unchecked.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Unchecked.hs index dc76498650..2d2919010b 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Unchecked.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Unchecked.hs @@ -21,7 +21,8 @@ import Language.Stitch.LH.Op import Language.Stitch.LH.Util import Language.Stitch.LH.Data.Nat as Nat -import Text.PrettyPrint.ANSI.Leijen +import Prettyprinter +import Prettyprinter.Render.Terminal {-@ data UExp @@ -80,21 +81,21 @@ type ClosedUExp = { e : UExp | numFreeVars e == 0 } data ScopedUExp = ScopedUExp NumVarsInScope UExp deriving (Eq, Show) -instance Pretty ScopedUExp where - pretty (ScopedUExp n e) = prettyExp n topPrec e +prettyScopedUExp :: ScopedUExp -> Doc AnsiStyle +prettyScopedUExp (ScopedUExp n e) = prettyExp n topPrec e -{-@ prettyExp :: n : NumVarsInScope -> Prec -> VarsSmallerThan n -> Doc @-} -prettyExp :: NumVarsInScope -> Prec -> UExp -> Doc +{-@ prettyExp :: n : NumVarsInScope -> Prec -> VarsSmallerThan n -> Doc AnsiStyle @-} +prettyExp :: NumVarsInScope -> Prec -> UExp -> Doc AnsiStyle prettyExp n prec = \case - UVar v -> applyColor (ScopedVar n v) (char '#' <> int v) + UVar v -> applyColor (ScopedVar n v) (pretty '#' <> pretty v) - UGlobal name -> text name + UGlobal name -> pretty name -- XXX: Putting the alternatives below in auxiliary functions would cause -- a mysterious failure in LH. ULam ty body -> maybeParens (prec >= lamPrec) $ - fillSep [ char 'λ' <> applyColor (ScopedVar (n + 1) 0) (char '#') <> - text ":" <> pretty ty <> char '.' + fillSep [ pretty 'λ' <> applyColor (ScopedVar (n + 1) 0) (pretty '#') <> + pretty ":" <> pretty ty <> pretty '.' , prettyExp (n + 1) topPrec body ] UApp e1 e2 -> maybeParens (prec >= appPrec) $ @@ -102,8 +103,8 @@ prettyExp n prec = \case , prettyExp n appRightPrec e2 ] ULet e1 e2 -> maybeParens (prec >= lamPrec) $ - fillSep [ text "let" <+> applyColor (ScopedVar (n + 1) 0) (char '#') <+> - char '=' <+> prettyExp n topPrec e1 <+> text "in" + fillSep [ pretty "let" <+> applyColor (ScopedVar (n + 1) 0) (pretty '#') <+> + pretty '=' <+> prettyExp n topPrec e1 <+> pretty "in" , prettyExp (n + 1) topPrec e2 ] UArith e1 op e2 -> maybeParens (prec >= opPrec op) $ @@ -111,15 +112,15 @@ prettyExp n prec = \case , prettyExp n (opRightPrec op) e2 ] UCond e1 e2 e3 -> maybeParens (prec >= ifPrec) $ - fillSep [ text "if" <+> prettyExp n topPrec e1 - , text "then" <+> prettyExp n topPrec e2 - , text "else" <+> prettyExp n topPrec e3 ] + fillSep [ pretty "if" <+> prettyExp n topPrec e1 + , pretty "then" <+> prettyExp n topPrec e2 + , pretty "else" <+> prettyExp n topPrec e3 ] UFix body -> maybeParens (prec >= appPrec) $ - text "fix" <+> prettyExp n topPrec body + pretty "fix" <+> prettyExp n topPrec body - UIntE i -> int i + UIntE i -> pretty i - UBoolE True -> text "true" + UBoolE True -> pretty "true" - UBoolE False -> text "false" + UBoolE False -> pretty "false" diff --git a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Util.hs b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Util.hs index d4b2ca299f..640df36576 100644 --- a/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Util.hs +++ b/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Util.hs @@ -16,14 +16,15 @@ ---------------------------------------------------------------------------- module Language.Stitch.LH.Util ( - render, toSimpleDoc, maybeParens, ($$), + render, maybeParens, ($$), Prec, topPrec, stripWhitespace, foldl1M, allPairs ) where import Text.Parsec -import Text.PrettyPrint.ANSI.Leijen as Pretty +import Prettyprinter as Pretty +import Prettyprinter.Render.String as Pretty import Data.Char import Data.List @@ -31,7 +32,7 @@ import Data.List import Control.Monad instance Pretty ParseError where - pretty = text . show + pretty = pretty -- | More conspicuous synonym for operator precedence type Prec = Rational @@ -41,21 +42,16 @@ topPrec :: Prec topPrec = 0 -- | Convert a 'Doc' to a 'String' -render :: Doc -> String -render = flip displayS "" . toSimpleDoc - --- | Convert a 'Doc' to a 'SimpleDoc' for further rendering -toSimpleDoc :: Doc -> SimpleDoc -toSimpleDoc = renderPretty 1.0 78 +render :: Doc ann -> String +render = Pretty.renderString . layoutPretty defaultLayoutOptions -- | Enclose a 'Doc' in parens if the flag is 'True' -maybeParens :: Bool -> Doc -> Doc +maybeParens :: Bool -> Doc ann -> Doc ann maybeParens True = parens maybeParens False = id --- | Synonym for 'Pretty.<$>' -($$) :: Doc -> Doc -> Doc -($$) = (Pretty.<$>) +($$) :: Doc ann -> Doc ann -> Doc ann +a $$ b = Pretty.vcat [a, b] -- | (Inefficiently) strips whitespace from a string stripWhitespace :: String -> String diff --git a/tests/tests.cabal b/tests/tests.cabal index 37641ee89e..f6c1acd8a2 100644 --- a/tests/tests.cabal +++ b/tests/tests.cabal @@ -54,7 +54,8 @@ executable benchmark-stitch-lh main-is: Main.hs if !flag(benchmark-stitch-lh) && flag(stack) buildable: False - build-depends: ansi-wl-pprint >= 0.6.7.1 + build-depends: prettyprinter >= 1.0 + , prettyprinter-ansi-terminal >= 1.1 , mtl >= 2.2.1 , transformers >= 0.4.0.0 , parsec >= 3.1