-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from tfausak/2022
Update everything for 2022
- Loading branch information
Showing
16 changed files
with
187 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"image": "ghcr.io/tfausak/haskell-codespace:ghc-9.2", | ||
"postCreateCommand": "cabal update" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Brittany | ||
on: push | ||
jobs: | ||
brittany: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: tfausak/brittany-action@v1 | ||
with: | ||
config: config/brittany.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: HLint | ||
on: push | ||
jobs: | ||
hlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: tfausak/hlint-action@v1 | ||
with: | ||
config: config/hlint.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/.stack-work/ | ||
/cabal.project.freeze | ||
/cabal.project.local* | ||
/dist-newstyle/ | ||
/stack.yaml.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"taylorfausak.purple-yolk" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"purple-yolk.brittany.command": "brittany --config-file config/brittany.yaml --write-mode inplace", | ||
"purple-yolk.ghci.command": "cabal repl --repl-options -ddump-json", | ||
"purple-yolk.hlint.command": "hlint --hint config/hlint.yaml --json --no-exit-code", | ||
"purple-yolk.hlint.onSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Change log | ||
|
||
Flow follows the [Package Versioning Policy](https://pvp.haskell.org). | ||
You can find release notes [on GitHub](https://github.com/tfausak/flow/releases). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
conf_layout: | ||
lconfig_cols: 79 | ||
lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled } | ||
lconfig_indentPolicy: IndentPolicyLeft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- group: { name: dollar, enabled: true } | ||
- group: { name: generalise, enabled: true } | ||
- ignore: { name: Use lambda-case } | ||
- ignore: { name: Use tuple-section } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import qualified Control.Monad as Monad | ||
import qualified Flow | ||
import qualified System.Exit as Exit | ||
import qualified Test.HUnit as Test | ||
|
||
main :: IO () | ||
main = do | ||
counts <- Test.runTestTT $ Test.TestList | ||
[ True Test.~?= True | ||
, (3 Flow.|> succ Flow.|> recip Flow.|> negate) Test.~?= (-0.25 :: Double) | ||
, (negate Flow.<| recip Flow.<| succ Flow.<| 3) Test.~?= (-0.25 :: Double) | ||
, fmap (Flow.apply 2) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (2 Flow.|>) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (2 Flow.|>) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (Flow.<| 2) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (Flow.apply 3 . Flow.compose succ) [recip, negate] | ||
Test.~?= [0.25, -4 :: Double] | ||
, (succ Flow..> recip Flow..> negate) 3 Test.~?= (-0.25 :: Double) | ||
, (negate Flow.<. recip Flow.<. succ) 3 Test.~?= (-0.25 :: Double) | ||
, fmap ((\f -> f 3) . (succ Flow..>)) [recip, negate] | ||
Test.~?= [0.25, -4 :: Double] | ||
, fmap ((\f -> f 3) . (succ Flow..>)) [recip, negate] | ||
Test.~?= [0.25, -4 :: Double] | ||
, fmap ((\f -> f 3) . (Flow.<. succ)) [recip, negate] | ||
Test.~?= [0.25, -4 :: Double] | ||
, (3 Flow.!> succ Flow.!> recip Flow.!> negate) Test.~?= (-0.25 :: Double) | ||
, (undefined Flow.|> const True) Test.~?= True | ||
, (negate Flow.<! recip Flow.<! succ Flow.<! 3) Test.~?= (-0.25 :: Double) | ||
, (const True Flow.<| undefined) Test.~?= True | ||
, fmap (Flow.apply' 2) [succ, recip, negate] | ||
Test.~?= [3, 0.5, -2 :: Double] | ||
, Flow.apply undefined (const True) Test.~?= True | ||
, fmap (2 Flow.!>) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (2 Flow.!>) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
, fmap (Flow.<! 2) [succ, recip, negate] Test.~?= [3, 0.5, -2 :: Double] | ||
] | ||
|
||
let | ||
hasErrors = Test.errors counts /= 0 | ||
hasFailures = Test.failures counts /= 0 | ||
Monad.when (hasErrors || hasFailures) Exit.exitFailure |
This file was deleted.
Oops, something went wrong.