Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on (Haskell) Stack.
#
# 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/stack.e>
#           or at <http://angg.twu.net/e/stack.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/>.
#
#######




# «.mailing-list»	(to "mailing-list")
# «.docs»		(to "docs")
# «.debian»		(to "debian")
# «.stack-upgrade»	(to "stack-upgrade")
# «.source»		(to "source")
# «.generic-linux»	(to "generic-linux")
# «.delete-stack»	(to "delete-stack")
# «.Agda-2.6.1»		(to "Agda-2.6.1")
# «.ghcup-and-stack»	(to "ghcup-and-stack")
# «.stack-exec»		(to "stack-exec")
# «.global-project»	(to "global-project")



# (find-sh "stack --help")
# (find-sh "stack --help" "-v,--verbose")

# (find-fline "~/.stack/")
# (find-fline "~/.stack/programs/")
# (find-fline "~/.stack/programs/x86_64-linux/")
# (find-fline "~/.stack/indices/")
# (find-fline "~/.stack/indices/Hackage/")




#####
#
# Mailing list (at Google Groups)
# 2021jul26
#
#####

# «mailing-list»  (to ".mailing-list")
# https://groups.google.com/g/haskell-stack




#####
#
# docs
# 2021jul25
#
#####

# «docs»  (to ".docs")
# http://haskellstack.org/
# https://docs.haskellstack.org/en/stable/README/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-sh "stack path")
stack path




#####
#
# debian
# 2021apr24
#
#####

# «debian»  (to ".debian")
# (find-status   "haskell-stack")
# (find-vldifile "haskell-stack.list")
# (find-vldifile "haskell-stack.list" "/usr/bin/stack")
# (find-udfile   "haskell-stack/")

# https://docs.haskellstack.org/en/stable/install_and_upgrade/
# https://docs.haskellstack.org/en/stable/install_and_upgrade/#debian

# There is also a Debian package for Stretch and up, but the
# distribution's Stack version lags behind, so running stack upgrade
# --binary-only is recommended after installing it. For older stack
# versions which do not support --binary-only, just stack upgrade may
# work too.

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# stack  upgrade --binary-only
stack -v upgrade --binary-only

# [info] Current Stack version: 1.7.1, available download version: 2.5.1
# [info] Newer version detected, downloading
# [info] Querying for archive location for platform: linux-x86_64-static
# [info] Querying for archive location for platform: linux-x86_64
# [info] Downloading from: https://github.com/commercialhaskell/stack/releases/download/v2.5.1/stack-2.5.1-linux-x86_64.tar.gz
# [info] Download complete, testing executable
# [info] New stack executable available at /home/edrx/.local/bin/stack
# [info] Also copying stack executable to /usr/bin/stack
# [warn] Permission error when trying to copy: /usr/bin: copyFile:atomicCopyFileContents:withReplacementFile:openBinaryTempFile: permission denied (Permission denied)
# [warn] Should I try to perform the file copy using sudo? This may fail
# [info] Going to run the following commands:
# [info] 
# [info] -  sudo cp /home/edrx/.local/bin/stack /usr/bin/stack.tmp
# [info] -  sudo mv /usr/bin/stack.tmp /usr/bin/stack
# [debug] Run process: /usr/bin/sudo cp /home/edrx/.local/bin/stack /usr/bin/stack.tmp
# [debug] Process finished in 196ms: /usr/bin/sudo cp /home/edrx/.local/bin/stack /usr/bin/stack.tmp
# [debug] Run process: /usr/bin/sudo mv /usr/bin/stack.tmp /usr/bin/stack
# [debug] Process finished in 503ms: /usr/bin/sudo mv /usr/bin/stack.tmp /usr/bin/stack
# [info] 
# [info] sudo file copy worked!



#####
#
# stack-upgrade
# 2021jul26
#
#####

# «stack-upgrade»  (to ".stack-upgrade")

/home/edrx/AGDA(edrx:sc)# stack upgrade
Current Stack version: 2.5.1, available download version: 2.7.3
Newer version detected, downloading
Querying for archive location for platform: linux-x86_64-static
Downloading from: https://github.com/commercialhaskell/stack/releases/download/v2.7.3/stack-2.7.3-linux-x86_64-static.tar.gz
Download complete, testing executable
Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
New stack executable available at /home/edrx/.local/bin/stack
Also copying stack executable to /usr/local/bin/stack
Permission error when trying to copy: /usr/local/bin: copyFile:atomicCopyFileContents:withReplacementFile:openBinaryTempFile: permission denied (Permission denied)
Should I try to perform the file copy using sudo? This may fail
Try using sudo? (y/n) y
Going to run the following commands:

-  sudo cp /home/edrx/.local/bin/stack /usr/local/bin/stack.tmp
-  sudo mv /usr/local/bin/stack.tmp /usr/local/bin/stack

sudo file copy worked!
/home/edrx/AGDA(edrx:sc)# 



#####
#
# generic-linux
# 2021apr24
#
#####

# «generic-linux»  (to ".generic-linux")
# https://docs.haskellstack.org/en/stable/install_and_upgrade/#linux

# Linux (generic)
# Installer script
# Run:
#   curl -sSL https://get.haskellstack.org/ | sh
# or:
#   wget -qO- https://get.haskellstack.org/ | sh

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
rm -v getstack.sh
wget -qO- https://get.haskellstack.org/ | tee getstack.sh
# (find-fline "/tmp/getstack.sh")

# https://get.haskellstack.org/
# https://raw.githubusercontent.com/commercialhaskell/stack/stable/etc/scripts/get-stack.sh

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
# wget -qO- https://get.haskellstack.org/ | sh
  wget -qO- https://get.haskellstack.org/ | sudo sh
  wget -qO- https://get.haskellstack.org/ | sudo sh -s - -f
  wget -qO- https://get.haskellstack.org/ | sudo sh -s - -d -d /usr/local/bin/

# (find-fline "/usr/local/bin/" "stack")

# Stack has been installed to: /usr/local/bin/stack
#
# WARNING: '/root/.local/bin' is not on your PATH.
#     Stack will place the binaries it builds in '/root/.local/bin' so
#     for best results, please add it to the beginning of PATH in your profile.

# (find-fline "$ASROOT/root/.local/bin")
# (find-fline "$ASROOT/root/.local/")
# (find-fline "$ASROOT/root/")
# (find-asrootfile "/root/.stack/")
# (find-asrootfile "/root/.local/")
# (find-fline "/opt/")
# (find-fline "/usr/local/bin/")

stack upgrade



#####
#
# delete-stack
# 2021apr24
#
#####

# «delete-stack»  (to ".delete-stack")
# (find-es "agda" "plfa-install")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
aptrm haskell-stack
# (find-fline "~/.stack/")
rm -Rv ~/.stack/

rm -fv ~/.local/bin/stack
rm -fv ~/.local/bin/agda
rm -fv ~/.local/bin/agda-mode
rm -fv /usr/local/bin/

# (find-fline "~/.local/")
# (find-fline "~/.local/bin/")
# (find-fline "~/.local/bin/" "stack")
# (find-sh-at-dir "~/.local/" "find * | grep -i stack")
# (find-anggsh "find .local | grep -i stack")

# (find-fline "/usr/local/bin/")





#####
#
# source
# 2021apr25
#
#####

# «source»  (to ".source")
# https://docs.haskellstack.org/en/stable/README/#how-to-contribute
# (find-git-links "https://github.com/commercialhaskell/stack.git" "stack")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/stack/
cd      ~/usrc/
git clone https://github.com/commercialhaskell/stack.git
cd      ~/usrc/stack/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/stack/")
# (find-gitk  "~/usrc/stack/")

# (code-c-d "stack" "~/usrc/stack/")
# (find-stackfile "")
# (find-stackfile "doc/GUIDE.md" "stack purge")
# (find-stackfile "doc/GUIDE.md" "Could not find module `Data.Text.IO'")

git clone https://github.com/commercialhaskell/stack.git && \
cd stack && \
stack setup && \
stack build

cd      ~/usrc/stack/
stack setup |& tee oss
stack build |& tee osb






#####
#
# Agda-2.6.1
# 2021apr24
#
#####

# «Agda-2.6.1»  (to ".Agda-2.6.1")
# https://en.wikipedia.org/wiki/Agda_(programming_language)
# https://wiki.portal.chalmers.se/agda/pmwiki.php
# https://wiki.portal.chalmers.se/agda/Main/Download
# https://agda.readthedocs.io/en/latest/getting-started/installation.html
# https://agda.readthedocs.io/en/latest/getting-started/installation.html#using-stack

# (find-es "cabal" "cabal-update")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      /tmp/
rm -Rfv /tmp/Agda-2.6.1/
cabal get    Agda-2.6.1
cd      /tmp/Agda-2.6.1/
# (find-fline "/tmp/Agda-2.6.1/")

# (code-c-d "tmpagda" "/tmp/Agda-2.6.1/")
# (find-tmpagdash "find * | sort")
# (find-tmpagdafile "")
# (find-tmpagdafile "stack-8.8.3.yaml")
# (find-tmpagdafile "os")

# (find-sh "stack --help")
# (find-sh "stack --help" "-v,--verbose")

cd      /tmp/Agda-2.6.1/
stack -v --stack-yaml stack-8.8.3.yaml install  |& tee os

# (find-tmpagdafile "os")





#####
#
# ghcup-and-stack
# 2021apr26
#
#####

# «ghcup-and-stack»  (to ".ghcup-and-stack")
# (find-es "cabal" "ghcup")
# https://www.reddit.com/r/haskell/comments/ggwog3/install_inconsistency_between_ghcup_and_stack/
# https://github.com/haskell/ghcup
# https://gitlab.haskell.org/haskell/ghcup-hs




#####
#
# stack-exec
# 2021jul25
#
#####

# «stack-exec»  (to ".stack-exec")
# (find-sh "stack")
# (find-sh "stack ls")
# (find-sh "stack ls --help")
# (find-sh "stack ls snapshots")
# (find-sh "stack" "exec ")

# (find-fline "~/LOGS/2021jul26.haskell")
# (find-fline "~/LOGS/2021jul26.haskell" "ghc-pkg list")

# (find-sh "stack exec -- ghc-pkg list")
# (find-sh "stack exec -- ghc-pkg describe ieee754")




#####
#
# global-project
# 2021aug01
#
#####

# «global-project»  (to ".global-project")

stack exec --package ieee754 --package text agda
# Writing implicit global project config file to: /home/edrx/.stack/global-project/stack.yaml
# Note: You can change the snapshot via the resolver field there.
# Using latest snapshot resolver: lts-18.5
# Preparing to install GHC (tinfo6) to an isolated location.
# This will not interfere with any system-level installation.
# Downloaded ghc-tinfo6-8.10.4.
# Installing GHC ...
# Installed GHC.
# [1 of 2] Compiling Main             ( /home/edrx/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/edrx/.stack/setup-exe-src/setup-mPHDZzAJ.o )
# [2 of 2] Compiling StackSetupShim   ( /home/edrx/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/edrx/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
# Linking /home/edrx/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.4 ...
# ieee754> configure
# ieee754> Configuring ieee754-0.8.0...
# ieee754> build
# ieee754> Preprocessing library for ieee754-0.8.0..
# ieee754> Building library for ieee754-0.8.0..
# ieee754> [1 of 2] Compiling Numeric.IEEE
# ieee754> [2 of 2] Compiling Data.AEq
# ieee754> copy/register
# ieee754> Installing library in /home/edrx/.stack/snapshots/x86_64-linux-tinfo6/c13794dbca13a77c0b123ab666e602641f76e4ee34e56295902a66c9a0ca6f05/8.10.4/lib/x86_64-linux-ghc-8.10.4/ieee754-0.8.0-Fa1NJsiKKLb2eXdrTUzFMJ
# ieee754> Registering library for ieee754-0.8.0..

# (find-fline "~/.stack/")
# (find-fline "~/.stack/config.yaml")
# (find-fline "~/.stack/global-project/")
# (find-fline "~/.stack/global-project/stack.yaml")





# (find-fline "~/.stack/")
# (find-fline "~/.stack/programs/")
# (find-fline "~/.stack/programs/x86_64-linux/")
# (find-fline "~/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.4.temp/")





#  Local Variables:
#  coding:               utf-8-unix
#  End: