pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/hs-hls-alternate-number-format-plugin devel/hs-h...
details: https://anonhg.NetBSD.org/pkgsrc/rev/28fef63af06c
branches: trunk
changeset: 374182:28fef63af06c
user: pho <pho%pkgsrc.org@localhost>
date: Wed Feb 16 10:17:01 2022 +0000
description:
devel/hs-hls-alternate-number-format-plugin: import hs-hls-alternate-number-format-plugin-1.0.1.0
The alternate number format plugin provides alternative formatting for
Numeric Literals in source code. These can be any numeric literal such as
123, 0x45 or any of the other numeric formats. The plugin is context aware
and will provide suggestions based on currently active GHC extensions.
diffstat:
devel/hs-hls-alternate-number-format-plugin/DESCR | 4 +
devel/hs-hls-alternate-number-format-plugin/Makefile | 21 +++++++
devel/hs-hls-alternate-number-format-plugin/PLIST | 26 ++++++++
devel/hs-hls-alternate-number-format-plugin/buildlink3.mk | 24 ++++++++
devel/hs-hls-alternate-number-format-plugin/distinfo | 7 ++
devel/hs-hls-alternate-number-format-plugin/patches/patch-hls-alternate-number-format-plugin.cabal | 14 ++++
devel/hs-hls-alternate-number-format-plugin/patches/patch-src_Ide_Plugin_Literals.hs | 30 ++++++++++
7 files changed, 126 insertions(+), 0 deletions(-)
diffs (154 lines):
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/DESCR Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,4 @@
+The alternate number format plugin provides alternative formatting for
+Numeric Literals in source code. These can be any numeric literal such as
+123, 0x45 or any of the other numeric formats. The plugin is context aware
+and will provide suggestions based on currently active GHC extensions.
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/Makefile Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2022/02/16 10:17:01 pho Exp $
+
+DISTNAME= hls-alternate-number-format-plugin-1.0.1.0
+CATEGORIES= devel
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= Provide Alternate Number Formats plugin for Haskell Language Server
+LICENSE= apache-2.0
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../devel/hs-ghcide/buildlink3.mk"
+.include "../../devel/hs-hie-compat/buildlink3.mk"
+.include "../../devel/hs-hls-graph/buildlink3.mk"
+.include "../../devel/hs-hls-plugin-api/buildlink3.mk"
+.include "../../devel/hs-lens/buildlink3.mk"
+.include "../../devel/hs-lsp/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-syb/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/PLIST Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,26 @@
+@comment $NetBSD: PLIST,v 1.1 2022/02/16 10:17:01 pho Exp $
+lib/hls-alternate-number-format-plugin-${PKGVERSION}/${HS_VERSION}/package-description
+lib/hls-alternate-number-format-plugin-${PKGVERSION}/${HS_VERSION}/package-id
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/AlternateNumberFormat.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/AlternateNumberFormat.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/AlternateNumberFormat.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Conversion.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Conversion.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Conversion.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Literals.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Literals.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Ide/Plugin/Literals.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}.a
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
+lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/LICENSE
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/Ide-Plugin-AlternateNumberFormat.html
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/Ide-Plugin-Conversion.html
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/doc-index.html
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/haddock-bundle.min.js
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/hls-alternate-number-format-plugin.haddock
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/index.html
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/linuwial.css
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/meta.json
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/quick-jump.css
+share/doc/${HS_PLATFORM}/hls-alternate-number-format-plugin-${PKGVERSION}/html/synopsis.png
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/buildlink3.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/buildlink3.mk Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: buildlink3.mk,v 1.1 2022/02/16 10:17:01 pho Exp $
+
+BUILDLINK_TREE+= hs-hls-alternate-number-format-plugin
+
+.if !defined(HS_HLS_ALTERNATE_NUMBER_FORMAT_PLUGIN_BUILDLINK3_MK)
+HS_HLS_ALTERNATE_NUMBER_FORMAT_PLUGIN_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.hs-hls-alternate-number-format-plugin+= hs-hls-alternate-number-format-plugin>=1.0.1
+BUILDLINK_ABI_DEPENDS.hs-hls-alternate-number-format-plugin+= hs-hls-alternate-number-format-plugin>=1.0.1.0
+BUILDLINK_PKGSRCDIR.hs-hls-alternate-number-format-plugin?= ../../devel/hs-hls-alternate-number-format-plugin
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../devel/hs-ghcide/buildlink3.mk"
+.include "../../devel/hs-hie-compat/buildlink3.mk"
+.include "../../devel/hs-hls-graph/buildlink3.mk"
+.include "../../devel/hs-hls-plugin-api/buildlink3.mk"
+.include "../../devel/hs-lens/buildlink3.mk"
+.include "../../devel/hs-lsp/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-syb/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.endif # HS_HLS_ALTERNATE_NUMBER_FORMAT_PLUGIN_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -hs-hls-alternate-number-format-plugin
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/distinfo Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/02/16 10:17:01 pho Exp $
+
+BLAKE2s (hls-alternate-number-format-plugin-1.0.1.0.tar.gz) = f06f21d743aa503eeb1d113d97d0b22c8acf480b7765b449d852f13c5b1ddb5d
+SHA512 (hls-alternate-number-format-plugin-1.0.1.0.tar.gz) = 85d2525b19b98481434743a73b132286a9ae885ced1ae6dade73f2fbc3c5b75b0ef579d1f716a60ba852e94fec0b259c829ad5b5f7ec58b54a10b97c4e0a665b
+Size (hls-alternate-number-format-plugin-1.0.1.0.tar.gz) = 14923 bytes
+SHA1 (patch-hls-alternate-number-format-plugin.cabal) = 8241ecf22c96a58ddca1ced8a35482854046a961
+SHA1 (patch-src_Ide_Plugin_Literals.hs) = e5442efeb9249476bcb325bc5c0e04382196a53a
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/patches/patch-hls-alternate-number-format-plugin.cabal
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/patches/patch-hls-alternate-number-format-plugin.cabal Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-hls-alternate-number-format-plugin.cabal,v 1.1 2022/02/16 10:17:01 pho Exp $
+
+Required by patch-src-Ide_Plugin_Literals.hs
+
+--- hls-alternate-number-format-plugin.cabal.orig 2022-02-15 15:51:36.812672917 +0000
++++ hls-alternate-number-format-plugin.cabal
+@@ -25,6 +25,7 @@ library
+ aeson
+ , base >=4.12 && < 5
+ , containers
++ , ghc
+ , ghcide ^>=1.6
+ , ghc-boot-th
+ , hls-graph
diff -r 0c40c864e83b -r 28fef63af06c devel/hs-hls-alternate-number-format-plugin/patches/patch-src_Ide_Plugin_Literals.hs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-hls-alternate-number-format-plugin/patches/patch-src_Ide_Plugin_Literals.hs Wed Feb 16 10:17:01 2022 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_Ide_Plugin_Literals.hs,v 1.1 2022/02/16 10:17:01 pho Exp $
+
+Fix build with GHC 9.2 API: The structure of FractionalLit has changed.
+
+--- src/Ide/Plugin/Literals.hs.orig 2022-02-15 15:42:54.956463717 +0000
++++ src/Ide/Plugin/Literals.hs
+@@ -18,6 +18,7 @@ import Development.IDE.Graph.C
+ import qualified GHC.Generics as GHC
+ import Generics.SYB (Data, Typeable, everything,
+ extQ)
++import GHC.Types.SourceText (rationalFromFractionalLit)
+
+ -- data type to capture what type of literal we are dealing with
+ -- provides location and possibly source text (for OverLits) as well as it's value
+@@ -85,7 +86,7 @@ fromIntegralLit :: RealSrcSpan -> Integr
+ fromIntegralLit s IL{..} = fmap (\txt' -> IntLiteral s txt' il_value) (fromSourceText il_text)
+
+ fromFractionalLit :: RealSrcSpan -> FractionalLit -> Maybe Literal
+-fromFractionalLit s FL{..} = fmap (\txt' -> FracLiteral s txt' fl_value) (fromSourceText fl_text)
++fromFractionalLit s frac@FL{..} = fmap (\txt' -> FracLiteral s txt' $ rationalFromFractionalLit frac) (fromSourceText fl_text)
+
+ fromSourceText :: SourceText -> Maybe Text
+ fromSourceText = \case
+@@ -116,5 +117,5 @@ literalToString = \case
+ overLitToString :: OverLitVal -> String
+ overLitToString = \case
+ HsIntegral int -> case int of { IL{il_value} -> "IntegralOverLit: " <> show il_value}
+- HsFractional frac -> case frac of { FL{fl_value} -> "RationalOverLit: " <> show fl_value}
++ HsFractional frac -> case rationalFromFractionalLit frac of { fl_value -> "RationalOverLit: " <> show fl_value}
+ HsIsString _ str -> "HIsString: " <> show str
Home |
Main Index |
Thread Index |
Old Index