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

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

jobs:
build-mhs-optparse-applicative:
runs-on: ubuntu-latest
steps:

- name: checkout mhs repo
uses: actions/checkout@v4
with:
repository: augustss/MicroHs
path: mhs
- name: make and install mhs
run: |
cd mhs
make install

# install dependencies
- name: compile and install packages
run: |
PATH="$HOME/.mcabal/bin:$PATH"
mcabal -q install ghc-compat
mcabal -q install transformers
mcabal -q install colour
mcabal -q install ansi-terminal-types
mcabal -q install ansi-terminal
mcabal -q install --git=https://github.com/augustss/prettyprinter.git --dir=prettyprinter prettyprinter
mcabal -q install --git=https://github.com/augustss/prettyprinter.git --dir=prettyprinter-ansi-terminal prettyprinter-ansi-terminal

# optparse-applicative
- name: checkout optparse-applicative repo
uses: actions/checkout@v4
with:
path: optparse-applicative
- name: compile and install optparse-applicative package
run: |
PATH="$HOME/.mcabal/bin:$PATH"
cd optparse-applicative
mcabal install

- name: cleanup
run: |
rm -rf $HOME/.mcabal
2 changes: 1 addition & 1 deletion optparse-applicative.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ library
if flag(process)
build-depends: process >= 1.0 && < 1.7

if !impl(ghc >= 8)
if !impl(ghc >= 8) && !impl(mhs)
build-depends: semigroups >= 0.10 && < 0.21
, fail == 4.9.*

Expand Down
3 changes: 3 additions & 0 deletions src/Options/Applicative/BashCompletion.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
-- | You don't need to import this module to enable bash completion.
--
-- See
Expand All @@ -13,7 +14,9 @@ module Options.Applicative.BashCompletion

import Control.Applicative
import Prelude
#if !defined(__MHS__)
import Data.Foldable ( asum )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for GHC 9.0 and below, which we still support.

#endif
import Data.List ( isPrefixOf )
import Data.Maybe ( fromMaybe, listToMaybe )

Expand Down