💣 Machine learning which might blow up in your face 💣

Drop support for GHC < 8.0

+6 -26
-4
examples/main/recurrent.hs
··· 9 9 import Control.Monad ( foldM ) 10 10 import Control.Monad.Random ( MonadRandom, getRandomR ) 11 11 12 - #if __GLASGOW_HASKELL__ < 800 13 - import Data.List ( unfoldr ) 14 - #else 15 12 import Data.List ( cycle, unfoldr ) 16 - #endif 17 13 import Data.Semigroup ( (<>) ) 18 14 19 15 import qualified Numeric.LinearAlgebra.Static as SA
-4
test/Test/Grenade/Layers/PadCrop.hs
··· 7 7 {-# LANGUAGE ScopedTypeVariables #-} 8 8 {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 9 9 10 - #if __GLASGOW_HASKELL__ < 800 11 - {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} 12 - #endif 13 - 14 10 module Test.Grenade.Layers.PadCrop where 15 11 16 12 import Grenade
-3
test/Test/Grenade/Network.hs
··· 14 14 import Control.Monad.ST ( runST ) 15 15 16 16 import Data.Constraint 17 - #if __GLASGOW_HASKELL__ < 800 18 - import Data.Proxy 19 - #endif 20 17 import qualified Data.Vector.Storable as VS 21 18 import qualified Data.Vector.Storable.Mutable as VS ( write ) 22 19 import Data.Singletons
+6 -15
test/Test/Hedgehog/TypeLits.hs
··· 8 8 module Test.Hedgehog.TypeLits where 9 9 10 10 import Data.Constraint 11 - #if __GLASGOW_HASKELL__ < 800 12 - import Data.Proxy 13 - #endif 14 11 import Data.Singletons 15 12 16 13 import Hedgehog (Gen) ··· 19 16 import Grenade 20 17 21 18 import GHC.TypeLits 22 - import GHC.TypeLits.Witnesses 19 + import GHC.TypeLits.Witnesses hiding (SNat) 23 20 import Test.Hedgehog.Compat 24 21 25 22 genNat :: Gen SomeNat ··· 27 24 ~(Just n) <- someNatVal <$> choose 1 10 28 25 return n 29 26 30 - #if __GLASGOW_HASKELL__ < 800 31 - type Shape' = ('KProxy :: KProxy Shape) 32 - #else 33 - type Shape' = Shape 34 - #endif 35 - 36 - genShape :: Gen (SomeSing Shape') 27 + genShape :: Gen (SomeSing Shape) 37 28 genShape 38 29 = Gen.choice [ 39 30 genD1 ··· 41 32 , genD3 42 33 ] 43 34 44 - genD1 :: Gen (SomeSing Shape') 35 + genD1 :: Gen (SomeSing Shape) 45 36 genD1 = do 46 37 n <- genNat 47 38 return $ case n of 48 39 SomeNat (_ :: Proxy x) -> SomeSing (sing :: Sing ('D1 x)) 49 40 50 - genD2 :: Gen (SomeSing Shape') 41 + genD2 :: Gen (SomeSing Shape) 51 42 genD2 = do 52 43 n <- genNat 53 44 m <- genNat 54 45 return $ case (n, m) of 55 46 (SomeNat (_ :: Proxy x), SomeNat (_ :: Proxy y)) -> SomeSing (sing :: Sing ('D2 x y)) 56 47 57 - genD3 :: Gen (SomeSing Shape') 48 + genD3 :: Gen (SomeSing Shape) 58 49 genD3 = do 59 50 n <- genNat 60 51 m <- genNat ··· 64 55 case natDict px %* natDict pz of 65 56 Dict -> SomeSing (sing :: Sing ('D3 x y z)) 66 57 67 - rss :: SomeSing Shape' -> String 58 + rss :: SomeSing Shape -> String 68 59 rss (SomeSing (r :: Sing s)) = case r of 69 60 (D1Sing a@SNat) -> "D1 " ++ show (natVal a) 70 61 (D2Sing a@SNat b@SNat) -> "D2 " ++ show (natVal a) ++ " " ++ show (natVal b)