This repository was archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub.hsfiles
More file actions
116 lines (88 loc) · 2.07 KB
/
github.hsfiles
File metadata and controls
116 lines (88 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{-# START_FILE .github/workflows/ci.yaml #-}
---
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
ci:
name: CI
uses: danieljtrowbridge/hs-config/.github/workflows/ci.yaml@main
with:
ghc-version: {{ghc-version}}
package: {{name}}
{-# START_FILE .gitignore #-}
*~
.stack-work/
{-# START_FILE init.sh #-}
# Create a Git repository.
git init
# Configure Git to use the provided email and name.
git config --local user.email "{{author-email}}"
git config --local user.name "{{author-name}}"
# Add the hs-config repository as a Git submodule.
git submodule add -b main --name config \
https://github.com/danieljtrowbridge/hs-config.git config
# Add symlinks to the linter configuration files in the submodule.
ln -s config/.yamllint.yaml
ln -s config/fourmolu.yaml
# Reformat stack.yaml.
cat >stack.yaml <<EOF
---
packages:
- {{name}}
resolver: {{resolver}}
EOF
# Generate stack.yaml.lock.
stack path >/dev/null
# Add a trailing newline to test/Main.hs.
sed -i '$a\' {{name}}/test/Main.hs
# Delete this initialisation script.
rm init.sh
# Stage the template files.
git add .
# Create an initial commit.
git commit -m "Create Stack project"
{-# START_FILE {{name}}/Setup.hs #-}
import Distribution.Simple (defaultMain)
main :: IO ()
main = defaultMain
{-# START_FILE {{name}}/package.yaml #-}
---
name: {{name}}
version: 0.1.0.0
author: {{author-name}}
copyright: {{year}} {{author-name}}
github: {{github-username}}/{{name}}/{{name}}
maintainer: {{author-email}}
dependencies:
- base >= 4.7 && < 5
ghc-options:
- -Wall
- -Wcompat
- -Widentities
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-export-lists
- -Wmissing-home-modules
- -Wpartial-fields
- -Wredundant-constraints
library:
source-dirs:
- src
tests:
spec:
dependencies:
- {{name}}
main: Main.hs
source-dirs:
- test
{-# START_FILE {{name}}/src/.gitkeep #-}
{-# START_FILE {{name}}/test/Main.hs #-}
module Main (main) where
main :: IO ()
main = putStrLn "Test suite not yet implemented"