diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 146b8c6..93d1095 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -40,3 +40,16 @@ jobs: run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks - name: Run tests run: stack test + hlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: "Set up HLint" + uses: haskell/actions/hlint-setup@v2 + + - name: "Run HLint" + uses: haskell/actions/hlint-run@v2 + with: + path: src/ + fail-on: warning diff --git a/LICENSE b/LICENSE index c5b6c16..e462349 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Author name here (c) 2023 +Copyright Kubishkin Efim (c) 2023 All rights reserved. diff --git a/package.yaml b/package.yaml index 4aa2e12..bac5ccc 100644 --- a/package.yaml +++ b/package.yaml @@ -1,10 +1,10 @@ name: matrix-lib-proj version: 0.1.0.0 -github: "githubuser/matrix-lib-proj" +github: "KubEF/matrix-lib-proj" license: BSD3 -author: "Author name here" -maintainer: "example@example.com" -copyright: "2023 Author name here" +author: "Kubishkin Efim" +maintainer: "efimkub@mail.ru" +copyright: "2023 Kubishkin Efim" extra-source-files: - README.md @@ -17,7 +17,7 @@ extra-source-files: # To avoid duplicated efforts in documentation and dealing with the # complications of embedding Haddock markup inside cabal files, it is # common to point users to the README.md file. -description: Please see the README on GitHub at +description: Please see the README on GitHub at dependencies: - base >= 4.7 && < 5 diff --git a/src/Helpers.hs b/src/Helpers.hs index 435ba62..f96ab58 100644 --- a/src/Helpers.hs +++ b/src/Helpers.hs @@ -77,5 +77,7 @@ tupleToList2 (a, b) = [a, b] triplePart :: [a] -> [[a]] triplePart l = [[l !! n, l !! (n + 1), l !! (n + 2)] | n <- [0, 2 .. (length l - 3)]] -lsEvenWithOne :: (Num a, Enum a) => a -> [a] -lsEvenWithOne n = 1 : [2, 4 .. n] +lsEvenWithOne :: (Integral a) => a -> [a] +lsEvenWithOne n + | even n = 1 : [2, 4 .. n] + | otherwise = 1 : [2, 4 .. n + 1]