Skip to content

Commit

Permalink
removed redundant contraints, cleaned up exports
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed May 29, 2018
1 parent d894489 commit ddd2434
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Version 0.1.2.2
`Backprop` constraints on everything instead of `Num` constraints
* Re-ordered constraint orders on various functions. *Potentially breaking
change* if TypeApplications are used.
* Removed redundant dependency on *finite-typelits*.

Version 0.1.2.1
---------------
Expand Down
1 change: 0 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ library:
- ghc-typelits-knownnat
- ghc-typelits-natnormalise
- vector
- finite-typelits

tests:
hmatrix-backprop-test:
Expand Down
6 changes: 5 additions & 1 deletion test/Nudge.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Nudge where
module Nudge (
nudgeProp
, nudgeProp2
) where

import Control.Monad
import Data.Bifunctor
Expand Down Expand Up @@ -177,6 +180,7 @@ nudgeProp2 f = property $ do
assert $ ((old - new)/old)**2 < eps

instance (HU.Container HU.Vector a, Num a) => Backprop (HU.Matrix a) where
-- TODO: make more efficient?
zero = HU.cmap (const 0)
add = HU.add
one = HU.cmap (const 1)
Expand Down

0 comments on commit ddd2434

Please sign in to comment.