diff options
author | Sidharth Kapur <sidharthkapur1@gmail.com> | 2016-04-04 10:38:30 -0500 |
---|---|---|
committer | Sidharth Kapur <sidharthkapur1@gmail.com> | 2016-04-04 10:38:30 -0500 |
commit | 0e0354c6daa7eab05cf00c8267a5578eea43ca16 (patch) | |
tree | 6d7f6e65672b0e8e36e3108bedce882b6b208229 /packages/base/src | |
parent | de9c77a753547b236b264d34fa02ca8e62c8e955 (diff) |
Remove Binary orphan instance for Complex
Diffstat (limited to 'packages/base/src')
-rw-r--r-- | packages/base/src/Internal/Static.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs index a0af085..381f3bc 100644 --- a/packages/base/src/Internal/Static.hs +++ b/packages/base/src/Internal/Static.hs | |||
@@ -48,11 +48,6 @@ type ℂ = Complex Double | |||
48 | newtype Dim (n :: Nat) t = Dim t | 48 | newtype Dim (n :: Nat) t = Dim t |
49 | deriving (Show, Generic) | 49 | deriving (Show, Generic) |
50 | 50 | ||
51 | instance Binary a => Binary (Complex a) | ||
52 | where | ||
53 | put (r :+ i) = put (r, i) | ||
54 | get = (\(r,i) -> r :+ i) <$> get | ||
55 | |||
56 | instance (KnownNat n, Binary a) => Binary (Dim n a) where | 51 | instance (KnownNat n, Binary a) => Binary (Dim n a) where |
57 | get = do | 52 | get = do |
58 | k <- get | 53 | k <- get |
@@ -84,13 +79,13 @@ newtype R n = R (Dim n (Vector ℝ)) | |||
84 | deriving (Num,Fractional,Floating,Generic,Binary) | 79 | deriving (Num,Fractional,Floating,Generic,Binary) |
85 | 80 | ||
86 | newtype C n = C (Dim n (Vector ℂ)) | 81 | newtype C n = C (Dim n (Vector ℂ)) |
87 | deriving (Num,Fractional,Floating,Generic,Binary) | 82 | deriving (Num,Fractional,Floating,Generic) |
88 | 83 | ||
89 | newtype L m n = L (Dim m (Dim n (Matrix ℝ))) | 84 | newtype L m n = L (Dim m (Dim n (Matrix ℝ))) |
90 | deriving (Generic, Binary) | 85 | deriving (Generic, Binary) |
91 | 86 | ||
92 | newtype M m n = M (Dim m (Dim n (Matrix ℂ))) | 87 | newtype M m n = M (Dim m (Dim n (Matrix ℂ))) |
93 | deriving (Generic, Binary) | 88 | deriving (Generic) |
94 | 89 | ||
95 | mkR :: Vector ℝ -> R n | 90 | mkR :: Vector ℝ -> R n |
96 | mkR = R . Dim | 91 | mkR = R . Dim |