repl-alliance (empty) → 0.1.0.0
raw patch · 7 files changed
+185/−0 lines, 7 filesdep +auto-exportdep +auto-extractdep +auto-import
Dependencies added: auto-export, auto-extract, auto-import, auto-split, base, ghc, ghci-quickfix, monoidal-plugins, pinned-warnings
Files
- CHANGELOG.md +5/−0
- LICENSE +29/−0
- README.md +52/−0
- repl-alliance.cabal +39/−0
- src/AutoSplit/Pattern.hs +17/−0
- src/ReplAlliance.hs +22/−0
- src/ShowWarnings.hs +21/−0
+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for repl-alliance++## 0.1.0.0 -- YYYY-mm-dd++* First version. Released on an unsuspecting world.
+ LICENSE view
@@ -0,0 +1,29 @@+Copyright (c) 2025, Aaron Allen+++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of the copyright holder nor the names of its+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,52 @@+# repl-alliance++An aggregation of GHC plugins, all of which enhance REPL based development+workflows by providing IDE-like functionality, with little to no overhead.++## Includes++- [pinned-warnings](https://github.com/aaronallen8455/pinned-warnings)+ - View warnings for the current GHCi session on demand+ - Automatically fix redundant import warnings+- [auto-split](https://github.com/aaronallen8455/auto-split)+ - Automatic case splitting+ - Enumerate all fields in record construction+- [auto-import](https://github.com/aaronallen8455/auto-import)+ - Automatically add import statements based on configuration+- [auto-extract](https://github.com/aaronallen8455/auto-extract)+ - Extract a segment of code as a top level function declaration+- [auto-export](https://github.com/aaronallen8455/auto-export)+ - Add a declaration to the module export list+- [ghci-quickfix](https://github.com/aaronallen8455/ghci-quickfix)+ - Generate a file containing diagnostics produced during compilation for use+ with `vim`'s quickfix system+ - This plugin is disabled by default, you must enable it by passing+ `-fplugin-opt ReplAlliance:--quickfix` or alternatively set the environment+ variable `GHCI_QUICKFIX_ENABLED=true`.+++## Usage++This plugin is intended to be used with GHCi or adjacent utilities such as+`ghcid` and `ghciwatch` as a development tool, not as a package dependency.++### Stack Projects++To use with a stack project (you may need to add `ghci-quickfix` to your+`extra-deps` first):++```bash+stack repl my-project --package repl-alliance --ghci-options='-fplugin ReplAlliance'+```++### Cabal Projects++To use with a cabal project (you may need to run `cabal update` first):++```bash+cabal repl my-project --build-depends repl-alliance --repl-options='-fplugin ReplAlliance'+```++## Compatibility++All plugins included in `repl-alliance` aim to support the four latest major GHC releases.
+ repl-alliance.cabal view
@@ -0,0 +1,39 @@+cabal-version: 3.0+name: repl-alliance+version: 0.1.0.0+synopsis: Currated set of plugins for REPL based development+description: Currated set of plugins for REPL based development providing some IDE-like functionality+license: BSD-3-Clause+license-file: LICENSE+author: Aaron Allen+maintainer: aaronallen8455@gmail.com+category: Development+build-type: Simple+extra-doc-files: CHANGELOG.md+ README.md++source-repository head+ type: git+ location: https://github.com/aaronallen8455/repl-alliance++common warnings+ ghc-options: -Wall++library+ import: warnings+ exposed-modules: ReplAlliance+ ShowWarnings+ AutoSplit.Pattern+ -- other-modules:+ -- other-extensions:+ build-depends: base < 4.23,+ ghc >= 9.6 && < 9.13,+ pinned-warnings,+ auto-extract,+ auto-export,+ auto-split,+ auto-import,+ monoidal-plugins,+ ghci-quickfix+ hs-source-dirs: src+ default-language: GHC2021
+ src/AutoSplit/Pattern.hs view
@@ -0,0 +1,17 @@+-- Vendored from auto-split+{-# LANGUAGE PatternSynonyms #-}+module AutoSplit.Pattern+ ( pattern SPLIT+ , pattern FIELDS+ ) where++-- | Used to induce the incomplete patterns warning from GHC so that the plugin+-- can modify the source code to contain all the missing patterns.+pattern SPLIT :: a+pattern SPLIT <- _++-- | When applied to a record initialization with missing fields, the plugin+-- will add the missing fields. It must be applied directly to the record+-- initialization, i.e. no parens or use of @$@.+pattern FIELDS :: a -> a+pattern FIELDS a = a
+ src/ReplAlliance.hs view
@@ -0,0 +1,22 @@+module ReplAlliance+ ( plugin+ ) where++import qualified PinnedWarnings+import qualified AutoExport+import qualified AutoExtract+import qualified AutoSplit+import qualified AutoImport+import GHC.Plugins+import qualified GhciQuickfix+import MonoidalPlugins++plugin :: Plugin+plugin = foldPlugins+ [ PinnedWarnings.plugin+ , AutoSplit.plugin+ , AutoImport.plugin+ , AutoExtract.plugin+ , AutoExport.plugin+ , GhciQuickfix.pluginOffByDefault+ ]
+ src/ShowWarnings.hs view
@@ -0,0 +1,21 @@+-- Vendored from pinned-warnings+module ShowWarnings+ ( ShowWarnings+ , showWarnings+ , FixWarnings+ , fixWarnings+ , ClearWarnings+ , clearWarnings+ ) where++class ShowWarnings where+ -- | Display currently pinned warnings+ showWarnings :: ()++class FixWarnings where+ -- | Auto-fixes certain types of warnings+ fixWarnings :: ()++class ClearWarnings where+ -- | Removes any currently pinned warnings+ clearWarnings :: ()