diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/src/Internal/Static.hs | 13 |
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 | ||
71 | newtype R n = R (Dim n (Vector ℝ)) | 71 | newtype R n = R (Dim n (Vector ℝ)) |
72 | deriving (Num,Fractional,Floating,Generic) | 72 | deriving (Num,Fractional,Floating,Generic,Binary) |
73 | 73 | ||
74 | newtype C n = C (Dim n (Vector ℂ)) | 74 | newtype C n = C (Dim n (Vector ℂ)) |
75 | deriving (Num,Fractional,Floating,Generic) | 75 | deriving (Num,Fractional,Floating,Generic,Binary) |
76 | 76 | ||
77 | newtype L m n = L (Dim m (Dim n (Matrix ℝ))) | 77 | newtype L m n = L (Dim m (Dim n (Matrix ℝ))) |
78 | deriving (Generic) | 78 | deriving (Generic, Binary) |
79 | 79 | ||
80 | newtype M m n = M (Dim m (Dim n (Matrix ℂ))) | 80 | newtype M m n = M (Dim m (Dim n (Matrix ℂ))) |
81 | deriving (Generic) | 81 | deriving (Generic, Binary) |
82 | |||
83 | instance (KnownNat n) => Binary (R n) | ||
84 | instance (KnownNat n) => Binary (C n) | ||
85 | instance (KnownNat m, KnownNat n) => Binary (L m n) | ||
86 | instance (KnownNat m, KnownNat n) => Binary (M m n) | ||
87 | 82 | ||
88 | mkR :: Vector ℝ -> R n | 83 | mkR :: Vector ℝ -> R n |
89 | mkR = R . Dim | 84 | mkR = R . Dim |