packages feed

boilerplate 0.0.2 → 0.0.3

raw patch · 3 files changed

+11/−6 lines, 3 filesdep +ghc-bootdep ~hsinspectdep ~vector

Dependencies added: ghc-boot

Dependency ranges changed: hsinspect, vector

Files

README.md view
@@ -190,8 +190,8 @@ instance {TParams {}{(}{Foo {TParam}}{, }{) => }}Foo {TParams {{Type}}{({Type} }{{TParam}}{ }{)}} where ``` -and `{Data ...}` expands to `{Product ...}{Sum ...}` which is useful when the same templates work for both product, and no special handling is needed for empty cases, prefix, separators or suffixes.- which is useful to define an `instance` declaration for a typical typeclass that depends on instances for all type parameters.++and `{Data ...}` expands to `{Product ...}{Sum ...}` which is useful when the same templates work for both product and sum types, and no special handling is needed for empty cases, prefix, separators or suffixes.  Examples rules are available in the `boilerplate` directory of this repository.
boilerplate.cabal view
@@ -1,13 +1,13 @@ cabal-version:      2.2 name:               boilerplate-version:            0.0.2+version:            0.0.3 synopsis:           Generate Haskell boilerplate. license:            GPL-3.0-or-later license-file:       LICENSE author:             Tseen She maintainer:         Tseen She copyright:          2020 Tseen She-tested-with:        GHC ^>=8.8.3+tested-with:        GHC ^>=8.8.3 || ^>=8.10.7 || ^>=9.0.2 || ^>=9.2.7 || ^>=9.4.5 || ^>=9.6.1 category:           Building description:   Generates boilerplate from templates and markers in Haskell source code.@@ -32,7 +32,8 @@     , directory     , filepath     , ghc-    , hsinspect     ^>=0.0.17+    , ghc-boot+    , hsinspect     ^>=0.0.17 || ^>=0.1.0     , text     , transformers @@ -62,7 +63,7 @@   build-depends:     , ghc-paths     , parsers    >0.12 && <0.13-    , vector     >0.12 && <0.13+    , vector     >0.12 && <0.14    -- cabal-fmt: expand library   exposed-modules:
exe/Main.hs view
@@ -12,7 +12,11 @@ import Boilerplate.RuleFinder import Boilerplate.RuleParser import Boilerplate.Types+#if MIN_VERSION_GLASGOW_HASKELL(9,0,0,0)+import qualified GHC.Version as GHC+#else import qualified Config as GHC+#endif import Control.Monad (when) import Data.IORef (modifyIORef') import Data.IORef (readIORef)