From 39a744ad997cd5976a13ad4080093cf8b5329ebd Mon Sep 17 00:00:00 2001 From: waddlaw Date: Sat, 18 Jan 2020 13:08:30 +0900 Subject: [PATCH 1/4] Add CI badge --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index 3749e37..70b6c7d 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,6 @@ # haskell-stack-trace-plugin +![](https://github.com/waddlaw/haskell-stack-trace-plugin/workflows/cabal/badge.svg) [![Hackage](https://img.shields.io/hackage/v/haskell-stack-trace-plugin.svg)](https://hackage.haskell.org/package/haskell-stack-trace-plugin) This plugin allow implicitly add `HasCallStack` class to every top-level function for all module. Hence, we can to get completely continuous call stack. From 6e94c574a660e2a6703e816bb78f64dc4e125486 Mon Sep 17 00:00:00 2001 From: waddlaw Date: Sat, 18 Jan 2020 13:18:14 +0900 Subject: [PATCH 2/4] update cabal-version to 2.4 --- haskell-stack-trace-plugin.cabal | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/haskell-stack-trace-plugin.cabal b/haskell-stack-trace-plugin.cabal index 2c46ab8..a91601a 100644 --- a/haskell-stack-trace-plugin.cabal +++ b/haskell-stack-trace-plugin.cabal @@ -1,3 +1,4 @@ +cabal-version: 2.4 name: haskell-stack-trace-plugin version: 0.1.0.1 synopsis: haskell-stack-trace-plugin @@ -12,7 +13,6 @@ copyright: 2018-2020 Shinya Yamaguchi category: Compiler Plugin, Development, Debug build-type: Simple extra-source-files: CHANGELOG.md, Readme.md -cabal-version: >=1.10 tested-with: GHC == 8.6.5 source-repository head @@ -24,11 +24,17 @@ flag dev manual: True default: False +common common-opts + build-depends: + base ^>=4.12 + + default-language: Haskell2010 + library + import: common-opts hs-source-dirs: src build-depends: - base >=4.12 && <4.13, - ghc>=8.6.2 && <8.6.6 + ghc ^>=8.6 exposed-modules: StackTrace.Plugin @@ -42,20 +48,19 @@ library -Wno-missing-home-modules else ghc-options: -O2 -Wall - default-language: Haskell2010 test-suite test + import: common-opts main-is: Spec.hs hs-source-dirs: test type: exitcode-stdio-1.0 build-depends: - base >=4.12 && <4.13, - bytestring >= 0.10.8 && <0.11, - hspec >= 2.7 && <2.8, - typed-process >= 0.2.6 && <0.2.9 + bytestring ^>=0.10, + hspec ^>=2.7, + typed-process ^>=0.2.6 build-tool-depends: - hspec-discover:hspec-discover >= 2.7 && <2.8 + hspec-discover:hspec-discover ^>= 2.7 other-modules: StackTrace.PluginSpec @@ -64,14 +69,11 @@ test-suite test else ghc-options: -O2 -Wall - default-language: Haskell2010 - executable example + import: common-opts main-is: Main.hs hs-source-dirs: example - default-language: Haskell2010 ghc-options: -fplugin=StackTrace.Plugin build-depends: - base >=4.12 && <4.13, haskell-stack-trace-plugin From f6cc7655855826542a60edcc9413ea83ca37b9db Mon Sep 17 00:00:00 2001 From: waddlaw Date: Sat, 18 Jan 2020 13:19:00 +0900 Subject: [PATCH 3/4] Apply cabal-fmt --- haskell-stack-trace-plugin.cabal | 105 +++++++++++++++---------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/haskell-stack-trace-plugin.cabal b/haskell-stack-trace-plugin.cabal index a91601a..ec89e93 100644 --- a/haskell-stack-trace-plugin.cabal +++ b/haskell-stack-trace-plugin.cabal @@ -1,79 +1,78 @@ -cabal-version: 2.4 -name: haskell-stack-trace-plugin -version: 0.1.0.1 -synopsis: haskell-stack-trace-plugin -description: This plugin allow implicitly add HasCallStack class to every top-level function for all module. Hence, we can to get completely continuous call stack. -homepage: https://github.com/waddlaw/haskell-stack-trace-plugin -bug-reports: https://github.com/waddlaw/haskell-stack-trace-plugin/issues -license: MIT -license-file: LICENSE -author: Shinya Yamaguchi -maintainer: ingronze@gmail.com -copyright: 2018-2020 Shinya Yamaguchi -category: Compiler Plugin, Development, Debug -build-type: Simple -extra-source-files: CHANGELOG.md, Readme.md -tested-with: GHC == 8.6.5 +cabal-version: 2.4 +name: haskell-stack-trace-plugin +version: 0.1.0.1 +synopsis: haskell-stack-trace-plugin +description: + This plugin allow implicitly add HasCallStack class to every top-level function for all module. Hence, we can to get completely continuous call stack. + +homepage: https://github.com/waddlaw/haskell-stack-trace-plugin +bug-reports: + https://github.com/waddlaw/haskell-stack-trace-plugin/issues + +license: MIT +license-file: LICENSE +author: Shinya Yamaguchi +maintainer: ingronze@gmail.com +copyright: 2018-2020 Shinya Yamaguchi +category: Compiler Plugin, Development, Debug +build-type: Simple +extra-source-files: + CHANGELOG.md + Readme.md + +tested-with: GHC ==8.6.5 source-repository head type: git location: git://github.com/waddlaw/haskell-stack-trace-plugin flag dev - description: Turn on development settings. - manual: True - default: False + description: Turn on development settings. + manual: True + default: False common common-opts - build-depends: - base ^>=4.12 - - default-language: Haskell2010 + build-depends: base ^>=4.12 + default-language: Haskell2010 library - import: common-opts - hs-source-dirs: src - build-depends: - ghc ^>=8.6 - - exposed-modules: - StackTrace.Plugin + import: common-opts + hs-source-dirs: src + build-depends: ghc ^>=8.6 + exposed-modules: StackTrace.Plugin if flag(dev) - ghc-options: -Wall -Werror -Wcompat - -- -Wincomplete-record-updates - -Wincomplete-uni-patterns - -Wnoncanonical-monad-instances - -Wnoncanonical-monadfail-instances - -Wno-missing-home-modules + ghc-options: + -Wall -Werror -Wcompat -Wincomplete-uni-patterns + -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances + -Wno-missing-home-modules + + -- -Wincomplete-record-updates else - ghc-options: -O2 -Wall + ghc-options: -O2 -Wall test-suite test - import: common-opts + import: common-opts main-is: Spec.hs hs-source-dirs: test type: exitcode-stdio-1.0 build-depends: - bytestring ^>=0.10, - hspec ^>=2.7, - typed-process ^>=0.2.6 + , bytestring ^>=0.10 + , hspec ^>=2.7 + , typed-process ^>=0.2.6 - build-tool-depends: - hspec-discover:hspec-discover ^>= 2.7 - - other-modules: StackTrace.PluginSpec + build-tool-depends: hspec-discover:hspec-discover ^>=2.7 + other-modules: StackTrace.PluginSpec if flag(dev) - ghc-options: -Wall -Werror + ghc-options: -Wall -Werror + else - ghc-options: -O2 -Wall + ghc-options: -O2 -Wall executable example - import: common-opts - main-is: Main.hs + import: common-opts + main-is: Main.hs hs-source-dirs: example - ghc-options: - -fplugin=StackTrace.Plugin - build-depends: - haskell-stack-trace-plugin + ghc-options: -fplugin=StackTrace.Plugin + build-depends: haskell-stack-trace-plugin From 8206cd3052ee6204c8ceb2db7882aa089e3457ec Mon Sep 17 00:00:00 2001 From: waddlaw Date: Sat, 18 Jan 2020 13:29:39 +0900 Subject: [PATCH 4/4] release 0.1.1.0 --- CHANGELOG.md | 8 +++++++- Readme.md | 6 +++--- haskell-stack-trace-plugin.cabal | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 784434d..e590359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Revision history for haskell-stack-trace-pugin +## 0.1.1.0 -- 2020-01-18 + +- Ergonomic improvements [#1](https://github.com/waddlaw/haskell-stack-trace-plugin/pull/1) (@khwarizmii) +- Add Integration test +- Add GitHub Action + ## 0.1.0.0 -- 2018-12-07 -* First version. Released on an unsuspecting world. +- First version. Released on an unsuspecting world. diff --git a/Readme.md b/Readme.md index 70b6c7d..882ddff 100644 --- a/Readme.md +++ b/Readme.md @@ -5,8 +5,8 @@ This plugin allow implicitly add `HasCallStack` class to every top-level function for all module. Hence, we can to get completely continuous call stack. -1. (implicitly) Import [GHC.Stack](https://www.stackage.org/haddock/lts-12.21/base-4.11.1.0/GHC-Stack.html) for all modules. -2. Add [HasCallStack](https://www.stackage.org/haddock/lts-12.21/base-4.11.1.0/GHC-Stack.html#t:HasCallStack) constraint for all top-level functions. +1. (implicitly) Import [GHC.Stack](https://hackage.haskell.org/package/base-4.12.0.0/docs/GHC-Stack.html) for all modules. +2. Add [HasCallStack](https://hackage.haskell.org/package/base-4.12.0.0/docs/GHC-Stack.html#t:HasCallStack) constraint for all top-level functions. Requirement: (8.6 <= on GHC) @@ -103,4 +103,4 @@ CallStack (from HasCallStack): main, called at example/Main.hs:6:1 in main:Main ``` -Great!!! \ No newline at end of file +Great!!! diff --git a/haskell-stack-trace-plugin.cabal b/haskell-stack-trace-plugin.cabal index ec89e93..9154446 100644 --- a/haskell-stack-trace-plugin.cabal +++ b/haskell-stack-trace-plugin.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: haskell-stack-trace-plugin -version: 0.1.0.1 +version: 0.1.1.0 synopsis: haskell-stack-trace-plugin description: This plugin allow implicitly add HasCallStack class to every top-level function for all module. Hence, we can to get completely continuous call stack.