summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2024-09-09 19:43:39 +0200
committerInari Listenmaa <inari.listenmaa@gmail.com>2025-08-02 16:39:31 +0200
commitb914a25de326dd937e3a1d05f4eefb46af6da7b4 (patch)
treee816d5ec4b91425f3f7e41dd8bd75a2681ff524c /src/runtime/haskell/PGF
parent1037b209ae225d5de604ff832d915c590ced4c38 (diff)
define return in terms of pure, >> as *>, mappend as <>
In preparation for deprecation, see https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid and https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
Diffstat (limited to 'src/runtime/haskell/PGF')
-rw-r--r--src/runtime/haskell/PGF/TypeCheck.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/haskell/PGF/TypeCheck.hs b/src/runtime/haskell/PGF/TypeCheck.hs
index 82bd47b7a..f02986fc0 100644
--- a/src/runtime/haskell/PGF/TypeCheck.hs
+++ b/src/runtime/haskell/PGF/TypeCheck.hs
@@ -94,11 +94,11 @@ class Selector s where
select :: CId -> Scope -> Maybe Int -> TcM s (Expr,TType)
instance Applicative (TcM s) where
- pure = return
+ pure x = TcM (\abstr k h -> k x)
(<*>) = ap
instance Monad (TcM s) where
- return x = TcM (\abstr k h -> k x)
+ return = pure
f >>= g = TcM (\abstr k h -> unTcM f abstr (\x -> unTcM (g x) abstr k h) h)
instance Selector s => Alternative (TcM s) where