Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Fixes and Improvements #2

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions reforg.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.33.0.
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack
--
-- hash: d9ca5830d1e33bcf6ad816742d975eade9d016833bf9aa4e32ad514f96a19008
-- hash: 88a232c5509792b835f526c0804d0b264dfc228e1bf817473c786af0005c195f

name: reforg
version: 0.0.3.1
Expand Down Expand Up @@ -48,7 +48,8 @@ library
Paths_reforg
hs-source-dirs:
src
default-extensions: OverloadedStrings
default-extensions:
OverloadedStrings
ghc-options: -Wall
build-depends:
aeson
Expand All @@ -57,7 +58,7 @@ library
, co-log
, ginger
, mtl
, path >=0.8 && <0.9
, path ==0.8.*
, path-io
, pcre-light
, process
Expand All @@ -83,7 +84,7 @@ executable reforg
, ginger
, mtl
, optparse-applicative
, path >=0.8 && <0.9
, path ==0.8.*
, path-io
, pcre-light
, process
Expand All @@ -103,7 +104,7 @@ test-suite reforg-doctest
other-modules:
Paths_reforg
hs-source-dirs:
./.
./
ghc-options: -threaded
build-depends:
aeson
Expand All @@ -113,7 +114,7 @@ test-suite reforg-doctest
, doctest
, ginger
, mtl
, path >=0.8 && <0.9
, path ==0.8.*
, path-io
, pcre-light
, process
Expand All @@ -140,7 +141,7 @@ test-suite reforg-test
, co-log
, ginger
, mtl
, path >=0.8 && <0.9
, path ==0.8.*
, path-io
, pcre-light
, process
Expand Down
2 changes: 1 addition & 1 deletion src/System/Process/Reforg.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ processFile :: Path Abs File -> [Rule] -> Reforg ()
processFile f rs =
ifM (anyM (processFileWithRule f) rs)
(pure ())
(throwError $ ReforgErrorNoMatch f)
(error $ "No match for: " <> toFilePath f) -- TODO: Shortcircuit? (throwError $ ReforgErrorNoMatch f)


-- | Attempts to process the file as per given rule.
Expand Down
4 changes: 3 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
resolver: lts-17.4
resolver: lts-18.0
packages:
- .
extra-deps:
- path-0.8.0@sha256:2ce69c2e537741aeead2f5d3ad2adafd6a7959015a50088bb3883ef84a7d792f
- co-log-0.4.0.1@sha256:3d4c17f37693c80d1aa2c41669bc3438fac3e89dc5f479e57d79bc3ddc4dfcc5,5087
- ansi-terminal-0.10.3@sha256:e2fbcef5f980dc234c7ad8e2fa433b0e8109132c9e643bc40ea5608cd5697797,3226
22 changes: 18 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,23 @@ packages:
sha256: f63ef618842bd541acaa9cee968381b694ce926f072d385a10aad1d3f732d4ac
original:
hackage: path-0.8.0@sha256:2ce69c2e537741aeead2f5d3ad2adafd6a7959015a50088bb3883ef84a7d792f
- completed:
hackage: co-log-0.4.0.1@sha256:3d4c17f37693c80d1aa2c41669bc3438fac3e89dc5f479e57d79bc3ddc4dfcc5,5087
pantry-tree:
size: 1126
sha256: e73165ff8f744709428e2e87984c9d60ca1cec43d8455c413181c7c466e7497c
original:
hackage: co-log-0.4.0.1@sha256:3d4c17f37693c80d1aa2c41669bc3438fac3e89dc5f479e57d79bc3ddc4dfcc5,5087
- completed:
hackage: ansi-terminal-0.10.3@sha256:e2fbcef5f980dc234c7ad8e2fa433b0e8109132c9e643bc40ea5608cd5697797,3226
pantry-tree:
size: 1461
sha256: 02f05d52be3ffcf36c78876629cbab80b63420672685371aea4fd10e1c4aabb6
original:
hackage: ansi-terminal-0.10.3@sha256:e2fbcef5f980dc234c7ad8e2fa433b0e8109132c9e643bc40ea5608cd5697797,3226
snapshots:
- completed:
size: 563103
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/4.yaml
sha256: f11e2153044f5f71ea7b1c9398f4721f517c9bd37642ed769647b896564021f3
original: lts-17.4
size: 585393
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/0.yaml
sha256: c632012da648385b9fa3c29f4e0afd56ead299f1c5528ee789058be410e883c0
original: lts-18.0