Skip to content

Commit

Permalink
Create the project
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Jun 13, 2020
0 parents commit 1c75aa3
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]

jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
strategy:
matrix:
cabal: ["2.4"]
ghc:
- "8.8.3"

steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: actions/setup-haskell@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal

- name: Build
run: |
cabal v2-update
cabal v2-build --enable-tests --enable-benchmarks
- name: Test
run: |
cabal v2-test --enable-tests
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
### Haskell
dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
*.prof
*.aux
*.hp
*.eventlog
.virtualenv
.hsenv
.hpc
.cabal-sandbox/
cabal.sandbox.config
cabal.config
cabal.project.local
.ghc.environment.*
.HTF/
# Stack
.stack-work/
stack.yaml.lock

### IDE/support
# Vim
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
*~
tags

# IntellijIDEA
.idea/
.ideaHaskellLib/
*.iml

# Atom
.haskell-ghc-mod.json

# VS
.vscode/

# Emacs
*#
.dir-locals.el
TAGS

# other
.DS_Store
Empty file added CHANGELOG.md
Empty file.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# haskell-repos

[![GitHub CI](https://github.com/ad-si/haskell-repos/workflows/CI/badge.svg)](https://github.com/ad-si/haskell-repos/actions)
[![Hackage](https://img.shields.io/hackage/v/haskell-repos.svg?logo=haskell)](https://hackage.haskell.org/package/haskell-repos)
[![Stackage Lts](http://stackage.org/package/haskell-repos/badge/lts)](http://stackage.org/lts/package/haskell-repos)
[![Stackage Nightly](http://stackage.org/package/haskell-repos/badge/nightly)](http://stackage.org/nightly/package/haskell-repos)

See README for more info
7 changes: 7 additions & 0 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Main (main) where

import HaskellRepos (someFunc)


main :: IO ()
main = someFunc
74 changes: 74 additions & 0 deletions haskell-repos.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
cabal-version: 2.4
name: haskell-repos
version: 0.0.0.0
synopsis: See README for more info
description: See README for more info
homepage: https://github.com/ad-si/haskell-repos
bug-reports: https://github.com/ad-si/haskell-repos/issues
license: NONE
author: Adrian Sieber
maintainer: Adrian Sieber <[email protected]>
copyright: 2020 Adrian Sieber
category: Utility
build-type: Simple
extra-doc-files: README.md
CHANGELOG.md
tested-with: GHC == 8.8.3

source-repository head
type: git
location: https://github.com/ad-si/haskell-repos.git

common common-options
build-depends: base ^>= 4.13.0.0
, protolude

mixins: base hiding (Prelude)
, protolude (Protolude as Prelude)

ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-uni-patterns
-Wincomplete-record-updates
if impl(ghc >= 8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >= 8.2)
ghc-options: -fhide-source-paths
if impl(ghc >= 8.4)
ghc-options: -Wmissing-export-lists
-Wpartial-fields
if impl(ghc >= 8.8)
ghc-options: -Wmissing-deriving-strategies

default-language: Haskell2010
default-extensions: LambdaCase
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections

library
import: common-options
hs-source-dirs: src
exposed-modules: HaskellRepos

executable haskell-repos
import: common-options
hs-source-dirs: app
main-is: Main.hs
build-depends: haskell-repos
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N

test-suite haskell-repos-test
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: haskell-repos
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N
15 changes: 15 additions & 0 deletions src/HaskellRepos.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{- |
Copyright: (c) 2020 Adrian Sieber
SPDX-License-Identifier: NONE
Maintainer: Adrian Sieber <[email protected]>
See README for more info
-}

module HaskellRepos
( someFunc
) where


someFunc :: IO ()
someFunc = putStrLn ("someFunc" :: String)
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-15.5
5 changes: 5 additions & 0 deletions test/Spec.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Main (main) where


main :: IO ()
main = putStrLn ("Test suite is not implemented" :: String)

0 comments on commit 1c75aa3

Please sign in to comment.