This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
readme-lhs.hsfiles
226 lines (187 loc) · 6.14 KB
/
readme-lhs.hsfiles
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
{-# START_FILE readme.md #-}
{{name}}
===
[![Build Status](https://travis-ci.org/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}.svg)](https://travis-ci.org/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}) [![Hackage](https://img.shields.io/hackage/v/{{name}}.svg)](https://hackage.haskell.org/package/{{name}})
develop
----
```
stack build --test --file-watch
```
{-# START_FILE app/{{name}}.hs #-}
{-# LANGUAGE NegativeLiterals #-}
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -Wall #-}
import NumHask.Prelude
main :: IO ()
main = pure ()
{-# START_FILE {{name}}.cabal #-}
cabal-version: 2.4
name: {{name}}
version: 0.0.1
synopsis: See readme.md
description: See readme.md for description.
category: project
author: {{author-name}}{{^author-name}}Author name here{{/author-name}}
maintainer: {{author-email}}
copyright: {{copyright}}{{^copyright}}{{year}}{{^year}}2020{{/year}} {{authorName}}{{^authorName}}Author name here{{/authorName}}{{/copyright}}
license: BSD-3-Clause
homepage: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}#readme
bug-reports: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}/issues
build-type: Simple
source-repository head
type: git
location: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}
library
hs-source-dirs:
src
default-extensions:
ghc-options:
-Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
-fwrite-ide-info
-hiedir=.hie
build-depends:
base >=4.7 && <5,
numhask >= 0.7 && < 0.8,
exposed-modules:
other-modules:
default-language: Haskell2010
executable {{name}}
main-is: {{name}}.hs
hs-source-dirs: app
build-depends:
base >= 4.7 && < 5,
numhask >= 0.7 && < 0.8,
{{name}}
default-language: Haskell2010
default-extensions:
ghc-options:
-funbox-strict-fields
-fforce-recomp
-threaded
-rtsopts
-with-rtsopts=-N
-fwrite-ide-info
-hiedir=.hie
test-suite test
type: exitcode-stdio-1.0
main-is: test.hs
hs-source-dirs:
test
build-depends:
base >=4.7 && <5,
doctest >= 0.16 && < 0.18,
numhask >= 0.7 && < 0.8,
{{name}}
default-language: Haskell2010
default-extensions:
ghc-options:
-Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
-fwrite-ide-info
-hiedir=.hie
{-# START_FILE .gitignore #-}
/.stack-work/
/dist-newstyle/
stack.yaml.lock
**/.DS_Store
cabal.project.local
{-# START_FILE .projectile #-}
{-# START_FILE .gitattributes #-}
other/* linguist-documentation
index.html linguist-documentation
{-# START_FILE LICENSE #-}
Copyright {{author-name}}{{^author-name}}Author name here{{/author-name}} (c) {{year}}{{^year}}2020{{/year}}
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of {{author-name}}{{^author-name}}Author name here{{/author-name}} nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{-# START_FILE .travis.yml #-}
language: generic
cache:
directories:
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
matrix:
include:
- env: BUILD=stack
# a -Werror build that is allowed to fail
- env: BUILD=werror
allow_failures:
- env: BUILD=werror
install:
- |
PATH=$HOME/.local/bin:$PATH
mkdir -p ~/.local/bin
travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
script:
- |
case "$BUILD" in
stack)
stack --no-terminal $ARGS test --haddock --no-haddock-deps
;;
werror)
stack --no-terminal $ARGS test --haddock --no-haddock-deps --ghc-options -Werror --ghc-options -Wcompat --ghc-options -Wincomplete-record-updates --ghc-options -Wincomplete-uni-patterns --ghc-options -Wredundant-constraints
;;
esac
{-# START_FILE stack.yaml #-}
resolver: nightly-2021-02-12
packages:
- .
extra-deps:
- numhask-0.7.1.0
- random-1.2.0
{-# START_FILE hie.yaml #-}
cradle:
stack:
- path: "./app/{{name}}.hs"
component: "{{name}}:exe:{{name}}"
- path: "./src"
component: "{{name}}:lib"
- path: "./test/{{name}}.hs"
component: "{{name}}:test:{{name}}"
{-# START_FILE test/test.hs #-}
{-# LANGUAGE NegativeLiterals #-}
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -Wall #-}
module Main where
import NumHask.Prelude
import Test.DocTest
main :: IO ()
main =
doctest
[
]
{-# START_FILE cabal.project #-}
packages: {{name}}.cabal
-- if doctests seem broken, uncomment:
-- See https://github.com/haskell/cabal/issues/6087
-- write-ghc-environment-files: always
allow-newer: random
-- Might be helpful when hackage doesn't build properly...
keep-going: True