summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Data/ErrM.hs
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2025-08-02 18:59:07 +0200
committerGitHub <noreply@github.com>2025-08-02 18:59:07 +0200
commit65e85c5a3cba4df82547a018b4135ac63551d8df (patch)
tree33a842b24b9e3851c6b6cf095f11f562b0fd6b7f /src/compiler/GF/Data/ErrM.hs
parent981d6b9bddacee6a204ac48f2a4e27f4cca1bd47 (diff)
parent01c4f82e077b93cb2318830c56070c0ec15a20e6 (diff)
Merge pull request #175 from inariksit/new-ghc
Changes to make it work with newer stack/GHC: - unix library changed API in 2.8 - Monad of no return & Semigroup as a superclass of Monoid - import Control.Monad (join, when, (<=<)) - fixed CI issues
Diffstat (limited to 'src/compiler/GF/Data/ErrM.hs')
-rw-r--r--src/compiler/GF/Data/ErrM.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Data/ErrM.hs b/src/compiler/GF/Data/ErrM.hs
index 288c61919..133a49b73 100644
--- a/src/compiler/GF/Data/ErrM.hs
+++ b/src/compiler/GF/Data/ErrM.hs
@@ -34,7 +34,7 @@ fromErr :: a -> Err a -> a
fromErr a = err (const a) id
instance Monad Err where
- return = Ok
+ return = pure
Ok a >>= f = f a
Bad s >>= f = Bad s
@@ -54,7 +54,7 @@ instance Functor Err where
fmap f (Bad s) = Bad s
instance Applicative Err where
- pure = return
+ pure = Ok
(<*>) = ap
-- | added by KJ