aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Internal/Mixed.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-03-12 23:20:13 +0100
committerTom Smeding <tom@tomsmeding.com>2025-03-13 09:27:51 +0100
commited6acbe5f409aba2fb222693da567ce04b7c4e01 (patch)
treebecbef3f3afeed63c248f057dae6fef0cb6c6147 /src/Data/Array/Nested/Internal/Mixed.hs
parentbcda5b7eb20874f948fbdc23b6daa3ebb792ffe0 (diff)
Implement quot/rem
Diffstat (limited to 'src/Data/Array/Nested/Internal/Mixed.hs')
-rw-r--r--src/Data/Array/Nested/Internal/Mixed.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Internal/Mixed.hs b/src/Data/Array/Nested/Internal/Mixed.hs
index 08f97f0..7e1f100 100644
--- a/src/Data/Array/Nested/Internal/Mixed.hs
+++ b/src/Data/Array/Nested/Internal/Mixed.hs
@@ -265,6 +265,10 @@ instance (FloatElt a, PrimElt a) => Floating (Mixed sh a) where
log1pexp = mliftNumElt1 floatEltLog1pexp
log1mexp = mliftNumElt1 floatEltLog1mexp
+mquotArray, mremArray :: (IntElt a, PrimElt a) => Mixed sh a -> Mixed sh a -> Mixed sh a
+mquotArray = mliftNumElt2 intEltQuot
+mremArray = mliftNumElt2 intEltRem
+
-- | Allowable element types in a mixed array, and by extension in a 'Ranked' or
-- 'Shaped' array. Note the polymorphic instance for 'Elt' of @'Primitive'