Skip to content

ogma-core: Import liftIO from Control.Monad.IO.Class. Refs #215.#218

Merged
ivanperez-keera merged 2 commits intonasa:developfrom
ivanperez-keera:develop-core-liftIO
Jan 26, 2025
Merged

ogma-core: Import liftIO from Control.Monad.IO.Class. Refs #215.#218
ivanperez-keera merged 2 commits intonasa:developfrom
ivanperez-keera:develop-core-liftIO

Conversation

@ivanperez-keera
Copy link
Member

Replace all imports of liftIO from Control.Monad.Except with imports from Control.Monad.IO.Class in both ogma-core:Command.ROSApp and ogma-core:Command.FPrimeApp, as prescribed in the solution proposed for #215.

Installing Ogma with GHC 9.6 and it fails because the modules
ogma-core:Command.ROSApp and ogma-core:Command.FPrimeApp import liftIO
from Control.Monad.Except, which is no longer exported by that module.

This is important in general to keep Ogma working with new versions of
tools and libraries in the Haskell ecosystem, and to facilitate getting
Ogma included in standard distributions.

This commit replaces all imports of liftIO from Control.Monad.Except
with imports from Control.Monad.IO.Class in both
ogma-core:Command.ROSApp and ogma-core:Command.FPrimeApp.
@ivanperez-keera
Copy link
Member Author

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles and passes all tests. Details:
    • The solution proposed produces the expected result. Details:
      The following Dockerfile installs Ogma with GHC 9.6, after which it prints the message "Success":
      FROM ubuntu:focal
      
      RUN apt-get update
      
      RUN apt-get install --yes libz-dev
      RUN apt-get install --yes git
      
      # RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
      RUN apt-get install --yes wget
      RUN mkdir -p $HOME/.ghcup/bin
      RUN wget https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -O $HOME/.ghcup/bin/ghcup
      
      RUN chmod a+x $HOME/.ghcup/bin/ghcup
      ENV PATH=$PATH:/root/.ghcup/bin/
      ENV PATH=$PATH:/root/.cabal/bin/
      RUN apt-get install --yes curl
      RUN apt-get install --yes gcc g++ make libgmp3-dev
      RUN ghcup install ghc 9.6.6
      RUN ghcup install cabal 3.2
      RUN ghcup set ghc 9.6.6
      RUN cabal update
      
      SHELL ["/bin/bash", "-c"]
      CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && export PATH=$PATH:$PWD/.cabal-sandbox/bin/ \
          && cabal v1-sandbox init \
          && cabal v1-install alex happy \
          && cabal v1-install BNFC \
          && cabal v1-install ogma-**/ \
          && cabal v1-install ogma-**/ --enable-tests \
          && echo Success
      Command (substitute variables based on new path after merge):
      $ docker run -e "REPO=https://github.com/ivanperez-keera/ogma" -e "NAME=ogma" -e "PAT=ogma" -e "COMMIT=ed0f39494127e3293b4214fd723ca4ed384ce708" -it ogma-verify-215
      
  • Implementation is documented. Details:
    No updates needed; change is only to imports.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No updates needed; change is only to imports.
  • Required version bumps are evaluated. Details:
    Bump not needed; change does not affect API or user interface.

@ivanperez-keera ivanperez-keera merged commit f6b698b into nasa:develop Jan 26, 2025
2 checks passed
@ivanperez-keera ivanperez-keera deleted the develop-core-liftIO branch January 26, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant