Skip to content

Commit

Permalink
Fix imports for newer mtl versions (purescript#4547)
Browse files Browse the repository at this point in the history
Newer mtl does not re-export Control.Monad and Data.Monoid anymore.
So we fix that by splitting the imports manually.
  • Loading branch information
Profpatsch authored Jul 24, 2024
1 parent 08b6c75 commit e06b9cc
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Command/Docs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Prelude
import Command.Docs.Html (asHtml, writeHtmlModules)
import Command.Docs.Markdown (asMarkdown, writeMarkdownModules)
import Control.Applicative (Alternative(..), optional)
import Control.Monad.Writer (when)
import Control.Monad (when)
import Control.Monad.Trans.Except (runExceptT)
import Data.Maybe (fromMaybe)
import Data.Text qualified as T
Expand Down
2 changes: 1 addition & 1 deletion app/Command/Docs/Html.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Prelude

import Control.Applicative (Alternative(..))
import Control.Arrow ((&&&))
import Control.Monad.Writer (guard)
import Control.Monad (guard)
import Data.List (sort)
import Data.Text (Text)
import Data.Text.Lazy (toStrict)
Expand Down
3 changes: 2 additions & 1 deletion src/Control/Monad/Supply.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import Prelude

import Control.Applicative (Alternative)
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.Reader (MonadPlus, MonadReader, MonadTrans)
import Control.Monad.Reader (MonadReader, MonadTrans)
import Control.Monad (MonadPlus)
import Control.Monad.State (StateT(..))
import Control.Monad.Writer (MonadWriter)

Expand Down
3 changes: 2 additions & 1 deletion src/Language/PureScript/Errors.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import Control.Lens (both, head1, over)
import Control.Monad (forM, unless)
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.Trans.State.Lazy (State, evalState, get, put)
import Control.Monad.Writer (Last(..), MonadWriter(..), censor)
import Control.Monad.Writer (MonadWriter(..), censor)
import Data.Monoid (Last(..))
import Data.Bifunctor (first, second)
import Data.Bitraversable (bitraverse)
import Data.Char (isSpace)
Expand Down
3 changes: 2 additions & 1 deletion src/Language/PureScript/Renamer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module Language.PureScript.Renamer (renameInModule) where

import Prelude

import Control.Monad.State (MonadState(..), State, gets, modify, runState, (>=>))
import Control.Monad.State (MonadState(..), State, gets, modify, runState)
import Control.Monad ((>=>))

import Data.Functor ((<&>))
import Data.List (find)
Expand Down
2 changes: 1 addition & 1 deletion src/Language/PureScript/Sugar/Operators/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Language.PureScript.Sugar.Operators.Common where

import Prelude

import Control.Monad.State (guard, join)
import Control.Monad (guard, join)
import Control.Monad.Except (MonadError(..))

import Data.Either (rights)
Expand Down
6 changes: 4 additions & 2 deletions src/Language/PureScript/TypeChecker/Entailment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import Protolude (ordNub, headMay)

import Control.Arrow (second, (&&&))
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.State (MonadState(..), MonadTrans(..), StateT(..), evalStateT, execStateT, foldM, gets, guard, join, modify, zipWithM, zipWithM_, (<=<))
import Control.Monad.State (MonadState(..), MonadTrans(..), StateT(..), evalStateT, execStateT, gets, modify)
import Control.Monad (foldM, guard, join, zipWithM, zipWithM_, (<=<))
import Control.Monad.Supply.Class (MonadSupply(..))
import Control.Monad.Writer (Any(..), MonadWriter(..), WriterT(..))
import Control.Monad.Writer (MonadWriter(..), WriterT(..))
import Data.Monoid (Any(..))

import Data.Either (lefts, partitionEithers)
import Data.Foldable (for_, fold, toList)
Expand Down
3 changes: 2 additions & 1 deletion src/Language/PureScript/TypeChecker/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import Prelude

import Control.Arrow (second)
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.State (MonadState(..), StateT(..), forM_, gets, guard, join, modify, when, (<=<))
import Control.Monad.State (MonadState(..), StateT(..), gets, modify)
import Control.Monad (forM_, guard, join, when, (<=<))
import Control.Monad.Writer.Class (MonadWriter(..), censor)

import Data.Maybe (fromMaybe)
Expand Down

0 comments on commit e06b9cc

Please sign in to comment.