summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/Devel.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-07-01 08:29:16 +0200
committerAlberto Ruiz <aruiz@um.es>2015-07-01 08:29:16 +0200
commitf1ee7a4ff3870a72f73d99ac923f9230f3deecf5 (patch)
tree07ade269d5b98ae8284d2064bb3a8ea928e3e405 /packages/base/src/Internal/Devel.hs
parent89ace10b752b18cb4b9498d38344e4b0a716f575 (diff)
Revert "remove applyRaw"
This reverts commit 89ace10b752b18cb4b9498d38344e4b0a716f575.
Diffstat (limited to 'packages/base/src/Internal/Devel.hs')
-rw-r--r--packages/base/src/Internal/Devel.hs13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/base/src/Internal/Devel.hs b/packages/base/src/Internal/Devel.hs
index 89b5103..710d626 100644
--- a/packages/base/src/Internal/Devel.hs
+++ b/packages/base/src/Internal/Devel.hs
@@ -64,25 +64,34 @@ mbCatch act = E.catch (Just `fmap` act) f
64 64
65-------------------------------------------------------------------------------- 65--------------------------------------------------------------------------------
66 66
67type CM b r = CInt -> CInt -> Ptr b -> r
67type CV b r = CInt -> Ptr b -> r 68type CV b r = CInt -> Ptr b -> r
68type OM b r = CInt -> CInt -> CInt -> CInt -> Ptr b -> r 69type OM b r = CInt -> CInt -> CInt -> CInt -> Ptr b -> r
69 70
70type CIdxs r = CV CInt r 71type CIdxs r = CV CInt r
71type Ok = IO CInt 72type Ok = IO CInt
72 73
73infixr 5 :>, ::> 74infixr 5 :>, ::>, ..>
74type (:>) t r = CV t r 75type (:>) t r = CV t r
75type (::>) t r = OM t r 76type (::>) t r = OM t r
77type (..>) t r = CM t r
76 78
77class TransArray c 79class TransArray c
78 where 80 where
79 type Trans c b 81 type Trans c b
82 type TransRaw c b
83 type Elem c
80 apply :: (Trans c b) -> c -> b 84 apply :: (Trans c b) -> c -> b
81 infixl 1 `apply` 85 applyRaw :: (TransRaw c b) -> c -> b
86 infixl 1 `apply`, `applyRaw`
82 87
83instance Storable t => TransArray (Vector t) 88instance Storable t => TransArray (Vector t)
84 where 89 where
85 type Trans (Vector t) b = CInt -> Ptr t -> b 90 type Trans (Vector t) b = CInt -> Ptr t -> b
91 type TransRaw (Vector t) b = CInt -> Ptr t -> b
92 type Elem (Vector t) = t
86 apply = avec 93 apply = avec
87 {-# INLINE apply #-} 94 {-# INLINE apply #-}
95 applyRaw = avec
96 {-# INLINE applyRaw #-}
88 97