Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
stm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Glasgow Haskell Compiler
Packages
stm
Commits
fe18b9b0
Commit
fe18b9b0
authored
1 year ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
TArray: Don't rely on undefined CPP behavior
Fixes #75.
parent
92b80b26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Control/Concurrent/STM/TArray.hs
+6
-4
6 additions, 4 deletions
Control/Concurrent/STM/TArray.hs
changelog.md
+4
-0
4 additions, 0 deletions
changelog.md
with
10 additions
and
4 deletions
Control/Concurrent/STM/TArray.hs
+
6
−
4
View file @
fe18b9b0
...
...
@@ -4,9 +4,11 @@
{-# LANGUAGE Trustworthy #-}
#
endif
#
define
HAS_UNLIFTED_ARRAY
defined
(
__GLASGOW_HASKELL__
)
&&
__GLASGOW_HASKELL__
>=
904
#
if
defined
(
__GLASGOW_HASKELL__
)
&&
__GLASGOW_HASKELL__
>=
904
#
define
HAS_UNLIFTED_ARRAY
1
#
endif
#
if
HAS_UNLIFTED_ARRAY
#
if
defined
(
HAS_UNLIFTED_ARRAY
)
{-# LANGUAGE MagicHash, UnboxedTuples #-}
#
endif
...
...
@@ -30,7 +32,7 @@ module Control.Concurrent.STM.TArray (
import
Control.Monad.STM
(
STM
,
atomically
)
import
Data.Typeable
(
Typeable
)
#
if
HAS_UNLIFTED_ARRAY
#
if
defined
(
HAS_UNLIFTED_ARRAY
)
import
Control.Concurrent.STM.TVar
(
readTVar
,
readTVarIO
,
writeTVar
)
import
Data.Array.Base
(
safeRangeSize
,
MArray
(
..
))
import
Data.Ix
(
Ix
)
...
...
@@ -47,7 +49,7 @@ import Data.Array.Base (safeRangeSize, unsafeAt, MArray(..), IArray(numElements)
-- interface for mutable arrays.
--
-- It is conceptually implemented as @Array i (TVar e)@.
#
if
HAS_UNLIFTED_ARRAY
#
if
defined
(
HAS_UNLIFTED_ARRAY
)
data
TArray
i
e
=
TArray
!
i
-- lower bound
!
i
-- upper bound
...
...
This diff is collapsed.
Click to expand it.
changelog.md
+
4
−
0
View file @
fe18b9b0
# Changelog for [`stm` package](http://hackage.haskell.org/package/stm)
## 2.5.2.1 *September 2023*
*
Eliminate reliance on undefined CPP behavior (
[
#75
](
https://github.com/haskell/stm/issues/75
)
)
## 2.5.2.0 *September 2023*
*
Fix strictness of
`stateTVar`
(
[
#30
](
https://github.com/haskell/stm/ssues/30
)
)
...
...
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