Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kritzcreek committed May 28, 2023
1 parent 52113fb commit fe1bc38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions packages.dhall
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.8-20230528/packages.dhall
sha256:7f1ebc6968ebabae915640456faf98f52f5606189f48cb22305fbe008723f26c
https://github.com/purescript/package-sets/releases/download/psc-0.15.8-20230528/packages.dhall sha256:7f1ebc6968ebabae915640456faf98f52f5606189f48cb22305fbe008723f26c

in upstream
with suggest =
Expand All @@ -24,7 +23,6 @@ in upstream
, "psa-utils"
, "refs"
, "strings"
, "test-unit"
]
, repo = "https://github.com/nwolverson/purescript-suggest.git"
, version = "c866dd7408902313c45bb579715f479f7f268162"
Expand Down
2 changes: 1 addition & 1 deletion src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ triggerRebuild stateRef file = do
Ref.write (State {errors: parsedErrors}) stateRef
case Array.head parsedErrors >>= _.suggestion of
Nothing → pure unit
Just s → suggestionHint
Just _ → suggestionHint
when (testAfterRebuild && isRight errs)
(execCommand "Test" $ printCLICommand testCommand)

Expand Down
9 changes: 3 additions & 6 deletions src/Pscid/Psa.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Prelude
import Data.Argonaut (Json, decodeJson, printJsonDecodeError)
import Data.Array as Array
import Data.Bifunctor (lmap)
import Data.Either (Either, hush)
import Data.Either (Either)
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Maybe as Maybe
import Data.Set as Set
Expand Down Expand Up @@ -43,11 +43,11 @@ defaultOptions =

print String PsaOptions Output Effect Unit
print successMessage options {warnings, errors} = do
iter_ warnings \i warning → do
iter_ warnings \_ warning → do
Console.error (toString (renderWarning 1 1 warning))
Console.error ""

iter_ errors \i error → do
iter_ errors \_ error → do
Console.error (toString (renderError 1 1 error))
Console.error ""

Expand All @@ -59,9 +59,6 @@ print successMessage options {warnings, errors} = do
parseErrors Json Either String (Array PsaError)
parseErrors j = traverse parsePsaError =<< (lmap printJsonDecodeError $ decodeJson j)

parseFirstError Json Maybe PsaError
parseFirstError j = Array.head =<< hush (parseErrors j)

emptyResult PsaResult
emptyResult = {warnings: [], errors: []}

Expand Down

0 comments on commit fe1bc38

Please sign in to comment.