Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on ghc. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at <http://angg.twu.net/e/ghc.e> # or at <http://angg.twu.net/e/ghc.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/.emacs[.html]>, # <http://angg.twu.net/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### # «.building» (to "building") # «.get-ghcup» (to "get-ghcup") # «.get-ghcup-messages» (to "get-ghcup-messages") # «.hls» (to "hls") # «.ghc-8.10.3» (to "ghc-8.10.3") # «.stack» (to "stack") # https://gitlab.haskell.org/ghc/ghc # https://gitlab.haskell.org/ghc/ghc/wikis/building # https://gitlab.haskell.org/ghc/ghc/wikis/building/getting-the-sources#cloning-from-github # https://gitlab.haskell.org/ghc/ghc/wikis/building/getting-the-sources#via-git-repositories # https://www.haskell.org/ghc/ # https://www.haskell.org/ghc/download_ghc_8_6_5.html # https://www.haskell.org/downloads/ # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html ##### # # building # 2022oct03 # ##### # «building» (to ".building") # «get-ghcup» (to ".get-ghcup") # https://gitlab.haskell.org/ghc/ghc/-/wikis/building # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/getting-the-sources # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/preparation # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/using # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/standard-targets # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/quick-start # https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian # https://www.haskell.org/ghc/ # https://www.haskell.org/ghc/download_ghc_9_4_2.html # https://www.haskell.org/downloads/ # https://www.haskell.org/ghcup/ # (find-sh "curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org") # curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # (find-fline "~/usrc/get-ghcup/") rm -Rv ~/usrc/get-ghcup/ mkdir ~/usrc/get-ghcup/ cd ~/usrc/get-ghcup/ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org > get-ghcup chmod 755 get-ghcup * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # (find-fline "~/.stack/") # (find-fline "~/.cabal/") # (find-fline "~/.ghc/") # (find-fline "~/.ghcup/") # (find-sh "du -ch ~/.ghcup/") rm -Rf ~/.ghcup/ * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # (find-fline "~/usrc/get-ghcup/get-ghcup") # (find-fline "~/usrc/get-ghcup/get-ghcup" "ask_hls() {") # (find-fline "~/usrc/get-ghcup/get-ghcup" "ask_stack() {") cd ~/usrc/get-ghcup/ ./get-ghcup https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation-experimental ##### # # get-ghcup-messages # 2022oct03 # ##### # «get-ghcup-messages» (to ".get-ghcup-messages") Welcome to Haskell! This script can download and install the following binaries: * ghcup - The Haskell toolchain installer * ghc - The Glasgow Haskell Compiler * cabal - The Cabal build tool for managing Haskell software * stack - A cross-platform program for developing Haskell projects (similar to cabal) * hls - (optional) A language server for developers to integrate with their editor/IDE ghcup installs only into the following directory, which can be removed anytime: /home/edrx/.ghcup System requirements Please ensure the following distro packages are installed before continuing (you can exit ghcup and return at any time): build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 In order to run ghc and cabal, you need to adjust your PATH variable. To do so, you may want to run 'source /home/edrx/.ghcup/env' in your current terminal session as well as your shell configuration (e.g. ~/.bashrc). All done! To start a simple repl, run: ghci To start a new haskell project in the current directory, run: cabal init --interactive To install other GHC versions and tools, run: ghcup tui If you are new to Haskell, check out https://www.haskell.org/ghcup/steps/ * (eepitch-ghci) * (eepitch-kill) * (eepitch-ghci) ##### # # hls # 2022oct03 # ##### # «hls» (to ".hls") # https://haskell-language-server.readthedocs.io/en/stable/ # https://haskell-language-server.readthedocs.io/en/stable/what-is-hls.html#what-is-haskell-language-server ##### # # ghc-8.10.3 # 2021jan10 # ##### # «ghc-8.10.3» (to ".ghc-8.10.3") # https://www.haskell.org/ghc/ # https://www.haskell.org/ghc/download_ghc_8_10_3.html # https://downloads.haskell.org/~ghc/8.10.3/ghc-8.10.3-src.tar.xz * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # (find-fline "~/bigsrc/ghc-8.10.3/") rm -Rv ~/bigsrc/ghc-8.10.3/ mkdir ~/bigsrc/ghc-8.10.3/ tar -C ~/bigsrc/ \ -xJvf $S/https/downloads.haskell.org/~ghc/8.10.3/ghc-8.10.3-src.tar.xz cd ~/bigsrc/ghc-8.10.3/ # (code-c-d "ghc" "~/bigsrc/ghc-8.10.3/") # (code-c-d "ghclib" "~/bigsrc/ghc-8.10.3/libraries/") # (find-ghcfile "") # (find-ghcsh "find * | sort") # (find-ghcsh "find * | sort | grep html") # (find-ghcsh "find * | sort | grep 'html$'") # (find-ghclibsh "find * | sort") # (find-ghclibfile "") # (find-ghclibfile "base/Control/Monad.hs") # (find-ghclibfile "base/Control/Monad.hs" "guard True") # (find-ghcfile "INSTALL.md") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/bigsrc/ghc-8.10.3/ cp -v mk/build.mk.sample mk/build.mk ./configure |& tee oc make html |& tee omh # file:///home/edrx/bigsrc/ghc-8.10.3/docs/users_guide/build-html/users_guide/index.html export PATH=$HOME/.cabal/bin:$PATH ./boot |& tee ob ./configure |& tee oc w ghc # (find-ghcfile "docs/core-spec/README") (code-pdf-page "ghccorespec" "~/bigsrc/ghc-8.10.3/docs/core-spec/core-spec.pdf") (code-pdf-text "ghccorespec" "~/bigsrc/ghc-8.10.3/docs/core-spec/core-spec.pdf") ;; (find-ghccorespecpage) ;; (find-ghccorespectext) https://www.haskell.org/documentation/ https://haskell.org/onlinereport/haskell2010/ https://haskell.org/definition/haskell2010.pdf ##### # # stack # 2019jun07 # ##### # «stack» (to ".stack") # https://github.com/commercialhaskell/stack # https://docs.haskellstack.org/en/stable/README/ # https://docs.haskellstack.org/en/stable/GUIDE/ * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd /tmp/ wget -qO- https://get.haskellstack.org/ > /tmp/ogs wget -qO- https://get.haskellstack.org/ | sh # apti gcc make libffi zlib libgmp libtinfo # (find-zsh "availabledebs | sort | grep libffi") # (find-zsh "availabledebs | sort | grep zlib") # (find-zsh "availabledebs | sort | grep libgmp") # (find-zsh "availabledebs | sort | grep libtinfo") apti gcc make libffi-dev zlib1g-dev libgmp-dev libtinfo-dev # (find-fline "/usr/local/bin/" "stack") # Use 'stack upgrade' or your OS's package manager to upgrade, cd /tmp/ stack upgrade stack update # (find-sh "stack --help") # (find-fline "~/.stack/") # (find-fline "~/.stack/programs/x86_64-linux/") stack install ghc stack ls stack path stack ghc stack ghci * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rfv ~/.stack/ https://github.com/ndmitchell/ghcid https://wiki.haskell.org/GHC/FAQ#Why_doesn.27t_.22x.3D1.22_work_at_the_ghci_prompt.3F # Local Variables: # coding: utf-8-unix # ee-anchor-format: "«%s»" # End: