chore: add template
This commit is contained in:
16
.github/template.yml
vendored
16
.github/template.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Haskell Project Template
|
||||
description: "Haskell project template"
|
||||
inputs:
|
||||
project_name:
|
||||
description: "Name of your new project"
|
||||
required: true
|
||||
default: "haskell-template"
|
||||
author_name:
|
||||
description: "Author of the project"
|
||||
required: true
|
||||
default: "mincomk"
|
||||
author_email:
|
||||
description: "Author email of the project"
|
||||
required: true
|
||||
default: "mail@drchi.co.kr"
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,3 @@
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/haskell
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=haskell
|
||||
|
||||
### Haskell ###
|
||||
dist
|
||||
@@ -26,5 +24,4 @@ cabal.project.local~
|
||||
.HTF/
|
||||
.ghc.environment.*
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/haskell
|
||||
|
||||
example-project.cabal
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
# {{ project_name }}
|
||||
# example-project
|
||||
|
||||
## Build
|
||||
```
|
||||
hpack
|
||||
cabal build
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module Main where
|
||||
|
||||
import Lib qualified (someFunc)
|
||||
import Lib (someFunc)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
putStrLn "Hello, Haskell!"
|
||||
Lib.someFunc
|
||||
someFunc
|
||||
|
||||
14
package.yaml
14
package.yaml
@@ -1,8 +1,8 @@
|
||||
name: {{ project_name }}
|
||||
name: example-project
|
||||
version: 0.1.0.0
|
||||
license: MIT
|
||||
author: "{{ author_name }}"
|
||||
maintainer: "{{ author_email }}"
|
||||
author: "mincomk"
|
||||
maintainer: "mail@drchi.co.kr"
|
||||
extra-source-files:
|
||||
- README.md
|
||||
|
||||
@@ -23,23 +23,23 @@ library:
|
||||
- base
|
||||
|
||||
executables:
|
||||
{{ project_name }}:
|
||||
example-project:
|
||||
main: Main.hs
|
||||
source-dirs: app
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
dependencies:
|
||||
- base
|
||||
|
||||
- {{ project_name }}
|
||||
- example-project
|
||||
|
||||
tests:
|
||||
{{ project_name }}-test:
|
||||
example-project-test:
|
||||
main: Main.hs
|
||||
source-dirs: test
|
||||
dependencies:
|
||||
- base
|
||||
|
||||
- {{ project_name }}
|
||||
- example-project
|
||||
|
||||
- tasty
|
||||
- tasty-hunit
|
||||
|
||||
7
scripts/hello.hs
Executable file
7
scripts/hello.hs
Executable file
@@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env cabal
|
||||
{- cabal:
|
||||
build-depends: base
|
||||
-}
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, world!"
|
||||
@@ -19,7 +19,7 @@ main :: IO ()
|
||||
main = spec >>= defaultMain
|
||||
|
||||
spec :: IO TestTree
|
||||
spec = return $ testGroup "{{ project_name }} tests" [baseTests]
|
||||
spec = return $ testGroup "example tests" [baseTests]
|
||||
|
||||
baseTests :: TestTree
|
||||
baseTests =
|
||||
|
||||
Reference in New Issue
Block a user