File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ ## Changes in 3.2.6:
2
+
3
+ * Support for the GHC 9.2.
4
+
5
+ The array access primops now read/write with the fixed-sized numeric
6
+ type corresponding to the width of the data accessed. Additionally,
7
+ the primops to convert to and from fixed-sized numeric types have
8
+ been given new names.
9
+
10
+ 9.2 isn't cut yet, so these changes are somewhat speculative, but
11
+ unfortunately GHC must used a released version of Alex (and Happy) at
12
+ all times until further changes have been made, so we must make the
13
+ release to actually implement these changes in GHC.
14
+
15
+ If the final GHC 9.2 ends up being different, this release will be
16
+ marked broken to make it less likely people use it by accident.
17
+
1
18
## Changes in 3.2.5:
2
19
3
20
* Build fixes for GHC 8.8.x
Original file line number Diff line number Diff line change 1
1
cabal-version : >= 1.8
2
2
name : alex
3
- version : 3.2.5
3
+ version : 3.2.6
4
4
-- don't forget updating changelog.md!
5
5
license : BSD3
6
6
license-file : LICENSE
Original file line number Diff line number Diff line change 12
12
#define ALEX_IF_GHC_GT_500 #if __GLASGOW_HASKELL__ > 500
13
13
#define ALEX_IF_GHC_LT_503 #if __GLASGOW_HASKELL__ < 503
14
14
#define ALEX_IF_GHC_GT_706 #if __GLASGOW_HASKELL__ > 706
15
+ #define ALEX_IF_GHC_GT_901 #if __GLASGOW_HASKELL__ > 901
15
16
#define ALEX_ELIF_GHC_500 #elif __GLASGOW_HASKELL__ == 500
16
17
#define ALEX_IF_BIGENDIAN #ifdef WORDS_BIGENDIAN
17
18
#define ALEX_ELSE #else
@@ -57,9 +58,14 @@ uncheckedShiftL# = shiftL#
57
58
ALEX_ENDIF
58
59
59
60
{-# INLINE alexIndexInt16OffAddr #-}
61
+ alexIndexInt16OffAddr :: AlexAddr -> Int # -> Int #
60
62
alexIndexInt16OffAddr (AlexA # arr) off =
61
63
ALEX_IF_BIGENDIAN
64
+ ALEX_IF_GHC_GT_901
62
65
narrow16Int# i
66
+ ALEX_ELSE
67
+ int16ToInt# i
68
+ ALEX_ENDIF
63
69
where
64
70
i = word2Int# ((high `uncheckedShiftL# ` 8 # ) `or # ` low)
65
71
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1 # )))
@@ -74,9 +80,14 @@ alexIndexInt16OffAddr arr off = arr ! off
74
80
75
81
#ifdef ALEX_GHC
76
82
{-# INLINE alexIndexInt32OffAddr #-}
83
+ alexIndexInt32OffAddr :: AlexAddr -> Int # -> Int #
77
84
alexIndexInt32OffAddr (AlexA # arr) off =
78
85
ALEX_IF_BIGENDIAN
86
+ ALEX_IF_GHC_GT_901
79
87
narrow32Int# i
88
+ ALEX_ELSE
89
+ int32ToInt# i
90
+ ALEX_ENDIF
80
91
where
81
92
i = word2Int# ((b3 `uncheckedShiftL# ` 24 # ) `or # `
82
93
(b2 `uncheckedShiftL# ` 16 # ) `or # `
You can’t perform that action at this time.
0 commit comments