summaryrefslogtreecommitdiff
path: root/packages/base/src
diff options
context:
space:
mode:
authorSidharth Kapur <sidharthkapur1@gmail.com>2016-04-04 10:38:30 -0500
committerSidharth Kapur <sidharthkapur1@gmail.com>2016-04-04 10:38:30 -0500
commit0e0354c6daa7eab05cf00c8267a5578eea43ca16 (patch)
tree6d7f6e65672b0e8e36e3108bedce882b6b208229 /packages/base/src
parentde9c77a753547b236b264d34fa02ca8e62c8e955 (diff)
Remove Binary orphan instance for Complex
Diffstat (limited to 'packages/base/src')
-rw-r--r--packages/base/src/Internal/Static.hs9
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
48newtype Dim (n :: Nat) t = Dim t 48newtype Dim (n :: Nat) t = Dim t
49 deriving (Show, Generic) 49 deriving (Show, Generic)
50 50
51instance Binary a => Binary (Complex a)
52 where
53 put (r :+ i) = put (r, i)
54 get = (\(r,i) -> r :+ i) <$> get
55
56instance (KnownNat n, Binary a) => Binary (Dim n a) where 51instance (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
86newtype C n = C (Dim n (Vector ℂ)) 81newtype C n = C (Dim n (Vector ℂ))
87 deriving (Num,Fractional,Floating,Generic,Binary) 82 deriving (Num,Fractional,Floating,Generic)
88 83
89newtype L m n = L (Dim m (Dim n (Matrix ℝ))) 84newtype L m n = L (Dim m (Dim n (Matrix ℝ)))
90 deriving (Generic, Binary) 85 deriving (Generic, Binary)
91 86
92newtype M m n = M (Dim m (Dim n (Matrix ℂ))) 87newtype M m n = M (Dim m (Dim n (Matrix ℂ)))
93 deriving (Generic, Binary) 88 deriving (Generic)
94 89
95mkR :: Vector ℝ -> R n 90mkR :: Vector ℝ -> R n
96mkR = R . Dim 91mkR = R . Dim