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
59 changes: 59 additions & 0 deletions .github/workflows/mhs-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: mhs-ci

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build-mhs-prettyprinter:
runs-on: ubuntu-latest
steps:

- name: checkout mhs repo
uses: actions/checkout@v4
with:
repository: augustss/MicroHs
ref: v0.15.4.0
path: mhs
- name: make and install mhs
run: |
cd mhs
make minstall
Comment thread
sjakobi marked this conversation as resolved.
echo "$HOME/.mcabal/bin" >> "$GITHUB_PATH"

# prettyprinter
- name: checkout prettyprinter repo
uses: actions/checkout@v4
with:
path: prettyprinter

- name: compile and install prettyprinter package
run: |
cd prettyprinter/prettyprinter
mcabal -r install

- name: compile and install prettyprinter-ansi-terminal package
run: |
cd prettyprinter/prettyprinter-ansi-terminal
mcabal -r install

- name: compile and install prettyprinter-compat-annotated-wl-pprint package
run: |
cd prettyprinter/prettyprinter-compat-annotated-wl-pprint
mcabal -r install

- name: compile and install prettyprinter-compat-ansi-wl-pprint package
run: |
cd prettyprinter/prettyprinter-compat-ansi-wl-pprint
mcabal -r install

- name: compile and install prettyprinter-compat-wl-pprint package
run: |
cd prettyprinter/prettyprinter-compat-wl-pprint
mcabal -r install

- name: cleanup
run: |
rm -rf $HOME/.mcabal
2 changes: 1 addition & 1 deletion misc/version-compatibility-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-- purpose much clearer than just demanding a specific version of a library.

#define APPLICATIVE_MONAD MIN_VERSION_base(4,8,0)
#define FOLDABLE_TRAVERSABLE_IN_PRELUDE MIN_VERSION_base(4,8,0)
#define FOLDABLE_TRAVERSABLE_IN_PRELUDE (MIN_VERSION_base(4,8,0) && !defined(__MHS__))
#define FUNCTOR_IDENTITY_IN_BASE MIN_VERSION_base(4,8,0)
#define MONOID_IN_PRELUDE MIN_VERSION_base(4,8,0)
#define NATURAL_IN_BASE MIN_VERSION_base(4,8,0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ library

if impl(ghc >= 8.0)
ghc-options: -Wcompat
if !impl(ghc >= 8.0)
if !impl(ghc >= 8.0) && !impl(mhs)
build-depends: semigroups >= 0.1

test-suite doctest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ library
, prettyprinter >= 1.7.0
, prettyprinter-ansi-terminal >= 1.1

if !impl(ghc >= 8.0)
if !impl(ghc >= 8.0) && !impl(mhs)
build-depends: semigroups >= 0.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ library
, text >= 1.2
, prettyprinter >= 1.7.0

if !impl(ghc >= 8.0)
if !impl(ghc >= 8.0) && !impl(mhs)
build-depends: semigroups >= 0.1
7 changes: 3 additions & 4 deletions prettyprinter/prettyprinter.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,18 @@ library
, Data.Text.Lazy
, Data.Text.Lazy.Builder

if !impl(ghc >= 7.6)
if !impl(ghc >= 7.6) && !impl(mhs)
build-depends: ghc-prim

if impl(ghc >= 8.0)
ghc-options: -Wcompat
if !impl(ghc >= 8.0)
if !impl(ghc >= 8.0) && !impl(mhs)
build-depends: semigroups >= 0.17
build-depends: fail >= 4.9.0.0 && <4.10
if !impl(ghc >= 7.10)
if !impl(ghc >= 7.10) && !impl(mhs)
build-depends: void >=0.4 && <0.8



Flag buildReadme
Description: Build the readme generator
Default: False
Expand Down
2 changes: 1 addition & 1 deletion prettyprinter/src/Prettyprinter/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ import Numeric.Natural
#if !(FOLDABLE_TRAVERSABLE_IN_PRELUDE)
import Data.Foldable (Foldable (..))
import Data.Traversable (Traversable (..))
import Prelude hiding (foldr, foldr1)
import Prelude hiding (null, foldr, foldr1)
#endif

#if FUNCTOR_IDENTITY_IN_BASE
Expand Down
Loading