Skip to content

Commit

Permalink
Use alex-3.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Dec 19, 2020
1 parent 6a9e626 commit 1d67d9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Cabal/src/Distribution/Fields/Lexer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ uncheckedShiftL# = shiftL#
#endif

{-# INLINE alexIndexInt16OffAddr #-}
alexIndexInt16OffAddr :: AlexAddr -> Int# -> Int#
alexIndexInt16OffAddr (AlexA# arr) off =
#ifdef WORDS_BIGENDIAN
narrow16Int# i
Expand All @@ -381,10 +382,14 @@ alexIndexInt16OffAddr (AlexA# arr) off =
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
#else
indexInt16OffAddr# arr off
#if __GLASGOW_HASKELL__ >= 901
int16ToInt#
#endif
(indexInt16OffAddr# arr off)
#endif

{-# INLINE alexIndexInt32OffAddr #-}
alexIndexInt32OffAddr :: AlexAddr -> Int# -> Int#
alexIndexInt32OffAddr (AlexA# arr) off =
#ifdef WORDS_BIGENDIAN
narrow32Int# i
Expand All @@ -398,7 +403,10 @@ alexIndexInt32OffAddr (AlexA# arr) off =
b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 4#
#else
indexInt32OffAddr# arr off
#if __GLASGOW_HASKELL__ >= 901
int32ToInt#
#endif
(indexInt32OffAddr# arr off)
#endif

#if __GLASGOW_HASKELL__ < 503
Expand Down
2 changes: 1 addition & 1 deletion templates/ci-quick-jobs.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- name: Install alex
run: cabal v2-install alex
run: cabal v2-install alex --constraint='alex ==3.2.6'
- uses: actions/checkout@v2
- name: Regenerate files
run: |
Expand Down

0 comments on commit 1d67d9e

Please sign in to comment.