Code Monkey home page Code Monkey logo

haskell's Introduction

Dockerを使用したHaskellの環境構築手順について

HaskellはWindowsやMacの上に構築することも可能ですが、Dockerコンテナの上で実行することで完全な再現性が得られます。 加えてHaskell自体にもバージョンが存在するため、それらを容易に切り替えるとなおよいでしょう。

Docker for Desktopのインストール

前提条件として、Docker for Desktopのインストールが求められます。

  • MacOSへのインストールの場合は、こちらを確認してください。

https://minegishirei.hatenablog.com/entry/2023/09/03/143528

  • Windowsへのインストールはこちらからも可能です。

https://minegishirei.hatenablog.com/entry/2023/09/04/115946

インストールのコマンド

以下のコマンドを順に実行していけばDockerによる環境構築は完了です。

git clone https://github.com/minegishirei/Haskell.git
cd Haskell
docker-compose build
docker-compose run haskell bash

実行

codeディレクトリの中に簡単なHello worldプログラムを用意しました。 以下のコマンドを実行して確認してみてください。

ghc helloworld.hs
./helloworld

page:https://minegishirei.hatenablog.com/entry/2023/11/21/085934

参考

https://hub.docker.com/_/haskell

haskell's People

Contributors

minegishirei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.