Skip to content

Commit

Permalink
add-tooling (#3)
Browse files Browse the repository at this point in the history
- [x] add fourmolu
- [x] add hlint
- [x]  add justfile
  • Loading branch information
paolino authored Aug 22, 2023
2 parents 31a3e98 + 35b35da commit 0575d2b
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
-- repeating the index-state for hackage to work around hackage.nix parsing limitation
index-state: 2023-06-06T00:00:00Z

index-state:
, hackage.haskell.org 2023-06-06T00:00:00Z
, hackage.haskell.org 2023-08-22T11:08:41Z
, cardano-haskell-packages 2023-06-05T06:39:32Z

packages:
Expand Down
21 changes: 21 additions & 0 deletions fourmolu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
comma-style: leading
function-arrows: leading
import-export-style: leading
fixities:
- infixr 9 .
- infixr 5 ++
- infixl 4 <$, <$>
- infixl 2 >>, >>=
- infixr 2 =<<, <=<
- infixr 1 $, $!
- infixl 4 <*>, <*, *>, <**>
- infixl 6 ^.
- infixl 3 =.
haddock-style: single-line
in-style: left-align
indent-wheres: false
indentation: 4
let-style: auto
newlines-between-decls: 1
record-brace-space: false
respectful: true
24 changes: 24 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default:
just list

install-tools:
cabal update
cabal install fourmolu-0.13.1.0 hlint-3.6.1 apply-refact \
--install-method=copy --overwrite-policy=always

format:
fourmolu -i lib

lint:
hlint lib

build0:
cabal build -v0 -O0 -j fine-types

test:
cabal test -v0 -O0 -j unit

repl:
cabal repl -v0 -O0 -j

prepare: format lint build0 test
13 changes: 13 additions & 0 deletions lib/fine-types/fine-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ library
base >=4.14.3.0
exposed-modules:
Language.FineTypes

test-suite unit
import: language, opts-exe
type: exitcode-stdio-1.0
hs-source-dirs:
test
build-tool-depends:
hspec-discover:hspec-discover == 2.*
build-depends:
base
, fine-types
main-is:
Spec.hs
2 changes: 1 addition & 1 deletion lib/fine-types/src/Language/FineTypes.hs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module Language.FineTypes where
module Language.FineTypes () where
4 changes: 4 additions & 0 deletions lib/fine-types/test/Spec.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Prelude

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

0 comments on commit 0575d2b

Please sign in to comment.