summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs
index a5fc29b..7ecb132 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs
@@ -322,12 +322,12 @@ instance forall n t . (Num (Vector t), Numeric t )=> Num (Dim n (Vector t))
322 negate = lift1F negate 322 negate = lift1F negate
323 fromInteger x = Dim (fromInteger x) 323 fromInteger x = Dim (fromInteger x)
324 324
325instance (Num (Vector t), Num (Matrix t), Numeric t) => Fractional (Dim n (Vector t)) 325instance (Num (Vector t), Num (Matrix t), Fractional t, Numeric t) => Fractional (Dim n (Vector t))
326 where 326 where
327 fromRational x = Dim (fromRational x) 327 fromRational x = Dim (fromRational x)
328 (/) = lift2F (/) 328 (/) = lift2F (/)
329 329
330instance (Floating (Vector t), Numeric t) => Floating (Dim n (Vector t)) where 330instance (Fractional t, Floating (Vector t), Numeric t) => Floating (Dim n (Vector t)) where
331 sin = lift1F sin 331 sin = lift1F sin
332 cos = lift1F cos 332 cos = lift1F cos
333 tan = lift1F tan 333 tan = lift1F tan
@@ -357,12 +357,12 @@ instance (Num (Matrix t), Numeric t) => Num (Dim m (Dim n (Matrix t)))
357 negate = (lift1F . lift1F) negate 357 negate = (lift1F . lift1F) negate
358 fromInteger x = Dim (Dim (fromInteger x)) 358 fromInteger x = Dim (Dim (fromInteger x))
359 359
360instance (Num (Vector t), Num (Matrix t), Numeric t) => Fractional (Dim m (Dim n (Matrix t))) 360instance (Num (Vector t), Num (Matrix t), Fractional t, Numeric t) => Fractional (Dim m (Dim n (Matrix t)))
361 where 361 where
362 fromRational x = Dim (Dim (fromRational x)) 362 fromRational x = Dim (Dim (fromRational x))
363 (/) = (lift2F.lift2F) (/) 363 (/) = (lift2F.lift2F) (/)
364 364
365instance (Num (Vector t), Floating (Matrix t), Numeric t) => Floating (Dim m (Dim n (Matrix t))) where 365instance (Num (Vector t), Floating (Matrix t), Fractional t, Numeric t) => Floating (Dim m (Dim n (Matrix t))) where
366 sin = (lift1F . lift1F) sin 366 sin = (lift1F . lift1F) sin
367 cos = (lift1F . lift1F) cos 367 cos = (lift1F . lift1F) cos
368 tan = (lift1F . lift1F) tan 368 tan = (lift1F . lift1F) tan