packages feed

harpie 0.1.3.1 → 0.1.4.0

raw patch · 3 files changed

+8/−29 lines, 3 filesdep −doctest-paralleldep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: doctest-parallel

Dependency ranges changed: base

API changes (from Hackage documentation)

- Harpie.Fixed: invtri :: forall a (n :: Nat). (KnownNat n, Floating a, Eq a) => Matrix n n a -> Matrix n n a
+ Harpie.Fixed: invtri :: forall a (n :: Nat). (KnownNat n, Floating a) => Matrix n n a -> Matrix n n a

Files

harpie.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: harpie-version: 0.1.3.1+version: 0.1.4.0 license: BSD-3-Clause license-file: LICENSE copyright: Tony Day (c) 2016-2024@@ -45,10 +45,9 @@  build-type: Simple tested-with:-  ghc ==9.6.7-  ghc ==9.8.4-  ghc ==9.10.2+  ghc ==9.10.3   ghc ==9.12.2+  ghc ==9.14.1  extra-doc-files:   ChangeLog.md@@ -163,17 +162,6 @@     Harpie.Fixed     Harpie.Shape     Harpie.Sort--test-suite doctests-  import: ghc2024-stanza-  main-is: doctests.hs-  hs-source-dirs: test-  build-depends:-    base >=4.14 && <5,-    doctest-parallel >=0.3 && <0.5,--  ghc-options: -threaded-  type: exitcode-stdio-1.0  common ghc-options-exe-stanza   ghc-options:
src/Harpie/Fixed.hs view
@@ -7,8 +7,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-}-{-# OPTIONS_GHC -Wno-incomplete-patterns #-}-{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {-# OPTIONS_GHC -Wno-redundant-constraints #-}  -- | Arrays with shape information and computations at a type-level.@@ -2791,7 +2789,7 @@ -- -- >>> ident == mult t (invtri t) -- True-invtri :: forall a n. (KnownNat n, Floating a, Eq a) => Matrix n n a -> Matrix n n a+invtri :: forall a n. (KnownNat n, Floating a) => Matrix n n a -> Matrix n n a invtri a = i   where     ti = undiag (fmap recip (diag a))@@ -2823,4 +2821,7 @@ cross_ :: (Num a, KnownNat m) => Matrix m m a -> Fins '[m, m] -> a cross_ l s = sum (fmap (\k -> l ! [i, k] * l ! [j, k]) (A.range [j]))   where-    [i, j] = fromFins s+    ij = fromFins s+    (i, j) = case ij of+      [x, y] -> (x, y)+      _ -> error "cross_: invalid Fins dimension (expected 2D index)"
− test/doctests.hs
@@ -1,10 +0,0 @@-module Main where--import System.Environment (getArgs)-import Test.DocTest (mainFromCabal)-import Prelude (IO, (=<<))--main :: IO ()-main = mainFromCabal "harpie" =<< getArgs---- (\a -> toDynamic (F.takeBs (Dims @'[0]) (S.SNats @'[1]) a) == (A.takes [0] [-1] (toDynamic a))) (F.range @[2,3,4])