packages feed

qm-interpolated-string 0.3.0.0 → 0.3.1.0

raw patch · 9 files changed

+92/−39 lines, 9 filesdep ~bytestringdep ~textPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, text

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,26 @@+## <a name="v0.3.1.0"></a>0.3.1.0++* Support GHC 9.2.3+* Drop Travis CI (no longer available for free for open source projects)++* Add GitHub Actions CI configuration+  * Nix-based+  * Plain Cabal & Stack setups with multiple GHC versions++* Add Nix configuration (only affects development)+* Add [Stack](https://haskellstack.org) support++* Drop GHC 7.x support because I have no options on CI to test it. It doesn’t+  mean it will no longer work with 7.x for sure but it’s not tested anymore.++* Increase minimal Cabal version requirement from `1.8` to `1.10` because+  Hackage requires at least `1.10` now. Also add `default-language` to every+  component because Hackage reports this error:++  > Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must+  > specify the 'default-language' field for each component (e.g. Haskell98 or+  > Haskell2010).+ ## <a name="v0.3.0.0"></a>0.3.0.0  * Testing on GHC 8.2.2@@ -21,8 +44,8 @@    Once I noticed that `[qm|{"\n"}|]` compiles to `"n"`, I considered this as a   bug, I also realized that interpolation blocks aren't interpreted as a bare-  haskell code as I was expecting. My bad, I've missed that, haven't written-  enought tests to cover such scenarios, it migrated from original+  Haskell code as I was expecting. My bad, I've missed that, haven't written+  enough tests to cover such scenarios, it migrated from original   *interpolatedstring-perl6* package. So I had to fix this mistake,   notwithstanding it can break your code when you update the library. Now   everything inside interpolation blocks is taken as bare haskell code as
README.md view
@@ -1,7 +1,8 @@ # [qm|interpolated-string|]  [![Hackage](https://img.shields.io/hackage/v/qm-interpolated-string.svg)](https://hackage.haskell.org/package/qm-interpolated-string)-[![Build Status](https://travis-ci.org/unclechu/haskell-qm-interpolated-string.svg?branch=master)](https://travis-ci.org/unclechu/haskell-qm-interpolated-string)+[![Haskell Cabal & Stack CI](https://github.com/unclechu/haskell-qm-interpolated-string/actions/workflows/haskell.yml/badge.svg)](https://github.com/unclechu/haskell-qm-interpolated-string/actions/workflows/haskell.yml)+[![Nix CI](https://github.com/unclechu/haskell-qm-interpolated-string/actions/workflows/nix.yml/badge.svg)](https://github.com/unclechu/haskell-qm-interpolated-string/actions/workflows/nix.yml)  Implementation of interpolated multiline string [QuasiQuoter](https://wiki.haskell.org/Quasiquotation)@@ -9,7 +10,7 @@  Actually it's modification of [interpolatedstring-perl6](https://github.com/audreyt/interpolatedstring-perl6)-package. I've forked it to implemenent my own strings I really like.+package. I've forked it to implement my own strings I really like.  This implementation based on `qc` from **interpolatedstring-perl6** package but ignores any indentation, line breaks@@ -133,7 +134,7 @@ curly bracket (`{`) opens everything inside until it closes (by `}`) is parsed as bare as possible to be given to [haskell-src-meta](http://hackage.haskell.org/package/haskell-src-meta)-without any modifications, to be parsed as bare haskell code.+without any modifications, to be parsed as bare Haskell code.  But you might need use curly brackets inside an interpolation block. I don't think it would be a good idea, because complicated logic there may cause code@@ -257,15 +258,52 @@ -- Foo is: Foo {bar = 10, baz = 30} ``` +## Syntax highlighting++### Vim or Neovim++#### "haskell-vim" plugin++If you use [haskell-vim][haskell-vim] plugin (I personally use+[my own fork][my-haskell-vim-fork] which supports `UnicodeSyntax`) just add to+your `.vimrc` or `init.vim` this:++```vim+fu! s:highlight_haskell_qm_interpolation_blocks()+  sy match haskellQMStr "." containedin=haskellQM contained++  sy region haskellQMBlock matchgroup=haskellDelimiter+    \ start="\(^\|\(^\|[^\\]\)\(\\\\\)*\)\@<={" end="}"+    \ contains=TOP,@Spell containedin=haskellQM contained++  sy region haskellQM matchgroup=haskellTH+    \ start="\[qm\(b\|s\)\?|" end="|\]"++  hi def link haskellQMStr String+endf++au FileType haskell cal s:highlight_haskell_qm_interpolation_blocks()+```+ ## Wanna make a contribution or maintain your own fork? -You can find some info for developers on-[wiki pages](https://github.com/unclechu/haskell-qm-interpolated-string/wiki).+See [CONTRIBUTING.md][CONTRIBUTING.md].  ## Author -[Viacheslav Lotsmanov](https://github.com/unclechu)+Viacheslav Lotsmanov +This library is a heavily rewritten and extended fork of+[interpolatedstring-perl6][fork-origin]+which was originally created by Audrey Tang.+ ## License -[The Unlicense](LICENSE)+[The Unlicense][LICENSE]++[haskell-vim]: https://github.com/neovimhaskell/haskell-vim+[my-haskell-vim-fork]: https://github.com/unclechu/haskell-vim+[fork-origin]: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs++[CONTRIBUTING.md]: https://github.com/unclechu/haskell-qm-interpolated-string/blob/master/CONTRIBUTING.md+[LICENSE]: https://github.com/unclechu/haskell-qm-interpolated-string/blob/master/LICENSE
qm-interpolated-string.cabal view
@@ -1,5 +1,5 @@ name:               qm-interpolated-string-version:            0.3.0.0+version:            0.3.1.0 synopsis:           Implementation of interpolated multiline strings description:        Implementation of interpolated multiline strings                     that ignores indentation and trailing whitespaces@@ -7,19 +7,21 @@ license:            PublicDomain license-file:       LICENSE author:             Viacheslav Lotsmanov-copyright:          Viacheslav Lotsmanov-maintainer:         Viacheslav Lotsmanov <lotsmanov89@gmail.com>+copyright:          Public Domain+maintainer:         lotsmanov89@gmail.com category:           Data build-type:         Simple extra-source-files: README.md CHANGELOG.md-cabal-version:      >=1.8-tested-with:        GHC == 7.4.1-                  , GHC == 7.6.3-                  , GHC == 7.8.4-                  , GHC == 7.10.1-                  , GHC == 7.10.2-                  , GHC == 8.0.2++cabal-version:      >=1.10++tested-with:        GHC == 8.0.2                   , GHC == 8.2.2+                  , GHC == 8.6.5+                  , GHC == 8.8.3+                  , GHC == 8.10.3+                  , GHC == 9.0.2+                  , GHC == 9.2.3  source-repository head   type:     git@@ -37,8 +39,9 @@   build-depends:   base ==4.*                  , template-haskell >=2.5 && <3                  , haskell-src-meta >=0.3 && <0.9-                 , bytestring ==0.10.*-                 , text ==1.*+                 , bytestring >=0.10 && <0.12+                 , text >=1.0 && <3+  default-language: Haskell2010  test-suite tests   type:           exitcode-stdio-1.0@@ -65,3 +68,4 @@   build-depends:  base ==4.*                 , hspec ==2.*                 , qm-interpolated-string+  default-language: Haskell2010
src/Text/InterpolatedString/QM.hs view
@@ -1,6 +1,3 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang- {-# LANGUAGE PackageImports #-}  module Text.InterpolatedString.QM (qm, qn, qmb, qnb, qms, qns, ShowQ (..)) where
src/Text/InterpolatedString/QM/Internal/Parsers.hs view
@@ -1,6 +1,3 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang- {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ViewPatterns #-}
src/Text/InterpolatedString/QM/Internal/Parsers/Helpers.hs view
@@ -1,6 +1,3 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang- {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE CPP #-}
src/Text/InterpolatedString/QM/Internal/Parsers/TH.hs view
@@ -1,6 +1,4 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afE6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang-+{-# LANGUAGE CPP #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ViewPatterns #-} @@ -207,7 +205,12 @@  varP :: String ->             TH.Pat ; varP = TH.VarP . TH.mkName varE :: String ->             TH.Exp ; varE = TH.VarE . TH.mkName+#if MIN_VERSION_template_haskell(2,18,0)+conP :: String -> [TH.Pat] -> TH.Pat ; conP = flip TH.ConP mempty . TH.mkName+#else conP :: String -> [TH.Pat] -> TH.Pat ; conP = TH.ConP . TH.mkName+#endif+ conE :: String ->             TH.Exp ; conE = TH.ConE . TH.mkName  chrP :: Char   -> TH.Pat ; chrP = TH.LitP . TH.CharL
src/Text/InterpolatedString/QM/Internal/Parsers/Types.hs view
@@ -1,6 +1,3 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang- module Text.InterpolatedString.QM.Internal.Parsers.Types   ( Parser   , StringPart (..)
src/Text/InterpolatedString/QM/ShowQ/Class.hs view
@@ -1,6 +1,3 @@--- Fork of: https://github.com/audreyt/interpolatedstring-perl6/blob/63d91a83eb5e48740c87570a8c7fd4668afe6832/src/Text/InterpolatedString/Perl6.hs--- Author of the 'interpolatedstring-perl6' package: Audrey Tang- {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE UndecidableInstances #-}