Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
array
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meooow
array
Commits
c7a696e3
Commit
c7a696e3
authored
4 years ago
by
Moritz Angermann
Browse files
Options
Downloads
Patches
Plain Diff
[Cmm Sized] Adjust
parent
10e6c7e0
Branches
ghc-9.2
wip/angerman/sized
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Data/Array/Base.hs
+18
-18
18 additions, 18 deletions
Data/Array/Base.hs
with
18 additions
and
18 deletions
Data/Array/Base.hs
+
18
−
18
View file @
c7a696e3
...
...
@@ -672,7 +672,7 @@ instance IArray UArray Int8 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I8
#
(
indexInt8Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I8
#
(
narrowInt8
#
(
indexInt8Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -688,7 +688,7 @@ instance IArray UArray Int16 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I16
#
(
indexInt16Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I16
#
(
narrowInt16
#
(
indexInt16Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -704,7 +704,7 @@ instance IArray UArray Int32 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I32
#
(
indexInt32Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
I32
#
(
narrowInt32
#
(
indexInt32Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -736,7 +736,7 @@ instance IArray UArray Word8 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W8
#
(
indexWord8Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W8
#
(
narrowWord8
#
(
indexWord8Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -752,7 +752,7 @@ instance IArray UArray Word16 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W16
#
(
indexWord16Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W16
#
(
narrowWord16
#
(
indexWord16Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -768,7 +768,7 @@ instance IArray UArray Word32 where
{-# INLINE unsafeArray #-}
unsafeArray
lu
ies
=
runST
(
unsafeArrayUArray
lu
ies
0
)
{-# INLINE unsafeAt #-}
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W32
#
(
indexWord32Array
#
arr
#
i
#
)
unsafeAt
(
UArray
_
_
_
arr
#
)
(
I
#
i
#
)
=
W32
#
(
narrowWord32
#
(
indexWord32Array
#
arr
#
i
#
)
)
{-# INLINE unsafeReplace #-}
unsafeReplace
arr
ies
=
runST
(
unsafeReplaceUArray
arr
ies
)
{-# INLINE unsafeAccum #-}
...
...
@@ -1212,10 +1212,10 @@ instance MArray (STUArray s) Int8 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readInt8Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
I8
#
e
#
#
)
}
(
#
s2
#
,
I8
#
(
narrowInt8
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
I8
#
e
#
)
=
ST
$
\
s1
#
->
case
writeInt8Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeInt8Array
#
marr
#
i
#
(
extendInt8
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Int16
(
ST
s
)
where
...
...
@@ -1230,10 +1230,10 @@ instance MArray (STUArray s) Int16 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readInt16Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
I16
#
e
#
#
)
}
(
#
s2
#
,
I16
#
(
narrowInt16
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
I16
#
e
#
)
=
ST
$
\
s1
#
->
case
writeInt16Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeInt16Array
#
marr
#
i
#
(
extendInt16
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Int32
(
ST
s
)
where
...
...
@@ -1248,10 +1248,10 @@ instance MArray (STUArray s) Int32 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readInt32Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
I32
#
e
#
#
)
}
(
#
s2
#
,
I32
#
(
narrowInt32
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
I32
#
e
#
)
=
ST
$
\
s1
#
->
case
writeInt32Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeInt32Array
#
marr
#
i
#
(
extendInt32
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Int64
(
ST
s
)
where
...
...
@@ -1284,10 +1284,10 @@ instance MArray (STUArray s) Word8 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readWord8Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
W8
#
e
#
#
)
}
(
#
s2
#
,
W8
#
(
narrowWord8
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
W8
#
e
#
)
=
ST
$
\
s1
#
->
case
writeWord8Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeWord8Array
#
marr
#
i
#
(
extendWord8
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Word16
(
ST
s
)
where
...
...
@@ -1302,10 +1302,10 @@ instance MArray (STUArray s) Word16 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readWord16Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
W16
#
e
#
#
)
}
(
#
s2
#
,
W16
#
(
narrowWord16
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
W16
#
e
#
)
=
ST
$
\
s1
#
->
case
writeWord16Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeWord16Array
#
marr
#
i
#
(
extendWord16
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Word32
(
ST
s
)
where
...
...
@@ -1320,10 +1320,10 @@ instance MArray (STUArray s) Word32 (ST s) where
{-# INLINE unsafeRead #-}
unsafeRead
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
=
ST
$
\
s1
#
->
case
readWord32Array
#
marr
#
i
#
s1
#
of
{
(
#
s2
#
,
e
#
#
)
->
(
#
s2
#
,
W32
#
e
#
#
)
}
(
#
s2
#
,
W32
#
(
narrowWord32
#
e
#
)
#
)
}
{-# INLINE unsafeWrite #-}
unsafeWrite
(
STUArray
_
_
_
marr
#
)
(
I
#
i
#
)
(
W32
#
e
#
)
=
ST
$
\
s1
#
->
case
writeWord32Array
#
marr
#
i
#
e
#
s1
#
of
{
s2
#
->
case
writeWord32Array
#
marr
#
i
#
(
extendWord32
#
e
#
)
s1
#
of
{
s2
#
->
(
#
s2
#
,
()
#
)
}
instance
MArray
(
STUArray
s
)
Word64
(
ST
s
)
where
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment