summaryrefslogtreecommitdiff
path: root/packages/base/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src')
-rw-r--r--packages/base/src/Internal/Static.hs13
1 files changed, 4 insertions, 9 deletions
diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs
index 1e9a5a3..058b9d0 100644
--- a/packages/base/src/Internal/Static.hs
+++ b/packages/base/src/Internal/Static.hs
@@ -69,21 +69,16 @@ instance NFData t => NFData (Dim n t) where
69-------------------------------------------------------------------------------- 69--------------------------------------------------------------------------------
70 70
71newtype R n = R (Dim n (Vector ℝ)) 71newtype R n = R (Dim n (Vector ℝ))
72 deriving (Num,Fractional,Floating,Generic) 72 deriving (Num,Fractional,Floating,Generic,Binary)
73 73
74newtype C n = C (Dim n (Vector ℂ)) 74newtype C n = C (Dim n (Vector ℂ))
75 deriving (Num,Fractional,Floating,Generic) 75 deriving (Num,Fractional,Floating,Generic,Binary)
76 76
77newtype L m n = L (Dim m (Dim n (Matrix ℝ))) 77newtype L m n = L (Dim m (Dim n (Matrix ℝ)))
78 deriving (Generic) 78 deriving (Generic, Binary)
79 79
80newtype M m n = M (Dim m (Dim n (Matrix ℂ))) 80newtype M m n = M (Dim m (Dim n (Matrix ℂ)))
81 deriving (Generic) 81 deriving (Generic, Binary)
82
83instance (KnownNat n) => Binary (R n)
84instance (KnownNat n) => Binary (C n)
85instance (KnownNat m, KnownNat n) => Binary (L m n)
86instance (KnownNat m, KnownNat n) => Binary (M m n)
87 82
88mkR :: Vector ℝ -> R n 83mkR :: Vector ℝ -> R n
89mkR = R . Dim 84mkR = R . Dim