From 0b6d01e34a8bdd1f24b0a6a305d7480ebe6b4451 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:01:15 +0700 Subject: [PATCH 01/15] Add CI for MicroHs --- .github/workflows/mhs.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/mhs.yml diff --git a/.github/workflows/mhs.yml b/.github/workflows/mhs.yml new file mode 100644 index 0000000..2b14717 --- /dev/null +++ b/.github/workflows/mhs.yml @@ -0,0 +1,24 @@ +name: MicroHs + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: sol/setup-MicroHs@nightly + - run: mcabal -r build From 9925f32a1e7cc05a0e04a8cb05e576c34d8aff1b Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:20:11 +0700 Subject: [PATCH 02/15] Update Unlit.hs --- src/Text/Markdown/Unlit.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Text/Markdown/Unlit.hs b/src/Text/Markdown/Unlit.hs index 948e6ed..e73c13f 100644 --- a/src/Text/Markdown/Unlit.hs +++ b/src/Text/Markdown/Unlit.hs @@ -18,10 +18,10 @@ module Text.Markdown.Unlit ( ) where import Prelude () -import Prelude.Compat +import Prelude import Control.Arrow import Data.Char -import Data.List.Compat +import Data.List import Data.Maybe import Data.String import System.Environment From a6528b2e33291dad5a98a66a83b8fc26b981c1dc Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:21:32 +0700 Subject: [PATCH 03/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 1 - 1 file changed, 1 deletion(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index a80ecef..04d1782 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -28,7 +28,6 @@ library ghc-options: -Wall build-depends: base ==4.* - , base-compat exposed-modules: Text.Markdown.Unlit other-modules: From 84e558c58b4fdc090de9844b30dfee6ff27c873b Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:25:44 +0700 Subject: [PATCH 04/15] Update Unlit.hs --- src/Text/Markdown/Unlit.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/Markdown/Unlit.hs b/src/Text/Markdown/Unlit.hs index e73c13f..14a7122 100644 --- a/src/Text/Markdown/Unlit.hs +++ b/src/Text/Markdown/Unlit.hs @@ -49,7 +49,7 @@ run args = -- #line 1 "label" -- case break (== "-h") args of - (mkSelector -> selector, "-h" : files) -> case files of + ((mkSelector -> selector), "-h" : files) -> case files of [src, cur, dst] -> do readFileUtf8 cur >>= writeFileUtf8 dst . unlit src selector [src] -> do From 4d32b0f0e3324e9c447b13acf3c44d9ad9ca429f Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:27:52 +0700 Subject: [PATCH 05/15] Update mhs.yml --- .github/workflows/mhs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mhs.yml b/.github/workflows/mhs.yml index 2b14717..b47ac54 100644 --- a/.github/workflows/mhs.yml +++ b/.github/workflows/mhs.yml @@ -16,7 +16,7 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest + # - macos-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 2c8e63f10cfac0cfaaa97bf519edfaba54fa373f Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:29:18 +0700 Subject: [PATCH 06/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 2 -- 1 file changed, 2 deletions(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index 04d1782..5fba622 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -44,7 +44,6 @@ executable markdown-unlit build-depends: base ==4.* , base-compat - , markdown-unlit default-language: Haskell2010 test-suite spec @@ -60,7 +59,6 @@ test-suite spec build-depends: QuickCheck , base ==4.* - , base-compat , directory , hspec ==2.* , silently From 83a956274c934687eb84a855be8a3a217c5fe9d1 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:32:39 +0700 Subject: [PATCH 07/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index 5fba622..89390dc 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -43,7 +43,7 @@ executable markdown-unlit ghc-options: -Wall build-depends: base ==4.* - , base-compat + , markdown-unlit default-language: Haskell2010 test-suite spec From 21556a72d2ccfd268fa2aad334101dd8fd5622b5 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 23:39:42 +0700 Subject: [PATCH 08/15] Update mhs.yml --- .github/workflows/mhs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mhs.yml b/.github/workflows/mhs.yml index b47ac54..8eb37b3 100644 --- a/.github/workflows/mhs.yml +++ b/.github/workflows/mhs.yml @@ -22,3 +22,4 @@ jobs: - uses: actions/checkout@v4 - uses: sol/setup-MicroHs@nightly - run: mcabal -r build + - run: dist-mcabal/bin/mhs/markdown-unlit From b300fa94a0528b6ed24673b65faabc480b862589 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 9 Dec 2025 00:07:26 +0700 Subject: [PATCH 09/15] Update UnlitSpec.hs --- test/Text/Markdown/UnlitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/Text/Markdown/UnlitSpec.hs b/test/Text/Markdown/UnlitSpec.hs index 8c0754f..586973b 100644 --- a/test/Text/Markdown/UnlitSpec.hs +++ b/test/Text/Markdown/UnlitSpec.hs @@ -2,7 +2,6 @@ module Text.Markdown.UnlitSpec (main, spec) where import Test.Hspec -import Test.QuickCheck import Data.String.Builder import System.Environment import Control.Exception @@ -113,9 +112,6 @@ spec = do it "can handle a combination of :&: and :|:" $ do parseSelector "foo+bar baz+bar" `shouldBe` Just ("foo" :&: "bar" :|: "baz" :&: "bar") - it "is total" $ do - property $ \xs -> parseSelector xs `seq` True - describe "unlit" $ do it "can be used to unlit everything with a specified class" $ do unlit "Foo.lhs" "foo" . build $ do From 298721b9303eccc234a96bfe7d7b92e9880cc0bf Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 9 Dec 2025 00:08:42 +0700 Subject: [PATCH 10/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index 89390dc..27b2a19 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -57,10 +57,9 @@ test-suite spec build-tool-depends: hspec-discover:hspec-discover build-depends: - QuickCheck - , base ==4.* + base ==4.* , directory - , hspec ==2.* + , nanospec , silently , stringbuilder , temporary From 77ad936d8c0d1602b5e0d9f9e9e59288b8f2f584 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 10 Dec 2025 00:47:33 +0700 Subject: [PATCH 11/15] Update Spec.hs --- test/Spec.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/Spec.hs b/test/Spec.hs index a824f8c..ad9f935 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1 +1,7 @@ -{-# OPTIONS_GHC -F -pgmF hspec-discover #-} +module Main where + +import Test.Hspec +import Text.Markdown.UnlitSpec + +main :: IO () +main = hspec Text.Markdown.UnlitSpec.spec From 97b7e58bd883e09b973061133ee674d8a92e2aac Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 10 Dec 2025 00:52:13 +0700 Subject: [PATCH 12/15] Update Spec.hs --- test/Spec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Spec.hs b/test/Spec.hs index ad9f935..1ee3230 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,7 +1,7 @@ module Main where import Test.Hspec -import Text.Markdown.UnlitSpec +import qualified Text.Markdown.UnlitSpec main :: IO () main = hspec Text.Markdown.UnlitSpec.spec From 8649c5089b536ed3a78c77552f108b69fed33632 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 10 Dec 2025 00:56:30 +0700 Subject: [PATCH 13/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index 27b2a19..7af55c0 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -46,16 +46,13 @@ executable markdown-unlit , markdown-unlit default-language: Haskell2010 -test-suite spec - type: exitcode-stdio-1.0 +executable spec main-is: Spec.hs hs-source-dirs: test src ghc-options: -Wall cpp-options: -DTEST - build-tool-depends: - hspec-discover:hspec-discover build-depends: base ==4.* , directory From d95b40c3a85cbb3e0de94cb895393433d8afcf23 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 10 Dec 2025 00:57:11 +0700 Subject: [PATCH 14/15] Update mhs.yml --- .github/workflows/mhs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mhs.yml b/.github/workflows/mhs.yml index 8eb37b3..506e8af 100644 --- a/.github/workflows/mhs.yml +++ b/.github/workflows/mhs.yml @@ -22,4 +22,4 @@ jobs: - uses: actions/checkout@v4 - uses: sol/setup-MicroHs@nightly - run: mcabal -r build - - run: dist-mcabal/bin/mhs/markdown-unlit + - run: dist-mcabal/bin/mhs/spec From 93b277d7b29d6195382a2f278fe3fe8ddf08b678 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 10 Dec 2025 01:01:40 +0700 Subject: [PATCH 15/15] Update markdown-unlit.cabal --- markdown-unlit.cabal | 1 - 1 file changed, 1 deletion(-) diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal index 7af55c0..ebbac60 100644 --- a/markdown-unlit.cabal +++ b/markdown-unlit.cabal @@ -57,7 +57,6 @@ executable spec base ==4.* , directory , nanospec - , silently , stringbuilder , temporary other-modules: