Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ allow-newer: *:base
-- Patch merged into master (upcoming verison 10.0). We are currently using 9.2
source-repository-package
type: git
tag: b66e3a04c20f753213fe7e5115a95b3fe34109f9
tag: 3946a0e94470d7403a855dd60f8e54687ecc2b1d
location: https://github.com/larskuhtz/sbv
--sha256: sha256-NQ00KGhu4IWeAry0r6m6FR/iCu/XboWtjOhbU+gtijU=
--sha256: 1msbz6525nmsywpm910jh23siil4qgn3rpsm52m8j6877r7v5zw3

-- Servant is notoriously forcing outdated upper bounds onto its users.
-- It is usually safe to just ignore those.
Expand All @@ -53,3 +53,6 @@ allow-newer: servant-server:*
allow-newer: servant-client-core:*
allow-newer: servant-client:*
allow-newer: servant:*

-- Required by trifecta (e.g. to allow mtl >=2.3)
allow-newer: trifecta:*
4 changes: 2 additions & 2 deletions pact.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ library
Pact.Types.Typecheck
Pact.Typechecker
Pact.Utils.Servant

build-depends:
, base >= 4.18.0.0
, Decimal >=0.4.2
Expand All @@ -173,7 +173,7 @@ library
, hashable >=1.4
, lens >=4.14
, megaparsec >=9
, mtl >=2.2.1
, mtl >=2.3
, pact-json >=0.1
, pact-time >=0.2
, parsers >=0.12.4
Expand Down
1 change: 1 addition & 0 deletions src-ghc/Pact/ApiReq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module Pact.ApiReq
import Control.Applicative
import Control.Error
import Control.Lens hiding ((.=))
import Control.Monad (foldM, forM, when)
import Control.Monad.Catch
import Control.Monad.State.Strict
import Data.Aeson
Expand Down
2 changes: 1 addition & 1 deletion src-ghc/Pact/Coverage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ module Pact.Coverage
, writeCovReport'
) where

import Control.Monad (foldM, when)
import Control.Monad.IO.Class
import Control.Monad.State.Strict
import Data.Foldable
import Data.IORef
import qualified Data.HashMap.Strict as HM
Expand Down
1 change: 1 addition & 0 deletions src-ghc/Pact/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import qualified Options.Applicative as O

import Control.Applicative
import Control.Lens
import Control.Monad (forM, forM_)
import Control.Monad.State.Strict

import qualified Data.ByteString as BS
Expand Down
1 change: 1 addition & 0 deletions src-ghc/Pact/Server/ApiServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Prelude hiding (log)

import Control.Concurrent
import Control.Lens hiding ((<|))
import Control.Monad (when)
import Control.Monad.Reader
import Control.Monad.Trans.Except

Expand Down
2 changes: 1 addition & 1 deletion src-ghc/Pact/Server/PactService.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Pact.Server.PactService where

import Prelude

import Control.Monad.Except
import Control.Monad (when)
import Control.Monad.Reader
import Data.Int (Int64)
import Data.Maybe (fromMaybe)
Expand Down
1 change: 1 addition & 0 deletions src-tool/Pact/Analyze/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import Control.Monad.Except
import Control.Monad.Morph (generalize, hoist)
import Control.Monad.Reader (runReaderT)
import Control.Monad.State.Strict (evalStateT)
import Control.Monad.Trans.Class (lift)
import Data.Bifunctor (first)
import Data.Either (partitionEithers)
import Data.Foldable (foldl')
Expand Down
6 changes: 3 additions & 3 deletions src-tool/Pact/Analyze/Parse/Prop.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import Control.Lens (at, toListOf, view, (%~), (&),
(.~), (?~))
import qualified Control.Lens as Lens
import Control.Monad (unless, when)
import Control.Monad.Except (MonadError (throwError))
import Control.Monad.Except (runExcept, MonadError (throwError))
import Control.Monad.Reader (asks, local, runReaderT)
import Control.Monad.State.Strict (evalStateT)
#if !MIN_VERSION_base(4,16,0)
Expand Down Expand Up @@ -875,7 +875,7 @@ expToProp tableEnv' genStart nameEnv idEnv consts propDefs ty body = do
<- parseToPreProp genStart nameEnv propDefs body
let env = PropCheckEnv (coerceQType <$> idEnv) tableEnv' Set.empty Set.empty
preTypedPropDefs consts
_getEither $ runReaderT (checkPreProp ty preTypedBody) env
runExcept $ _getEither $ runReaderT (checkPreProp ty preTypedBody) env

inferProp
:: TableEnv
Expand All @@ -898,7 +898,7 @@ inferProp tableEnv' genStart nameEnv idEnv consts propDefs body = do
<- parseToPreProp genStart nameEnv propDefs body
let env = PropCheckEnv (coerceQType <$> idEnv) tableEnv' Set.empty Set.empty
preTypedPropDefs consts
_getEither $ runReaderT (inferPreProp preTypedBody) env
runExcept $ _getEither $ runReaderT (inferPreProp preTypedBody) env

-- | Parse both a property body and defined properties from `Exp` to `PreProp`.
parseToPreProp
Expand Down
4 changes: 2 additions & 2 deletions src-tool/Pact/Analyze/Parse/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Pact.Analyze.Parse.Types where

import Control.Applicative (Alternative)
import Control.Lens (makeLenses, (<&>))
import Control.Monad.Except (MonadError (throwError))
import Control.Monad.Except (Except, MonadError (throwError))
import Control.Monad.Reader (ReaderT)
import Control.Monad.State.Strict (StateT)
import qualified Data.HashMap.Strict as HM
Expand Down Expand Up @@ -154,7 +154,7 @@ data PropCheckEnv = PropCheckEnv
, _localVars :: HM.HashMap Text EProp
}

newtype EitherFail e a = EitherFail { _getEither :: Either e a }
newtype EitherFail e a = EitherFail { _getEither :: Except e a }
deriving (Show, Eq, Ord, Functor, Applicative, Alternative, Monad, MonadError e)

type ParseEnv = Map Text VarId
Expand Down
1 change: 1 addition & 0 deletions src/Pact/Repl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import System.FilePath
import Control.Concurrent
import Control.Exception.Safe
import Control.Lens hiding (op)
import Control.Monad (foldM, forever, forM, forM_, when, void)
import Control.Monad.State.Strict

import qualified Data.Aeson as A
Expand Down
1 change: 1 addition & 0 deletions src/Pact/Repl/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Control.Arrow ((&&&))
import Control.Concurrent.MVar
import Control.Lens
import Control.Exception.Safe
import Control.Monad (foldM, forM, when)
import Control.Monad.Reader
import Control.Monad.State.Strict (get,put)

Expand Down
1 change: 1 addition & 0 deletions src/Pact/Types/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import qualified Data.HashMap.Strict as HM
import qualified Data.Map.Strict as M
import Data.Default
import GHC.Generics
import Control.Monad (forM_, when)
import Control.Monad.IO.Class
import Control.Monad.Reader
import Prelude hiding (log)
Expand Down
1 change: 0 additions & 1 deletion src/Pact/Types/Purity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module Pact.Types.Purity

import Control.Concurrent.MVar
import Control.Monad.Catch
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.Aeson hiding (Object)
Expand Down
2 changes: 1 addition & 1 deletion src/Pact/Types/Runtime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module Pact.Types.Runtime
import Control.Arrow ((&&&))
import Control.Concurrent.MVar
import Control.Lens hiding ((.=),DefName, elements)
import Control.Monad.Except
import Control.Monad (void)
import Control.Exception.Safe
import Control.Monad.Reader
import Control.Monad.State.Strict
Expand Down
2 changes: 1 addition & 1 deletion src/Pact/Types/SigData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Pact.Types.SigData
) where

import Control.Error
import Control.Monad.State.Strict
import Control.Monad (join)
import Data.Aeson
import Data.Bifunctor
import qualified Data.HashMap.Strict as HM
Expand Down
1 change: 1 addition & 0 deletions tests/PactContinuationSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module PactContinuationSpec (spec) where

import qualified Control.Exception as Exception
import Control.Lens hiding ((.=))
import Control.Monad (forM_)
import Control.Monad.Reader
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BSL8
Expand Down
1 change: 1 addition & 0 deletions tests/PactTestsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module PactTestsSpec (spec) where
import Test.Hspec

import Control.Concurrent
import Control.Monad (forM_)
import Control.Monad.State.Strict
import Control.Lens
import Data.Text(Text)
Expand Down
1 change: 1 addition & 0 deletions tests/RemoteVerifySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module RemoteVerifySpec (spec) where
import Test.Hspec

import Control.Lens
import Control.Monad ((>=>))
import Control.Monad.State.Strict
import Control.Monad.Trans.Except

Expand Down