packages feed

matrix-static 0.1 → 0.1.1

raw patch · 4 files changed

+27/−14 lines, 4 filesdep −semigroupsdep ~basePVP ok

version bump matches the API change (PVP)

Dependencies removed: semigroups

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,6 @@-# Changelog for matrix-static+# Version 0.1.1 - 15.10.2018 -## Unreleased changes+* Dropped `semigroup` dependency+* Make compatible with GHC 8.6++
README.md view
@@ -1,6 +1,11 @@+[![Build Status](https://travis-ci.org/wchresta/matrix-static.svg?branch=master)](https://travis-ci.org/wchresta/matrix-static)+[![Hackage](https://img.shields.io/hackage/v/matrix-static.svg)](https://hackage.haskell.org/package/matrix-static)+[![Hackage Deps](https://img.shields.io/hackage-deps/v/matrix-static.svg)](http://packdeps.haskellers.com/reverse/matrix-static)++ # matrix-static -A static wrapper around the [https://hackage.haskell.org/package/matrix|matrix] library. It provides a data type `Matrix m n a` derived from `matrix`'s `Matrix a` with additional information about the matix dimension `m n` as type-level Nat's.+A static wrapper around the [matrix](https://hackage.haskell.org/package/matrix) library. It provides a data type `Matrix m n a` derived from `matrix`'s `Matrix a` with additional information about the matix dimension `m n` as type-level Nat's.  (Almost) all functions provided by `Data.Matrix` are wrapped. These wrappers guarantee during compile time that the matrix dimension are correct. As such, runtime errors due to mismatching matrix dimensions are minimized. Also, some performance improvements are achieved by not having to do dimension checks during runtime. 
matrix-static.cabal view
@@ -1,12 +1,14 @@--- This file has been generated from package.yaml by hpack version 0.28.2.+cabal-version: >= 1.10++-- This file has been generated from package.yaml by hpack version 0.29.7. -- -- see: https://github.com/sol/hpack ----- hash: 02c8ff25cba11543cc50c0263ef035bf3e956396da15d93d6600ec0558b24be3+-- hash: c553d9deb8496047a0389a6bf184d757be92bf8fe4336cb0330d82ba02327fb5  name:           matrix-static-version:        0.1-synopsis:       Wrapper around matrix that adds matrix sizes to the type-level+version:        0.1.1+synopsis:       Type-safe matrix operations description:    Please see the README on GitHub at <https://github.com/wchresta/matrix-static#readme> category:       Math homepage:       https://github.com/wchresta/matrix-static#readme@@ -16,9 +18,8 @@ copyright:      2018, Wanja Chresta license:        BSD3 license-file:   LICENSE-tested-with:    GHC == 8.4.3, GHC == 8.2.2, GHC == 8.0.2, GHC == 8.0.1+tested-with:    GHC == 8.6.1, GHC == 8.4.3, GHC == 8.2.2, GHC == 8.0.2, GHC == 8.0.1 build-type:     Simple-cabal-version:  >= 1.10 extra-source-files:     ChangeLog.md     README.md@@ -41,7 +42,6 @@     , ghc-typelits-knownnat     , ghc-typelits-natnormalise     , matrix >=0.3.5 && <0.4-    , semigroups     , vector   default-language: Haskell2010 @@ -60,7 +60,6 @@     , ghc-typelits-natnormalise     , matrix >=0.3.5 && <0.4     , matrix-static-    , semigroups     , tasty     , tasty-hunit     , vector
src/Data/Matrix/Static.hs view
@@ -6,6 +6,9 @@ {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-}+#if __GLASGOW_HASKELL__ >= 806+{-# LANGUAGE NoStarIsType #-}+#endif {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-}@@ -103,6 +106,7 @@   ) where  import Control.DeepSeq (NFData)+import Data.Kind (Type) import Data.Maybe (fromMaybe) import Data.Proxy (Proxy(..)) import GHC.TypeLits@@ -117,7 +121,7 @@ -- | A matrix over the type @f@ with @m@ rows and @n@ columns. This just wraps --   the 'Data.Matrix.Static.Matrix' constructor and adds size information to --   the type-newtype Matrix (m :: Nat) (n :: Nat) (a :: *) = Matrix (M.Matrix a)+newtype Matrix (m :: Nat) (n :: Nat) (a :: Type) = Matrix (M.Matrix a)   deriving ( Eq, Functor, Applicative, Foldable, Traversable            , Monoid, NFData            )@@ -688,7 +692,8 @@ unsafeSet :: a -- ^ New value.         -> (Int,Int) -- ^ Position to replace.         -> Matrix m n a -- ^ Original matrix.-        -> Matrix m n a -- ^ Matrix with the given position replaced with the given value.+        -> Matrix m n a +           -- ^ Matrix with the given position replaced with the given value. {-# INLINE unsafeSet #-} unsafeSet x ij = applyUnary $ M.unsafeSet x ij @@ -1146,7 +1151,8 @@ --   * /PM = LU/. -- --   These properties are only guaranteed when the input matrix is invertible.---   An additional property matches thanks to the strategy followed for pivoting:+--   An additional property matches thanks to the strategy followed for +--   pivoting: -- --   * /L_(i,j)/ <= 1, for all /i,j/. --