Skip to content

Commit a2cf62f

Browse files
committed
feat: update Haskell starter template for new project structure
- Renamed project from "hs-http-server-clone" to "codecrafters-http-server" in configuration files. - Updated required base version in package.yaml to support GHC 4.19. - Changed stack resolver to lts-23.18 for compatibility with the latest dependencies. - Enhanced .gitignore to include additional build artifacts and temporary files. - Updated compile and run scripts to reflect the new executable name.
1 parent 35becd6 commit a2cf62f

File tree

7 files changed

+37
-13
lines changed

7 files changed

+37
-13
lines changed

starter_templates/haskell/code/.codecrafters/compile.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
set -e # Exit on failure
1010

11-
# This compiles the program into $(stack path --local-install-root)/bin/hs-http-server-clone-exe.
11+
# This compiles the program into $(stack path --local-install-root)/bin/codecrafters-http-server-exe.
1212
stack build

starter_templates/haskell/code/.codecrafters/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
set -e # Exit on failure
1010

11-
exec $(stack path --local-install-root)/bin/hs-http-server-clone-exe "$@"
11+
exec $(stack path --local-install-root)/bin/codecrafters-http-server-exe "$@"
+25-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
.stack-work/
2-
hs-http-server-clone.cabal
1+
codecrafters-http-server.cabal
32
*~
3+
dist
4+
dist-*
5+
cabal-dev
6+
*.o
7+
*.hi
8+
*.hie
9+
*.chi
10+
*.chs.h
11+
*.dyn_o
12+
*.dyn_hi
13+
.hpc
14+
.hsenv
15+
.cabal-sandbox/
16+
cabal.sandbox.config
17+
*.prof
18+
*.aux
19+
*.hp
20+
*.eventlog
21+
.stack/
22+
.stack-work/
23+
cabal.project.local
24+
cabal.project.local~
25+
.HTF/
26+
.ghc.environment.*

starter_templates/haskell/code/package.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# failures.
66
#
77
# DON'T EDIT THIS!
8-
name: hs-http-server-clone
8+
9+
name: codecrafters-http-server
910
version: 0.1.0.0
1011
license: BSD3
1112

@@ -21,12 +22,12 @@ ghc-options:
2122
- -Wredundant-constraints
2223

2324
dependencies:
24-
- base >= 4.7 && < 5
25+
- base >= 4.19 && < 5
2526
- network # establish a simple TCP network
2627
- bytestring # useful to send bytes over the network
2728

2829
executables:
29-
hs-http-server-clone-exe:
30+
codecrafters-http-server-exe:
3031
main: Main.hs
3132
source-dirs: app
3233
ghc-options:

starter_templates/haskell/code/stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# failures.
66
#
77
# DON'T EDIT THIS!
8-
resolver: lts-21.11
8+
resolver: lts-23.18
99

1010
packages:
1111
- .

starter_templates/haskell/code/stack.yaml.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
packages: []
77
snapshots:
88
- completed:
9-
sha256: 64d66303f927e87ffe6b8ccf736229bf608731e80d7afdf62bdd63c59f857740
10-
size: 640037
11-
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/11.yaml
12-
original: lts-21.11
9+
sha256: d133abe75e408a407cce3f032c96ac1bbadf474a93b5156ebf4135b53382d56b
10+
size: 683827
11+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/18.yaml
12+
original: lts-23.18

starter_templates/haskell/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
attributes:
2-
required_executable: stack
2+
required_executable: stack (23.18)
33
user_editable_file: app/Main.hs

0 commit comments

Comments
 (0)