Last active
July 31, 2017 16:34
-
-
Save genkuroki/33b506e2a730a1400fa050e2aa1c3d39 to your computer and use it in GitHub Desktop.
Docs/HaskellのWindowsへのインストール.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "# HaskellのWindowsへのインストール\n\n黒木玄\n\n2017-07-31" | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Stack\n\n(1) https://docs.haskellstack.org/en/stable/install_and_upgrade/ からインストーラ―\n\n stack-1.5.0-windows-x86_64-installer.exe\n\nをダウンロードして、`stack.exe` をインストールした。\n\nそのとき `C:\\Stack` に `stack.exe` がインストールされるようにした。\n\n自動的に `C:\\sr` が環境変数 `STACK_ROOT` に設定された。\n\n(2) コマンドラインで\n\n stack setup\n\nを実行した。かなり時間がかかった。\n\n筆者の環境では、23:20に始めて、ghcのダウンロード(140MB)とインストールが終わったのは24:00頃。\n\nさらにそこからmsys2のダウンロードが始まった。これがまた遅い。\n\n結局、終了したのは24:20頃です。ちょうど1時間かかった。\n\n```\n###################################################################\n# #\n# #\n# C A U T I O N #\n# #\n# This is first start of MSYS2. #\n# You MUST restart shell to apply necessary actions. #\n# #\n# #\n###################################################################\n\n\nstack will use a sandboxed GHC it installed\nFor more information on paths, see 'stack path' and 'stack exec env'\nTo use this GHC and packages outside of a project, consider using:\nstack ghc, stack ghci, stack runghc, or stack exec\n```\n\nなぜかCAUTIONが出ているのですが、大したことではさそう。\n\nstack setup で\n\n C:\\Users\\genkuroki\\AppData\\Local\\Programs\\stack\\x86_64-windows\n\n以下に色々インストールされていました。\n\n(3) Atom editorの設定\n\nこれに関しては\n\nhttp://qiita.com/td2sk/items/9e4b49a4a31b7138d3ad\n\nを参考にした。そこに書いてあるようにPATHが通っている `C:\\Stack` に以下のバッチファイルを作成した。\n\nghc-mod.bat\n```\n@stack exec -- ghc-mod %*\n```\n\nghc-mod-configure.bat\n```\n@FOR /F \"usebackq\" %%t IN (`stack path --snapshot-pkg-db`) DO @SET SNAPSHOT_DB=%%t\n@FOR /F \"usebackq\" %%t IN (`stack path --local-pkg-db`) DO @SET LOCAL_DB=%%t\n@FOR /F \"usebackq\" %%t IN (`stack path --bin-path`) DO @SET BIN_PATH=%%t\n@SET PATH=%PATH%;%BIN_PATH::C:\\=;C:\\%\n@cabal configure --package-db=clear --package-db=global --package-db=%SNAPSHOT_DB% --package-db=%LOCAL_DB%\n```\n\nさらに Atom に以下のパッケージを入れた。\n\n```\nlanguage-haskell\nautocomplete-haskell\nhaskell-ghc-mod\nhaskell-grammer\n```\n\ncabal ファイル更新のたびに以下の再実行が必要\n\n```\nREM 作業ディレクトリに移動\ncd workspace\\sample\n\nREM 更新\nghc-mod-configure\n```\n\n忘れると、Atomの方でエラーが出る。\n\nhttp://qiita.com/belliture/items/d2bb5326e427f1e32163 の方針に従った方がよいかも。" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "", | |
"execution_count": null, | |
"outputs": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"name": "julia-0.6", | |
"display_name": "Julia 0.6.0", | |
"language": "julia" | |
}, | |
"language_info": { | |
"file_extension": ".jl", | |
"name": "julia", | |
"mimetype": "application/julia", | |
"version": "0.6.0" | |
}, | |
"toc": { | |
"threshold": 4, | |
"number_sections": true, | |
"toc_cell": false, | |
"toc_window_display": false, | |
"toc_section_display": "block", | |
"sideBar": true, | |
"navigate_menu": true, | |
"moveMenuLeft": true, | |
"widenNotebook": false, | |
"colors": { | |
"hover_highlight": "#DAA520", | |
"selected_highlight": "#FFD700", | |
"running_highlight": "#FF0000", | |
"wrapper_background": "#FFFFFF", | |
"sidebar_border": "#EEEEEE", | |
"navigate_text": "#333333", | |
"navigate_num": "#000000" | |
}, | |
"nav_menu": { | |
"height": "12px", | |
"width": "252px" | |
} | |
}, | |
"gist": { | |
"id": "33b506e2a730a1400fa050e2aa1c3d39", | |
"data": { | |
"description": "Docs/HaskellのWindowsへのインストール.ipynb", | |
"public": true | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment