From 540eca5304c362638228482853f85f677c9c0e96 Mon Sep 17 00:00:00 2001 From: Michael Karg Date: Fri, 15 Sep 2023 23:42:45 +0200 Subject: [PATCH] wb | locli: adjust report generation --- bench/locli/src/Cardano/Analysis/API/Context.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bench/locli/src/Cardano/Analysis/API/Context.hs b/bench/locli/src/Cardano/Analysis/API/Context.hs index c2eea52430d..31ba9975de3 100644 --- a/bench/locli/src/Cardano/Analysis/API/Context.hs +++ b/bench/locli/src/Cardano/Analysis/API/Context.hs @@ -1,5 +1,7 @@ {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE GeneralisedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE PatternGuards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE UndecidableInstances #-} module Cardano.Analysis.API.Context (module Cardano.Analysis.API.Context) where @@ -98,9 +100,10 @@ data GeneratorProfile plutusLoopScript :: GeneratorProfile -> Maybe Text plutusLoopScript GeneratorProfile{plutusMode, plutusAutoMode, plutus} - | fromMaybe False - ((&&) <$> plutusAutoMode <*> plutusMode) = Just $ T.pack "Loop" - | otherwise = ppScript `fmap` plutus + | Just True <- (&&) <$> plutusAutoMode <*> plutusMode + = Just "Loop" + | otherwise + = ppScript `fmap` plutus newtype Commit = Commit { unCommit :: Text } deriving newtype (Eq, Show, FromJSON, ToJSON, NFData)