packages feed

numhask-array 0.11.0.1 → 0.11.1.0

raw patch · 6 files changed

+61/−130 lines, 6 filesdep ~basedep ~numhaskdep ~vectorPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, numhask, vector

API changes (from Hackage documentation)

- NumHask.Array.Fixed: instance NumHask.Array.Shape.HasShape s => GHC.Exts.IsList (NumHask.Array.Fixed.Array s a)
+ NumHask.Array.Fixed: instance NumHask.Array.Shape.HasShape s => GHC.IsList.IsList (NumHask.Array.Fixed.Array s a)

Files

ChangeLog.md view
@@ -1,3 +1,9 @@++0.11.1+===++* bump numhask-0.12+ 0.11.0.0 === 
LICENSE view
@@ -1,4 +1,4 @@-Copyright Tony Day (c) 2016+Copyright (c) 2016, Tony Day  All rights reserved. 
numhask-array.cabal view
@@ -1,117 +1,66 @@-cabal-version:      3.0-name:               numhask-array-version:            0.11.0.1-synopsis:           Multi-dimensional arrays.+cabal-version: 3.0+name: numhask-array+version: 0.11.1.0+license: BSD-3-Clause+license-file: LICENSE+copyright: Tony Day (c) 2016+category: math+author: Tony Day+maintainer: tonyday567@gmail.com+homepage: https://github.com/tonyday567/numhask-array#readme+bug-reports: https://github.com/tonyday567/numhask-array/issues+synopsis: Multi-dimensional arrays. description:-  This package provides an interface into the [numhask](https://hackage.haskell.org/package/numhask) API, and both type- and value-level shape manipulation routines.+    This package provides an interface into the [numhask](https://hackage.haskell.org/package/numhask) API, and both type- and value-level shape manipulation routines. -  == Usage+    == Usage -  >>> {-# LANGUAGE RebindableSyntax #-}-  >>> import NumHask.Prelude-  >>> import NumHask.Array+    >>> {-# LANGUAGE RebindableSyntax #-}+    >>> import NumHask.Prelude+    >>> import NumHask.Array -  In situations where shape is only known at runtime, a clear module configuration is:+    In situations where shape is only known at runtime, a clear module configuration is: -  >>> import NumHask.Array.Shape-  >>> import qualified NumHask.Array.Fixed as F-  >>> import qualified NumHask.Array.Dynamic as D+    >>> import NumHask.Array.Shape+    >>> import qualified NumHask.Array.Fixed as F+    >>> import qualified NumHask.Array.Dynamic as D -category:           project-homepage:           https://github.com/tonyday567/numhask-array#readme-bug-reports:        https://github.com/tonyday567/numhask-array/issues-author:             Tony Day-maintainer:         tonyday567@gmail.com-copyright:          Tony Day-license:            BSD-3-Clause-license-file:       LICENSE-tested-with:        GHC == 8.10.7 || ==9.2.8 || ==9.4.5 || ==9.6.2-build-type:         Simple+build-type: Simple+tested-with:+    , GHC == 9.10.1+    , GHC == 9.8.2+    , GHC == 9.6.5 extra-doc-files: ChangeLog.md  source-repository head-  type:     git-  location: https://github.com/tonyday567/numhask-array--common ghc2021-stanza-  if impl(ghc >=9.2)-    default-language:-      GHC2021-  if impl(ghc <9.2)-    default-language:-      Haskell2010-    default-extensions:-      BangPatterns-      BinaryLiterals-      ConstrainedClassMethods-      ConstraintKinds-      DeriveDataTypeable-      DeriveFoldable-      DeriveFunctor-      DeriveGeneric-      DeriveLift-      DeriveTraversable-      DoAndIfThenElse-      EmptyCase-      EmptyDataDecls-      EmptyDataDeriving-      ExistentialQuantification-      ExplicitForAll-      FlexibleContexts-      FlexibleInstances-      ForeignFunctionInterface-      GADTSyntax-      GeneralisedNewtypeDeriving-      HexFloatLiterals-      ImplicitPrelude-      InstanceSigs-      KindSignatures-      MonomorphismRestriction-      MultiParamTypeClasses-      NamedFieldPuns-      NamedWildCards-      NumericUnderscores-      PatternGuards-      PolyKinds-      PostfixOperators-      RankNTypes-      RelaxedPolyRec-      ScopedTypeVariables-      StandaloneDeriving-      StarIsType-      TraditionalRecordSyntax-      TupleSections-      TypeApplications-      TypeOperators-      TypeSynonymInstances-  if impl(ghc <9.2) && impl(ghc >=8.10)-    default-extensions:-      ImportQualifiedPost-      StandaloneKindSignatures+    type: git+    location: https://github.com/tonyday567/numhask-array  common ghc-options-stanza-  ghc-options:-    -Wall-    -Wcompat-    -Wincomplete-record-updates-    -Wincomplete-uni-patterns-    -Wredundant-constraints-    -Widentities-    -Wpartial-fields+    ghc-options:+        -Wall+        -Wcompat+        -Widentities+        -Wincomplete-record-updates+        -Wincomplete-uni-patterns+        -Wpartial-fields+        -Wredundant-constraints -library-  import: ghc2021-stanza-  import: ghc-options-stanza-  hs-source-dirs:     src-  build-depends:-    , adjunctions   >=4.0 && <5-    , base          >=4.11 && <5-    , distributive  >=0.4 && <0.7-    , numhask       >=0.11 && < 0.12-    , vector        >=0.10 && <0.14+common ghc2021-stanza+    default-language: GHC2021 -  exposed-modules:-    NumHask.Array-    NumHask.Array.Dynamic-    NumHask.Array.Fixed-    NumHask.Array.Shape+library+    import: ghc-options-stanza+    import: ghc2021-stanza+    hs-source-dirs: src+    build-depends:+        , adjunctions  >=4.0 && <5+        , base         >=4.14 && <5+        , distributive >=0.4 && <0.7+        , numhask      >=0.11 && <0.13+        , vector       >=0.12.3 && <0.14+    exposed-modules:+        NumHask.Array+        NumHask.Array.Dynamic+        NumHask.Array.Fixed+        NumHask.Array.Shape
src/NumHask/Array/Dynamic.hs view
@@ -1,8 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE TypeFamilies #-}-{-# OPTIONS_GHC -Wno-redundant-constraints #-}-{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}+{-# OPTIONS_GHC -Wno-x-partial #-} {-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}  -- | Arrays with a dynamic shape (shape only known at runtime).
src/NumHask/Array/Fixed.hs view
@@ -1,11 +1,8 @@ {-# LANGUAGE DataKinds #-}-{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {-# OPTIONS_GHC -Wno-redundant-constraints #-}-{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}  -- | Arrays with a fixed shape (known shape at compile time). module NumHask.Array.Fixed@@ -78,7 +75,6 @@  import Data.Distributive (Distributive (..)) import Data.Functor.Rep-import Data.List ((!!)) import Data.Proxy import Data.Vector qualified as V import GHC.Exts (IsList (..))
src/NumHask/Array/Shape.hs view
@@ -2,8 +2,6 @@ {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}-{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}  -- | Functions for manipulating shape. The module tends to supply equivalent functionality at type-level and value-level with functions of the same name (except for capitalization). module NumHask.Array.Shape@@ -203,19 +201,11 @@   Drop 0 xs = xs   Drop n (_ : xs) = Drop (n - 1) xs -type family Tail (a :: [k]) :: [k] where-  Tail '[] = L.TypeError ('Text "No tail")-  Tail (_ : xs) = xs- type family Init (a :: [k]) :: [k] where   Init '[] = L.TypeError ('Text "No init")   Init '[_] = '[]   Init (x : xs) = x : Init xs -type family Head (a :: [k]) :: k where-  Head '[] = L.TypeError ('Text "No head")-  Head (x : _) = x- type family Last (a :: [k]) :: k where   Last '[] = L.TypeError ('Text "No last")   Last '[x] = x@@ -425,19 +415,10 @@   SFilter 'FMin p (x ': xs) = If (Cmp x p == 'LT) (x ': SFilter 'FMin p xs) (SFilter 'FMin p xs)   SFilter 'FMax p (x ': xs) = If (Cmp x p == 'GT || Cmp x p == 'EQ) (x ': SFilter 'FMax p xs) (SFilter 'FMax p xs) -type family Zip lst lst' where-  Zip lst lst' = ZipWith '(,) lst lst' -- Implemented as TF because #11375- type family ZipWith f lst lst' where   ZipWith f '[] lst = '[]   ZipWith f lst '[] = '[]   ZipWith f (l ': ls) (n ': ns) = f l n ': ZipWith f ls ns--type family Fst a where-  Fst '(a, _) = a--type family Snd a where-  Snd '(_, a) = a  type family FMap f lst where   FMap f '[] = '[]