on master help sign in
Fix 7.10 builds
commit20e7e483d75613f16580baa71b44fa9864c940fd authorHuw Campbell <huw.campbell@ambiata.com> dateSat 14 Jan 2017, 21:36 (10 years ago) parentcc70f1f
4 files changed+9−37
src/Grenade/Core/Shape.hs+1 src/Grenade/Graph/GraphNetwork.hs−37 src/Grenade/Recurrent/Layers/BasicRecurrent.hs+5 src/Grenade/Recurrent/Layers/LSTM.hs+3
src/Grenade/Core/Shape.hs+1
@@ -32,6 +32,7 @@ module Grenade.Core.Shape (
3232import Control.DeepSeq (NFData (..))
3333import Control.Monad.Random ( MonadRandom, getRandom )
3434
35+import Data.Proxy
3536import Data.Singletons
3637import Data.Singletons.TypeLits
3738import Data.Vector.Storable ( Vector )
src/Grenade/Graph/GraphNetwork.hsdeleted−37
@@ -1,37 +0,0 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE GADTs #-}
3−{-# LANGUAGE KindSignatures #-}
4−{-# LANGUAGE ScopedTypeVariables #-}
5−{-# LANGUAGE TypeOperators #-}
6−{-# LANGUAGE TypeFamilies #-}
7−{-# LANGUAGE PolyKinds #-}
8−{-# LANGUAGE MultiParamTypeClasses #-}
9−{-# LANGUAGE FlexibleContexts #-}
10−{-# LANGUAGE FlexibleInstances #-}
11−{-# LANGUAGE LambdaCase #-}
12−
13−module Grenade.Graph.Network (
14− Layer (..)
15− , UpdateLayer (..)
16− ) where
17−
18−import Control.Monad.Random (MonadRandom)
19−import Data.Singletons
20−import Data.Singletons.Prelude
21−
22−import GHC.TypeLits
23−
24−import Grenade.Core.Shape
25−import Grenade.Core.Network ( UpdateLayer (..), Layer (..) )
26−
27−-- | Type of a DAG network
28−
29−data Fin :: Nat -> * where
30− Fin0 :: Fin (n + 1)
31− FinS :: Fin n -> Fin (n + 1)
32−
33−data Edge :: Nat -> * where
34− Edge :: Shape -> Fin n -> Edge n
35−
36−data Node a n where
37− Node :: a -> [Edge n] -> Node a n
src/Grenade/Recurrent/Layers/BasicRecurrent.hs+5
@@ -6,11 +6,16 @@
66{-# LANGUAGE MultiParamTypeClasses #-}
77{-# LANGUAGE FlexibleContexts #-}
88{-# LANGUAGE UndecidableInstances #-}
9+
10+-- GHC 7.10 doesn't see recurrent run functions as total.
11+{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
912module Grenade.Recurrent.Layers.BasicRecurrent (
1013 BasicRecurrent (..)
1114 , randomBasicRecurrent
1215 ) where
1316
17+
18+
1419import Control.Monad.Random ( MonadRandom, getRandom )
1520
1621import Data.Singletons.TypeLits
src/Grenade/Recurrent/Layers/LSTM.hs+3
@@ -8,6 +8,9 @@
88{-# LANGUAGE MultiParamTypeClasses #-}
99{-# LANGUAGE FlexibleContexts #-}
1010{-# LANGUAGE ViewPatterns #-}
11+
12+-- GHC 7.10 doesn't see recurrent run functions as total.
13+{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
1114module Grenade.Recurrent.Layers.LSTM (
1215 LSTM (..)
1316 , LSTMWeights (..)