Skip to content

Commit dbca13b

Browse files
committed
supprt Replit.com Nix and Cabal for running examples
1 parent 75a542f commit dbca13b

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ NLPdb.hsproj
99
.vscode
1010
stack.yaml.lock
1111
out
12+
dist-newstyle
13+
*.dyn_hi
14+
*.dyn_o
1215

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ build:
1919
cd FastTag; stack build
2020

2121
clean:
22-
rm -r -f */.stack-work */dist-newstyle
22+
rm -r -f */.stack-work */dist-newstyle */*.dyn*
2323

2424
update_stack_resolver_macOs:
2525
sed -i '' 's/^resolver: .*/resolver: lts-22.26/' */stack.yaml

Pure/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ stack ghci
66

77
These simple examples are some of the code used in the very long introductory tutorial chapter on using "pure" Haskell.
88

9+
## Running with Replit.com, Nix, Cabal:
910

11+
cabal update
12+
cabal build
13+
cabal run

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,20 @@ Note: 6/18/2020: install directions in Appendix A to optionally install **cabal-
2929
stack install cabal-install
3030

3131
Installing **cabal-install** is optional. Installing **stack** using the directions in Appendix A which refers you to th official documentation at [http://docs.haskellstack.org/en/stable/README.html](http://docs.haskellstack.org/en/stable/README.html is sufficient for running the exampes in my book.
32+
33+
## Notes for running examples using Replit.com repls (September 8, 2024)
34+
35+
By default stack is not installed.
36+
Accept the default's for Haskell after creating a new Replit repl by cloning this GitHub project.
37+
38+
Then update cabal package index:
39+
40+
cd Pure
41+
cabal update
42+
43+
It will ask you which cabal sysem to install. I chose the command line version.
44+
45+
cabal build
46+
cabal repl
47+
ghci> :l Guards.hs
48+
ghci> main

replit.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{pkgs}: {
22
deps = [
3+
pkgs.vim
34
pkgs.cabal-install
45
pkgs.stack
56
pkgs.zlib.dev

0 commit comments

Comments
 (0)