Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Stack uses this directory as scratch space.
/.stack-work/
# Stack generates the Cabal file from `package.yaml` through hpack.
/*.cabal
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Change log

HangfireHs uses [Semantic Versioning][].
The change log is available through the [releases on GitHub][].

[Semantic Versioning]: http://semver.org/spec/v2.0.0.html
[releases on GitHub]: https://github.com/githubuser/HangfireHs/releases
23 changes: 23 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[The MIT License (MIT)][]

Copyright (c) 2018 Author name here

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[The MIT License (MIT)]: https://opensource.org/licenses/MIT
7 changes: 7 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- This script is used to build and install your package. Typically you don't
-- need to change it. The Cabal documentation has more information about this
-- file: <https://www.haskell.org/cabal/users-guide/installing-packages.html>.
import qualified Distribution.Simple

main :: IO ()
main = Distribution.Simple.defaultMain
6 changes: 6 additions & 0 deletions benchmark/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- You can benchmark your code quickly and effectively with Criterion. See its
-- website for help: <http://www.serpentine.com/criterion/>.
import Criterion.Main

main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
7 changes: 7 additions & 0 deletions executable/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- It is generally a good idea to keep all your business logic in your library
-- and only use it in the executable. Doing so allows others to use what you
-- wrote in their libraries.
import qualified Example

main :: IO ()
main = Example.main
6 changes: 6 additions & 0 deletions library/Example.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- | An example module.
module Example (main) where

-- | An example function.
main :: IO ()
main = return ()
65 changes: 65 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This YAML file describes your package. Stack will automatically generate a
# Cabal file when you run `stack build`. See the hpack website for help with
# this file: <https://github.com/sol/hpack>.
name: HangfireHs
version: '0.0.0'
github: "githubuser/HangfireHs"
license: MIT
author: "Author name here"
maintainer: "Author name here"
# synopsis: A new Haskeleton package.
# description: HangfireHs is a new Haskeleton package.
# category: Other

extra-source-files:
- CHANGELOG.md
- LICENSE.md
- package.yaml
- README.md
- stack.yaml

ghc-options: -Wall

library:
dependencies:
- base
source-dirs: library

executables:
HangfireHs:
source-dirs: executable
main: Main.hs
dependencies:
- base
- HangfireHs
ghc-options:
- -rtsopts
- -threaded
- -with-rtsopts=-N

benchmarks:
HangfireHs-benchmarks:
source-dirs: benchmark
main: Main.hs
dependencies:
- base
- HangfireHs
- criterion
ghc-options:
- -rtsopts
- -threaded
- -with-rtsopts=-N

tests:
HangfireHs-test-suite:
source-dirs: test-suite
main: Main.hs
dependencies:
- base
- HangfireHs
- tasty
- tasty-hspec
ghc-options:
- -rtsopts
- -threaded
- -with-rtsopts=-N
65 changes: 65 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/

# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-12.4

# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# subdirs:
# - auto-update
# - wai
packages:
- .
# Dependency packages to be pulled from upstream that are not in the resolver
# using the same syntax as the packages field.
# (e.g., acme-missiles-0.3)
# extra-deps: []

# Override default flag values for local packages and extra-deps
# flags: {}

# Extra package databases containing global packages
# extra-package-dbs: []

# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.7"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
17 changes: 17 additions & 0 deletions test-suite/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Tasty makes it easy to test your code. It is a test framework that can
-- combine many different types of tests into one suite. See its website for
-- help: <http://documentup.com/feuerbach/tasty>.
import qualified Test.Tasty
-- Hspec is one of the providers for Tasty. It provides a nice syntax for
-- writing tests. Its website has more info: <https://hspec.github.io>.
import Test.Tasty.Hspec

main :: IO ()
main = do
test <- testSpec "HangfireHs" spec
Test.Tasty.defaultMain test

spec :: Spec
spec = parallel $ do
it "is trivially true" $ do
True `shouldBe` True