From 67597f86650d3d63697eb6b5aaf1d91807fc54cb Mon Sep 17 00:00:00 2001 From: paolino Date: Tue, 22 Aug 2023 14:48:36 +0200 Subject: [PATCH 1/2] Add fourmolu.yaml --- fourmolu.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 fourmolu.yaml diff --git a/fourmolu.yaml b/fourmolu.yaml new file mode 100644 index 0000000..8b5a04a --- /dev/null +++ b/fourmolu.yaml @@ -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 From 35b35da8b4eafacb1ec32a65d065131f8ecd616d Mon Sep 17 00:00:00 2001 From: paolino Date: Tue, 22 Aug 2023 15:27:08 +0200 Subject: [PATCH 2/2] Add justfile --- cabal.project | 3 +-- justfile | 24 ++++++++++++++++++++++++ lib/fine-types/fine-types.cabal | 13 +++++++++++++ lib/fine-types/src/Language/FineTypes.hs | 2 +- lib/fine-types/test/Spec.hs | 4 ++++ 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 justfile create mode 100644 lib/fine-types/test/Spec.hs diff --git a/cabal.project b/cabal.project index 8461726..2deefb8 100644 --- a/cabal.project +++ b/cabal.project @@ -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: diff --git a/justfile b/justfile new file mode 100644 index 0000000..3c5d4ff --- /dev/null +++ b/justfile @@ -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 diff --git a/lib/fine-types/fine-types.cabal b/lib/fine-types/fine-types.cabal index db37b7e..2299926 100644 --- a/lib/fine-types/fine-types.cabal +++ b/lib/fine-types/fine-types.cabal @@ -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 \ No newline at end of file diff --git a/lib/fine-types/src/Language/FineTypes.hs b/lib/fine-types/src/Language/FineTypes.hs index 1bc2e6b..9d363af 100644 --- a/lib/fine-types/src/Language/FineTypes.hs +++ b/lib/fine-types/src/Language/FineTypes.hs @@ -1 +1 @@ -module Language.FineTypes where +module Language.FineTypes () where diff --git a/lib/fine-types/test/Spec.hs b/lib/fine-types/test/Spec.hs new file mode 100644 index 0000000..c1ddb62 --- /dev/null +++ b/lib/fine-types/test/Spec.hs @@ -0,0 +1,4 @@ +import Prelude + +main :: IO () +main = putStrLn "Test suite not yet implemented"