From 858121cdcc6c24cb15e28e1c4c2b3050ef53fe00 Mon Sep 17 00:00:00 2001 From: Sidharth Kapur Date: Mon, 1 Feb 2016 17:49:51 -0600 Subject: Remove CPP option from cabal files Use {-# LANGUAGE CPP #-} instead. --- packages/base/hmatrix.cabal | 3 +-- packages/base/src/Internal/Static.hs | 1 + packages/gsl/hmatrix-gsl.cabal | 3 +-- packages/gsl/src/Numeric/GSL/Polynomials.hs | 5 +++-- packages/special/hmatrix-special.cabal | 5 ++--- packages/special/lib/Numeric/GSL/Special/Airy.hs | 1 + packages/special/lib/Numeric/GSL/Special/Bessel.hs | 1 + packages/special/lib/Numeric/GSL/Special/Clausen.hs | 1 + packages/special/lib/Numeric/GSL/Special/Coulomb.hs | 1 + packages/special/lib/Numeric/GSL/Special/Coupling.hs | 1 + packages/special/lib/Numeric/GSL/Special/Dawson.hs | 1 + packages/special/lib/Numeric/GSL/Special/Debye.hs | 1 + packages/special/lib/Numeric/GSL/Special/Dilog.hs | 1 + packages/special/lib/Numeric/GSL/Special/Elementary.hs | 1 + packages/special/lib/Numeric/GSL/Special/Ellint.hs | 1 + packages/special/lib/Numeric/GSL/Special/Erf.hs | 1 + packages/special/lib/Numeric/GSL/Special/Exp.hs | 1 + packages/special/lib/Numeric/GSL/Special/Expint.hs | 1 + packages/special/lib/Numeric/GSL/Special/Fermi_dirac.hs | 1 + packages/special/lib/Numeric/GSL/Special/Gamma.hs | 1 + packages/special/lib/Numeric/GSL/Special/Gegenbauer.hs | 1 + packages/special/lib/Numeric/GSL/Special/Hyperg.hs | 1 + packages/special/lib/Numeric/GSL/Special/Laguerre.hs | 1 + packages/special/lib/Numeric/GSL/Special/Lambert.hs | 1 + packages/special/lib/Numeric/GSL/Special/Legendre.hs | 1 + packages/special/lib/Numeric/GSL/Special/Log.hs | 1 + packages/special/lib/Numeric/GSL/Special/Pow_int.hs | 1 + packages/special/lib/Numeric/GSL/Special/Psi.hs | 1 + packages/special/lib/Numeric/GSL/Special/Synchrotron.hs | 1 + packages/special/lib/Numeric/GSL/Special/Transport.hs | 1 + packages/special/lib/Numeric/GSL/Special/Trig.hs | 1 + packages/special/lib/Numeric/GSL/Special/Zeta.hs | 1 + 32 files changed, 35 insertions(+), 9 deletions(-) (limited to 'packages') diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 9fa3c4e..5524d2b 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -79,8 +79,7 @@ library src/Internal/C/vector-aux.c - extensions: ForeignFunctionInterface, - CPP + extensions: ForeignFunctionInterface ghc-options: -Wall -fno-warn-missing-signatures diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs index 419ff07..61be456 100644 --- a/packages/base/src/Internal/Static.hs +++ b/packages/base/src/Internal/Static.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE DataKinds #-} diff --git a/packages/gsl/hmatrix-gsl.cabal b/packages/gsl/hmatrix-gsl.cabal index d009994..bfd1abf 100644 --- a/packages/gsl/hmatrix-gsl.cabal +++ b/packages/gsl/hmatrix-gsl.cabal @@ -29,8 +29,7 @@ library process, random - Extensions: ForeignFunctionInterface, - CPP + Extensions: ForeignFunctionInterface hs-source-dirs: src Exposed-modules: Numeric.GSL.Differentiation, diff --git a/packages/gsl/src/Numeric/GSL/Polynomials.hs b/packages/gsl/src/Numeric/GSL/Polynomials.hs index 8890f8f..46a31f3 100644 --- a/packages/gsl/src/Numeric/GSL/Polynomials.hs +++ b/packages/gsl/src/Numeric/GSL/Polynomials.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {- | Module : Numeric.GSL.Polynomials Copyright : (c) Alberto Ruiz 2006 @@ -24,7 +25,7 @@ import System.IO.Unsafe (unsafePerformIO) import Foreign.C.Types (CInt(..)) #endif -{- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. +{- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example, the three solutions of x^3 + 8 = 0 @@ -41,7 +42,7 @@ The example in the GSL manual: To find the roots of x^5 -1 = 0: 0.30901699437494756 :+ (-0.9510565162951535), 1.0000000000000002 :+ 0.0] --} +-} polySolve :: [Double] -> [Complex Double] polySolve = toList . polySolve' . fromList diff --git a/packages/special/hmatrix-special.cabal b/packages/special/hmatrix-special.cabal index 3b122c8..368ed2c 100644 --- a/packages/special/hmatrix-special.cabal +++ b/packages/special/hmatrix-special.cabal @@ -29,8 +29,7 @@ flag safe-cheap library Build-Depends: base <5, hmatrix>=0.17, hmatrix-gsl - Extensions: ForeignFunctionInterface, - CPP + Extensions: ForeignFunctionInterface hs-source-dirs: lib @@ -67,7 +66,7 @@ library other-modules: Numeric.GSL.Special.Internal ghc-options: -Wall -fno-warn-unused-binds - + if flag(safe-cheap) cpp-options: -DSAFE_CHEAP=safe else diff --git a/packages/special/lib/Numeric/GSL/Special/Airy.hs b/packages/special/lib/Numeric/GSL/Special/Airy.hs index 737de7c..78f14b8 100644 --- a/packages/special/lib/Numeric/GSL/Special/Airy.hs +++ b/packages/special/lib/Numeric/GSL/Special/Airy.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Airy diff --git a/packages/special/lib/Numeric/GSL/Special/Bessel.hs b/packages/special/lib/Numeric/GSL/Special/Bessel.hs index 4a80c28..70066f8 100644 --- a/packages/special/lib/Numeric/GSL/Special/Bessel.hs +++ b/packages/special/lib/Numeric/GSL/Special/Bessel.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Bessel diff --git a/packages/special/lib/Numeric/GSL/Special/Clausen.hs b/packages/special/lib/Numeric/GSL/Special/Clausen.hs index 80bd45c..c495c99 100644 --- a/packages/special/lib/Numeric/GSL/Special/Clausen.hs +++ b/packages/special/lib/Numeric/GSL/Special/Clausen.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Clausen diff --git a/packages/special/lib/Numeric/GSL/Special/Coulomb.hs b/packages/special/lib/Numeric/GSL/Special/Coulomb.hs index 218213a..6904739 100644 --- a/packages/special/lib/Numeric/GSL/Special/Coulomb.hs +++ b/packages/special/lib/Numeric/GSL/Special/Coulomb.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Coulomb diff --git a/packages/special/lib/Numeric/GSL/Special/Coupling.hs b/packages/special/lib/Numeric/GSL/Special/Coupling.hs index 326f53f..ad120cc 100644 --- a/packages/special/lib/Numeric/GSL/Special/Coupling.hs +++ b/packages/special/lib/Numeric/GSL/Special/Coupling.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Coupling diff --git a/packages/special/lib/Numeric/GSL/Special/Dawson.hs b/packages/special/lib/Numeric/GSL/Special/Dawson.hs index 9f73767..58d92a5 100644 --- a/packages/special/lib/Numeric/GSL/Special/Dawson.hs +++ b/packages/special/lib/Numeric/GSL/Special/Dawson.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Dawson diff --git a/packages/special/lib/Numeric/GSL/Special/Debye.hs b/packages/special/lib/Numeric/GSL/Special/Debye.hs index 7ca17e4..91f9f19 100644 --- a/packages/special/lib/Numeric/GSL/Special/Debye.hs +++ b/packages/special/lib/Numeric/GSL/Special/Debye.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Debye diff --git a/packages/special/lib/Numeric/GSL/Special/Dilog.hs b/packages/special/lib/Numeric/GSL/Special/Dilog.hs index 32cceba..aaebd9f 100644 --- a/packages/special/lib/Numeric/GSL/Special/Dilog.hs +++ b/packages/special/lib/Numeric/GSL/Special/Dilog.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Dilog diff --git a/packages/special/lib/Numeric/GSL/Special/Elementary.hs b/packages/special/lib/Numeric/GSL/Special/Elementary.hs index e58a697..2c092cd 100644 --- a/packages/special/lib/Numeric/GSL/Special/Elementary.hs +++ b/packages/special/lib/Numeric/GSL/Special/Elementary.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Elementary diff --git a/packages/special/lib/Numeric/GSL/Special/Ellint.hs b/packages/special/lib/Numeric/GSL/Special/Ellint.hs index 365c366..678f6db 100644 --- a/packages/special/lib/Numeric/GSL/Special/Ellint.hs +++ b/packages/special/lib/Numeric/GSL/Special/Ellint.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Ellint diff --git a/packages/special/lib/Numeric/GSL/Special/Erf.hs b/packages/special/lib/Numeric/GSL/Special/Erf.hs index 171a3c5..ef96a18 100644 --- a/packages/special/lib/Numeric/GSL/Special/Erf.hs +++ b/packages/special/lib/Numeric/GSL/Special/Erf.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Erf diff --git a/packages/special/lib/Numeric/GSL/Special/Exp.hs b/packages/special/lib/Numeric/GSL/Special/Exp.hs index 3b70078..b6dfeef 100644 --- a/packages/special/lib/Numeric/GSL/Special/Exp.hs +++ b/packages/special/lib/Numeric/GSL/Special/Exp.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Exp diff --git a/packages/special/lib/Numeric/GSL/Special/Expint.hs b/packages/special/lib/Numeric/GSL/Special/Expint.hs index 06f4594..faef752 100644 --- a/packages/special/lib/Numeric/GSL/Special/Expint.hs +++ b/packages/special/lib/Numeric/GSL/Special/Expint.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Expint diff --git a/packages/special/lib/Numeric/GSL/Special/Fermi_dirac.hs b/packages/special/lib/Numeric/GSL/Special/Fermi_dirac.hs index c39c096..fe45d53 100644 --- a/packages/special/lib/Numeric/GSL/Special/Fermi_dirac.hs +++ b/packages/special/lib/Numeric/GSL/Special/Fermi_dirac.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Fermi_dirac diff --git a/packages/special/lib/Numeric/GSL/Special/Gamma.hs b/packages/special/lib/Numeric/GSL/Special/Gamma.hs index 78115f1..41e24f0 100644 --- a/packages/special/lib/Numeric/GSL/Special/Gamma.hs +++ b/packages/special/lib/Numeric/GSL/Special/Gamma.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Gamma diff --git a/packages/special/lib/Numeric/GSL/Special/Gegenbauer.hs b/packages/special/lib/Numeric/GSL/Special/Gegenbauer.hs index a3c998a..fb8bf3f 100644 --- a/packages/special/lib/Numeric/GSL/Special/Gegenbauer.hs +++ b/packages/special/lib/Numeric/GSL/Special/Gegenbauer.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Gegenbauer diff --git a/packages/special/lib/Numeric/GSL/Special/Hyperg.hs b/packages/special/lib/Numeric/GSL/Special/Hyperg.hs index ac237a5..3f63b8f 100644 --- a/packages/special/lib/Numeric/GSL/Special/Hyperg.hs +++ b/packages/special/lib/Numeric/GSL/Special/Hyperg.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Hyperg diff --git a/packages/special/lib/Numeric/GSL/Special/Laguerre.hs b/packages/special/lib/Numeric/GSL/Special/Laguerre.hs index 28b3d20..919dc25 100644 --- a/packages/special/lib/Numeric/GSL/Special/Laguerre.hs +++ b/packages/special/lib/Numeric/GSL/Special/Laguerre.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Laguerre diff --git a/packages/special/lib/Numeric/GSL/Special/Lambert.hs b/packages/special/lib/Numeric/GSL/Special/Lambert.hs index 44fbfb1..71ec9c2 100644 --- a/packages/special/lib/Numeric/GSL/Special/Lambert.hs +++ b/packages/special/lib/Numeric/GSL/Special/Lambert.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Lambert diff --git a/packages/special/lib/Numeric/GSL/Special/Legendre.hs b/packages/special/lib/Numeric/GSL/Special/Legendre.hs index cb33e2e..927fa2c 100644 --- a/packages/special/lib/Numeric/GSL/Special/Legendre.hs +++ b/packages/special/lib/Numeric/GSL/Special/Legendre.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Legendre diff --git a/packages/special/lib/Numeric/GSL/Special/Log.hs b/packages/special/lib/Numeric/GSL/Special/Log.hs index 3becf15..6111ed9 100644 --- a/packages/special/lib/Numeric/GSL/Special/Log.hs +++ b/packages/special/lib/Numeric/GSL/Special/Log.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Log diff --git a/packages/special/lib/Numeric/GSL/Special/Pow_int.hs b/packages/special/lib/Numeric/GSL/Special/Pow_int.hs index 08fd497..6f2540c 100644 --- a/packages/special/lib/Numeric/GSL/Special/Pow_int.hs +++ b/packages/special/lib/Numeric/GSL/Special/Pow_int.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Pow_int diff --git a/packages/special/lib/Numeric/GSL/Special/Psi.hs b/packages/special/lib/Numeric/GSL/Special/Psi.hs index da53d1b..9e2e31a 100644 --- a/packages/special/lib/Numeric/GSL/Special/Psi.hs +++ b/packages/special/lib/Numeric/GSL/Special/Psi.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Psi diff --git a/packages/special/lib/Numeric/GSL/Special/Synchrotron.hs b/packages/special/lib/Numeric/GSL/Special/Synchrotron.hs index b3292a6..c518c30 100644 --- a/packages/special/lib/Numeric/GSL/Special/Synchrotron.hs +++ b/packages/special/lib/Numeric/GSL/Special/Synchrotron.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Synchrotron diff --git a/packages/special/lib/Numeric/GSL/Special/Transport.hs b/packages/special/lib/Numeric/GSL/Special/Transport.hs index b92b578..0047104 100644 --- a/packages/special/lib/Numeric/GSL/Special/Transport.hs +++ b/packages/special/lib/Numeric/GSL/Special/Transport.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Transport diff --git a/packages/special/lib/Numeric/GSL/Special/Trig.hs b/packages/special/lib/Numeric/GSL/Special/Trig.hs index 43fdc95..f2c1519 100644 --- a/packages/special/lib/Numeric/GSL/Special/Trig.hs +++ b/packages/special/lib/Numeric/GSL/Special/Trig.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Trig diff --git a/packages/special/lib/Numeric/GSL/Special/Zeta.hs b/packages/special/lib/Numeric/GSL/Special/Zeta.hs index a57a918..53a6314 100644 --- a/packages/special/lib/Numeric/GSL/Special/Zeta.hs +++ b/packages/special/lib/Numeric/GSL/Special/Zeta.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ------------------------------------------------------------ -- | -- Module : Numeric.GSL.Special.Zeta -- cgit v1.2.3 From 0a6e494d3c7c0725e5c48ce54b8eb3be95bffad9 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 9 Feb 2016 12:59:05 +0100 Subject: changelog and thanks --- packages/README | 3 +++ packages/base/CHANGELOG | 7 +++++++ packages/base/THANKS.md | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 packages/README (limited to 'packages') diff --git a/packages/README b/packages/README new file mode 100644 index 0000000..001875f --- /dev/null +++ b/packages/README @@ -0,0 +1,3 @@ +The package "sparse" depends on MKL but it is not needed by the other packages, +it is only intended for testing. + diff --git a/packages/base/CHANGELOG b/packages/base/CHANGELOG index 581d2ac..3bba3d5 100644 --- a/packages/base/CHANGELOG +++ b/packages/base/CHANGELOG @@ -1,3 +1,10 @@ +0.18.0.0 +-------- + + * meanCov and gaussianSample use Herm type. + + * New functions and instances in the Static module. + 0.17.0.0 -------- diff --git a/packages/base/THANKS.md b/packages/base/THANKS.md index 34675d3..c0ef1a3 100644 --- a/packages/base/THANKS.md +++ b/packages/base/THANKS.md @@ -205,7 +205,13 @@ module reorganization, monadic mapVectorM, and many other improvements. - Vassil Keremidchiev fixed the cabal options for OpenBlas, fixed several installation issues, and added support for stack-based build. +- Greg Nwosu fixed arm compilation + - Patrik Jansson changed meanCov and gaussianSample to use Herm type. Fixed stack.yaml. -- Justin Le added NFData instances for Static types and added mapping and outer product methods to Domain. +- Justin Le added NFData instances for Static types, added mapping and outer product + methods to Domain, and many other functions to the Static module. + +- Sidharth Kapur added Normed and numeric instances for several Static types, and +fixed the CPP issue in cabal files. -- cgit v1.2.3 From c84049d82c9354bda7843c0b83f50c56f75b92e2 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 9 Feb 2016 13:04:58 +0100 Subject: make ghc-8.0 happy --- packages/base/hmatrix.cabal | 2 +- packages/base/src/Internal/Matrix.hs | 3 +-- packages/base/src/Internal/Modular.hs | 16 ++++++++-------- packages/base/src/Internal/Static.hs | 18 +++++++++--------- 4 files changed, 19 insertions(+), 20 deletions(-) (limited to 'packages') diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 5524d2b..aba6fa7 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -16,7 +16,7 @@ Description: Linear systems, matrix decompositions, and other numerical c Code examples: Category: Math -tested-with: GHC==7.10 +tested-with: GHC==8.0 cabal-version: >=1.8 diff --git a/packages/base/src/Internal/Matrix.hs b/packages/base/src/Internal/Matrix.hs index 3082e8d..6efbe5f 100644 --- a/packages/base/src/Internal/Matrix.hs +++ b/packages/base/src/Internal/Matrix.hs @@ -5,8 +5,7 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} - - +{-# LANGUAGE ConstrainedClassMethods #-} -- | -- Module : Internal.Matrix diff --git a/packages/base/src/Internal/Modular.hs b/packages/base/src/Internal/Modular.hs index 239c742..f3c59a8 100644 --- a/packages/base/src/Internal/Modular.hs +++ b/packages/base/src/Internal/Modular.hs @@ -72,7 +72,7 @@ instance (Ord t, KnownNat m) => Ord (Mod m t) where compare a b = compare (unMod a) (unMod b) -instance (Real t, KnownNat m, Integral (Mod m t)) => Real (Mod m t) +instance (Integral t, Real t, KnownNat m, Integral (Mod m t)) => Real (Mod m t) where toRational x = toInteger x % 1 @@ -114,7 +114,7 @@ instance Show t => Show (Mod n t) where show = show . unMod -instance forall n t . (Integral t, KnownNat n) => Num (Mod n t) +instance (Integral t, KnownNat n) => Num (Mod n t) where (+) = l2 (\m a b -> (a + b) `mod` (fromIntegral m)) (*) = l2 (\m a b -> (a * b) `mod` (fromIntegral m)) @@ -159,11 +159,11 @@ instance KnownNat m => Element (Mod m Z) m' = fromIntegral . natVal $ (undefined :: Proxy m) -instance forall m . KnownNat m => CTrans (Mod m I) -instance forall m . KnownNat m => CTrans (Mod m Z) +instance KnownNat m => CTrans (Mod m I) +instance KnownNat m => CTrans (Mod m Z) -instance forall m . KnownNat m => Container Vector (Mod m I) +instance KnownNat m => Container Vector (Mod m I) where conj' = id size' = dim @@ -203,7 +203,7 @@ instance forall m . KnownNat m => Container Vector (Mod m I) fromZ' = vmod . fromZ' toZ' = toZ' . f2i -instance forall m . KnownNat m => Container Vector (Mod m Z) +instance KnownNat m => Container Vector (Mod m Z) where conj' = id size' = dim @@ -311,7 +311,7 @@ lift2 f a b = vmod (f (f2i a) (f2i b)) lift2m f a b = liftMatrix vmod (f (f2iM a) (f2iM b)) -instance forall m . KnownNat m => Num (Vector (Mod m I)) +instance KnownNat m => Num (Vector (Mod m I)) where (+) = lift2 (+) (*) = lift2 (*) @@ -321,7 +321,7 @@ instance forall m . KnownNat m => Num (Vector (Mod m I)) negate = lift1 negate fromInteger x = fromInt (fromInteger x) -instance forall m . KnownNat m => Num (Vector (Mod m Z)) +instance KnownNat m => Num (Vector (Mod m Z)) where (+) = lift2 (+) (*) = lift2 (*) diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs index 61be456..2c31097 100644 --- a/packages/base/src/Internal/Static.hs +++ b/packages/base/src/Internal/Static.hs @@ -191,7 +191,7 @@ singleV v = LA.size v == 1 singleM m = rows m == 1 && cols m == 1 -instance forall n. KnownNat n => Sized ℂ (C n) Vector +instance KnownNat n => Sized ℂ (C n) Vector where size _ = fromIntegral . natVal $ (undefined :: Proxy n) konst x = mkC (LA.scalar x) @@ -207,7 +207,7 @@ instance forall n. KnownNat n => Sized ℂ (C n) Vector r = mkC v :: C n -instance forall n. KnownNat n => Sized ℝ (R n) Vector +instance KnownNat n => Sized ℝ (R n) Vector where size _ = fromIntegral . natVal $ (undefined :: Proxy n) konst x = mkR (LA.scalar x) @@ -224,7 +224,7 @@ instance forall n. KnownNat n => Sized ℝ (R n) Vector -instance forall m n . (KnownNat m, KnownNat n) => Sized ℝ (L m n) Matrix +instance (KnownNat m, KnownNat n) => Sized ℝ (L m n) Matrix where size _ = ((fromIntegral . natVal) (undefined :: Proxy m) ,(fromIntegral . natVal) (undefined :: Proxy n)) @@ -242,7 +242,7 @@ instance forall m n . (KnownNat m, KnownNat n) => Sized ℝ (L m n) Matrix r = mkL x :: L m n -instance forall m n . (KnownNat m, KnownNat n) => Sized ℂ (M m n) Matrix +instance (KnownNat m, KnownNat n) => Sized ℂ (M m n) Matrix where size _ = ((fromIntegral . natVal) (undefined :: Proxy m) ,(fromIntegral . natVal) (undefined :: Proxy n)) @@ -300,7 +300,7 @@ isDiagg (Dim (Dim x)) -------------------------------------------------------------------------------- -instance forall n . KnownNat n => Show (R n) +instance KnownNat n => Show (R n) where show s@(R (Dim v)) | singleV v = "("++show (v!0)++" :: R "++show d++")" @@ -308,7 +308,7 @@ instance forall n . KnownNat n => Show (R n) where d = size s -instance forall n . KnownNat n => Show (C n) +instance KnownNat n => Show (C n) where show s@(C (Dim v)) | singleV v = "("++show (v!0)++" :: C "++show d++")" @@ -316,7 +316,7 @@ instance forall n . KnownNat n => Show (C n) where d = size s -instance forall m n . (KnownNat m, KnownNat n) => Show (L m n) +instance (KnownNat m, KnownNat n) => Show (L m n) where show (isDiag -> Just (z,y,(m',n'))) = printf "(diag %s %s :: L %d %d)" (show z) (drop 9 $ show y) m' n' show s@(L (Dim (Dim x))) @@ -325,7 +325,7 @@ instance forall m n . (KnownNat m, KnownNat n) => Show (L m n) where (m',n') = size s -instance forall m n . (KnownNat m, KnownNat n) => Show (M m n) +instance (KnownNat m, KnownNat n) => Show (M m n) where show (isDiagC -> Just (z,y,(m',n'))) = printf "(diag %s %s :: M %d %d)" (show z) (drop 9 $ show y) m' n' show s@(M (Dim (Dim x))) @@ -336,7 +336,7 @@ instance forall m n . (KnownNat m, KnownNat n) => Show (M m n) -------------------------------------------------------------------------------- -instance forall n t . (Num (Vector t), Numeric t )=> Num (Dim n (Vector t)) +instance (Num (Vector t), Numeric t )=> Num (Dim n (Vector t)) where (+) = lift2F (+) (*) = lift2F (*) -- cgit v1.2.3 From 6a0bf038091e453115a3451c040cbe790e770b89 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 11 Feb 2016 18:25:22 +0100 Subject: bump minor versions (removed CPP) --- packages/gsl/hmatrix-gsl.cabal | 2 +- packages/special/hmatrix-special.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/gsl/hmatrix-gsl.cabal b/packages/gsl/hmatrix-gsl.cabal index bfd1abf..c81f241 100644 --- a/packages/gsl/hmatrix-gsl.cabal +++ b/packages/gsl/hmatrix-gsl.cabal @@ -1,5 +1,5 @@ Name: hmatrix-gsl -Version: 0.18.0.0 +Version: 0.18.0.1 License: GPL License-file: LICENSE Author: Alberto Ruiz diff --git a/packages/special/hmatrix-special.cabal b/packages/special/hmatrix-special.cabal index 368ed2c..2848e39 100644 --- a/packages/special/hmatrix-special.cabal +++ b/packages/special/hmatrix-special.cabal @@ -1,5 +1,5 @@ Name: hmatrix-special -Version: 0.4.0.0 +Version: 0.4.0.1 License: GPL License-file: LICENSE Author: Alberto Ruiz -- cgit v1.2.3