Skip to content
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
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.ghc }}-plan.json
path: mtl-*/dist-newstyle/cache/plan.json

# - name: Test
# run: |
# cabal --enable-tests --test-show-details=direct all
- name: Test
run: |
cabal test

- name: Haddock
run: |
Expand Down Expand Up @@ -166,12 +166,16 @@ jobs:
# build
stack build

- name: Test
run: |
stack test

mhs:
name: "MicroHS ${{ matrix.mhs }}"
runs-on: ubuntu-latest
strategy:
matrix:
mhs: ["0.15.4.0"]
mhs: ["0.16.0.0"]
fail-fast: false
steps:
- name: checkout mhs repo
Expand All @@ -196,3 +200,8 @@ jobs:
run: |
cd mtl
mcabal -r install

- name: test
run: |
cd mtl
mcabal test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dist
dist-boot
dist-install
dist-mcabal
dist-newstyle
ghc.mk
GNUmakefile
Expand All @@ -20,6 +21,7 @@ cabal.sandbox.config
*.hp
*.eventlog
.stack-work/
stack.yaml*
cabal.project.local*
.HTF/
.ghc.environment.*
Expand Down
5 changes: 0 additions & 5 deletions Control/Monad/Cont/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,7 @@ class Monad m => MonadCont (m :: Type -> Type) where
{-# MINIMAL callCC #-}

-- | @since 2.3.1
#ifdef __MHS__
-- The ContT type is not polykinded with mhs.
instance MonadCont (ContT r m) where
#else
instance forall k (r :: k) (m :: (k -> Type)) . MonadCont (ContT r m) where
#endif
callCC = ContT.callCC

-- ---------------------------------------------------------------------------
Expand Down
11 changes: 10 additions & 1 deletion mtl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ extra-source-files:
extra-doc-files:
CHANGELOG.markdown

tested-with: GHC ==8.10 || ==9.2 || ==9.8 || ==9.10 || ==9.12, MHS ==0.14.15.0
tested-with:
, GHC ==8.10 || ==9.2 || ==9.8 || ==9.10 || ==9.12 || ==9.14
, MHS ==0.16.0.0

source-repository head
type: git
Expand Down Expand Up @@ -67,3 +69,10 @@ Library
-Wmissing-export-lists

default-language: Haskell2010

test-suite MonadCont
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: MonadCont.hs
default-language: Haskell2010
build-depends: base, mtl, transformers
19 changes: 19 additions & 0 deletions test/MonadCont.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}

{-# OPTIONS_GHC -Wno-unused-binds #-}

module Main (main) where

import Control.Monad.Trans.Cont (ContT)
import Control.Monad.Cont.Class (MonadCont (callCC))
import Data.Proxy (Proxy)

#ifdef __GLASGOW_HASKELL__
-- Test that MonadCont is possible with polykinded ContT
x :: (ContT 42 Proxy) ()
x = callCC $ \_ -> return ()
#endif

main :: IO ()
main = return ()
Loading