summaryrefslogtreecommitdiff
path: root/finance/hs-Decimal
diff options
context:
space:
mode:
authorriastradh <riastradh@pkgsrc.org>2020-03-30 16:44:12 +0000
committerriastradh <riastradh@pkgsrc.org>2020-03-30 16:44:12 +0000
commitad1d126c38918a175294a988c5d710c86eb5f800 (patch)
tree03bb69a3ad0f2274f682c5ad6bf7889c423e863a /finance/hs-Decimal
parent19b0c393448a6552615e319b1e3c67b20601844a (diff)
downloadpkgsrc-ad1d126c38918a175294a988c5d710c86eb5f800.tar.gz
hs-Decimal: Import version 0.5.1
Diffstat (limited to 'finance/hs-Decimal')
-rw-r--r--finance/hs-Decimal/DESCR19
-rw-r--r--finance/hs-Decimal/Makefile15
-rw-r--r--finance/hs-Decimal/buildlink3.mk13
-rw-r--r--finance/hs-Decimal/distinfo6
4 files changed, 53 insertions, 0 deletions
diff --git a/finance/hs-Decimal/DESCR b/finance/hs-Decimal/DESCR
new file mode 100644
index 00000000000..7fe49e53af7
--- /dev/null
+++ b/finance/hs-Decimal/DESCR
@@ -0,0 +1,19 @@
+Haskell-Decimal
+===============
+
+Fixed-precision decimal numbers, where the precision is carried with
+the numbers at run-time.
+
+The `Decimal` type is mainly intended for doing financial arithmetic
+where the number of decimal places may not be known at compile time
+(e.g. for a program that handles both Yen and Dollars) and the
+application must not drop pennies on the floor. For instance if you
+have to divide $10 between three people then one of them has to get
+$3.34.
+
+The number of decimal places in a value is represented as a Word8,
+allowing for up to 255 decimal places. Functions preserve precision.
+Addition and subtraction operators return a result with the precision
+of the most precise argument, so 2.3 + 5.678 = 7.978. Multiplication
+and division use whatever precision is necessary up to 255 decimal
+places.
diff --git a/finance/hs-Decimal/Makefile b/finance/hs-Decimal/Makefile
new file mode 100644
index 00000000000..ac07e349014
--- /dev/null
+++ b/finance/hs-Decimal/Makefile
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1 2020/03/30 16:44:12 riastradh Exp $
+
+DISTNAME= Decimal-0.5.1
+CATEGORIES= finance
+MASTER_SITES= ${MASTER_SITE_HASKELL_HACKAGE:=Decimal-${PKGVERSION_NOREV}/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/PaulJohnson/Haskell-Decimal
+COMMENT= Decimal arithmetic for financial applications
+LICENSE= modified-bsd
+
+USE_LANGUAGES= # none
+
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/finance/hs-Decimal/buildlink3.mk b/finance/hs-Decimal/buildlink3.mk
new file mode 100644
index 00000000000..1678f9532e4
--- /dev/null
+++ b/finance/hs-Decimal/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/03/30 16:44:12 riastradh Exp $
+
+BUILDLINK_TREE+= hs-Decimal
+
+.if !defined(HS_DECIMAL_BUILDLINK3_MK)
+HS_DECIMAL_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.hs-Decimal+= hs-Decimal>=0.5.1
+BUILDLINK_ABI_DEPENDS.hs-Decimal+= hs-Decimal>=0.5.1
+BUILDLINK_PKGSRCDIR.hs-Decimal?= ../../finance/hs-Decimal
+.endif # HS_DECIMAL_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -hs-Decimal
diff --git a/finance/hs-Decimal/distinfo b/finance/hs-Decimal/distinfo
new file mode 100644
index 00000000000..ba1a8cda2a7
--- /dev/null
+++ b/finance/hs-Decimal/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/03/30 16:44:12 riastradh Exp $
+
+SHA1 (Decimal-0.5.1.tar.gz) = 9d744d8edf29bb4e453ec10d025278b1c8b32273
+RMD160 (Decimal-0.5.1.tar.gz) = ee2b2c1ce4b5dde1d8af70824b41601886983fbd
+SHA512 (Decimal-0.5.1.tar.gz) = 9ca3d6f1de96ef4eb6e5e2e3bd7002019ea41e7d404ad9f566926b84ed1ff4aa4a57aa071ef82f00764008469476b5ca196d7c43553885732663f7608c2995fb
+Size (Decimal-0.5.1.tar.gz) = 9553 bytes