From 25973e7498af7649c614b6f05c6c3b8cc3f24637 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Mon, 16 Jun 2014 17:57:57 +0200 Subject: conditional compilation of static interface --- packages/base/src/Numeric/LinearAlgebra/Static.hs | 21 +++++++++++++++++++++ .../src/Numeric/LinearAlgebra/Static/Internal.hs | 9 +++++++++ 2 files changed, 30 insertions(+) (limited to 'packages/base/src') diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs index 4258d6b..388d165 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Static.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs @@ -1,3 +1,5 @@ +#if __GLASGOW_HASKELL__ >= 708 + {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -616,4 +618,23 @@ instance (KnownNat n', KnownNat m') => Testable (L n' m') where checkT _ = test +#else + +{- | +Module : Numeric.LinearAlgebra.Static +Copyright : (c) Alberto Ruiz 2014 +License : BSD3 +Stability : experimental + +Experimental interface with statically checked dimensions. + +This module requires GHC >= 7.8 + +-} + +module Numeric.LinearAlgebra.Static +{-# WARNING "This module requires GHC >= 7.8" #-} +where + +#endif diff --git a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs index c9641d5..b13c264 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs @@ -1,3 +1,5 @@ +#if __GLASGOW_HASKELL__ >= 708 + {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -420,3 +422,10 @@ instance KnownNat n => Disp (C n) putStr "C " >> putStr (tail . dropWhile (/='x') $ su) -------------------------------------------------------------------------------- + +#else + +module Numeric.LinearAlgebra.Static.Internal where + +#endif + -- cgit v1.2.3