packages feed

fixed-point-vector-space (empty) → 0.5.0.0

raw patch · 4 files changed

+109/−0 lines, 4 filesdep +basedep +fixed-pointdep +vector-spacesetup-changed

Dependencies added: base, fixed-point, vector-space

Files

+ Data/Fixed/Binary/VectorSpace.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}+module Data.Fixed.Binary.VectorSpace () where++import Data.Bits++import Data.AdditiveGroup+import Data.AffineSpace+import Data.Basis+import Data.VectorSpace++import Data.Fixed.Binary++instance ( HasResolution r, Bits a, Bits (Super a), Integral a+         , Integral (Super a), SuperTypeable a) =>+         AdditiveGroup (Fixed r a) where+  {-# INLINE zeroV #-}+  zeroV = 0+  {-# INLINE (^+^) #-}+  (^+^) = (+)+  {-# INLINE negateV #-}+  negateV = negate++instance ( HasResolution r, Bits a, Bits (Super a), Integral a+         , Integral (Super a), SuperTypeable a) =>+         AffineSpace (Fixed r a) where+  type Diff (Fixed r a) = Fixed r a+  {-# INLINE (.-.) #-}+  (.-.) = (-)+  {-# INLINE (.+^) #-}+  (.+^) = (+)++instance ( HasResolution r, Bits a, Bits (Super a), Integral a+         , Integral (Super a), SuperTypeable a) =>+         HasBasis (Fixed r a) where+  type Basis (Fixed r a) = ()+  {-# INLINE basisValue #-}+  basisValue ~() = 1+  {-# INLINE decompose #-}+  decompose s = [((), s)]+  {-# INLINE decompose' #-}+  decompose' s = const s++instance ( HasResolution r, Bits a, Bits (Super a), Integral a+         , Integral (Super a), SuperTypeable a) =>+         VectorSpace (Fixed r a) where+  type Scalar (Fixed r a) = Fixed r a+  {-# INLINE (*^) #-}+  (*^) = (*)++instance ( HasResolution r, Bits a, Bits (Super a), Integral a+         , Integral (Super a), SuperTypeable a) =>+         InnerSpace (Fixed r a) where+  {-# INLINE (<.>) #-}+  (<.>) = (*)
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (C) 2011 by Jake McArthur++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ fixed-point-vector-space.cabal view
@@ -0,0 +1,32 @@+Name:                fixed-point-vector-space+Version:             0.5.0.0+Synopsis:            vector-space instances for the fixed-point package+Description:         This package provides instances of VectorSpace,+                     AffineSpace, etc. for the fixed-point package.+License:             MIT+License-file:        LICENSE+Author:              Jake McArthur+Maintainer:          Jake McArthur <Jake.McArthur@gmail.com>+Category:            Data, Game, Math, Numerical++Build-type:          Simple+Cabal-version:       >=1.6+++Library+  Exposed-modules:   Data.Fixed.Binary.VectorSpace+  Extensions:        FlexibleContexts,+                     TypeFamilies+  Build-depends:     base == 4.3.*,+                     fixed-point == 0.5.0.0,+                     vector-space == 0.7.3.*+  GHC-options:       -Wall -fno-warn-orphans -fwarn-tabs -funfolding-use-threshold=16++Source-repository head+  type:     darcs+  location: http://patch-tag.com/r/jmcarthur/fixed-point++source-repository this+  type:     darcs+  location: http://patch-tag.com/r/jmcarthur/fixed-point+  tag:      v0.5.0.0