Skip to content

Commit e562d22

Browse files
committed
GHC 9.8.2
1 parent b4aa1e8 commit e562d22

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

flake.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
(final: prev: {
2020
psluaProject = final.haskell-nix.project' {
2121
src = ./.;
22-
compiler-nix-name = "ghc964";
22+
compiler-nix-name = "ghc98";
2323
evalSystem = "x86_64-linux";
2424
modules = let prof = false;
2525
in [{
@@ -34,11 +34,9 @@
3434
shell = {
3535
tools = {
3636
cabal = {};
37-
cabal-fmt = {};
3837
fourmolu = {};
3938
hlint = {};
4039
haskell-language-server = {};
41-
nixfmt = {};
4240
};
4341
buildInputs = with pkgs; [
4442
cachix

lib/Language/PureScript/CoreFn/Laziness.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import Language.PureScript.Names
3030
, pattern ByNullSourcePos
3131
)
3232
import Language.PureScript.PSString (mkString)
33-
import Relude.Unsafe qualified as Unsafe
3433
import Prelude hiding (force)
34+
import qualified Data.List.NonEmpty as NE
3535

3636
-- This module is responsible for ensuring that the bindings in recursive
3737
-- binding groups are initialized in a valid order, introducing run-time
@@ -408,25 +408,27 @@ searchReachable
408408
Int
409409
((Int, force) m (IM.MonoidalIntMap (Max force)))
410410
A.Array Int (m (IM.MonoidalIntMap (Max force)))
411-
searchReachable maxIdx lookupEdges = mrtFlatten . Unsafe.head <$> mem
411+
searchReachable maxIdx lookupEdges = mrtFlatten . head <$> mem
412412
where
413413
-- This is a finite array of infinite lists, used to memoize all the search
414414
-- trees. `unsafeHead` is used above to pull the first tree out of each list
415415
-- in the array--the one corresponding to zero force, which is what's needed
416416
-- to initialize the corresponding identifier. (`unsafeHead` is safe here, of
417417
-- course: infinite lists.)
418-
mem A.Array Int [MaxRoseTree m force]
418+
mem A.Array Int (NonEmpty (MaxRoseTree m force))
419419
mem =
420420
A.listArray
421421
(0, maxIdx)
422-
[ [ cutLoops <*> fmap (IM.mapWithKey memoizedNode) . lookupEdges $ (i, f)
422+
[ NE.fromList
423+
[ cutLoops <*> fmap (IM.mapWithKey memoizedNode) . lookupEdges $ (i, f)
423424
| f [toEnum 0 ..]
424425
]
425426
| i [0 .. maxIdx]
426427
]
427428

428429
memoizedNode Int Max force MaxRoseNode m force
429-
memoizedNode i (Max force) = MaxRoseNode force $ mem A.! i !! fromEnum force
430+
memoizedNode i (Max force) =
431+
MaxRoseNode force $ toList (mem A.! i) !! fromEnum force
430432

431433
-- And this is the function that prevents the search from actually being
432434
-- infinite. It applies a filter to a `MaxRoseTree` at every level, looking for

pslua.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ common shared
7777
, aeson ^>=2.2
7878
, array ^>=0.5.4.0
7979
, attoparsec ^>=0.14.4
80-
, base ^>=4.18.2
80+
, base ^>=4.19.1
8181
, containers ^>=0.6.5.1
8282
, data-fix ^>=0.3.2
8383
, deriving-compat ^>=0.6.2
@@ -101,8 +101,8 @@ common shared
101101
, scientific ^>=0.3.7.0
102102
, string-interpolate ^>=0.3.2.1
103103
, tagged ^>=0.8.6.1
104-
, template-haskell ^>=2.20
105-
, text ^>=2.0.2
104+
, template-haskell ^>=2.21
105+
, text ^>=2.1.1
106106
, transformers ^>=0.6.1.1
107107
, vector ^>=0.13
108108

@@ -117,7 +117,7 @@ executable pslua
117117
build-depends:
118118
, optparse-applicative ^>=0.18.1
119119
, pslua
120-
, with-utf8 ^>=1.0.2.3
120+
, with-utf8 ^>=1.1
121121

122122
library
123123
import: shared
@@ -183,12 +183,12 @@ test-suite spec
183183
build-depends:
184184
, call-stack ^>=0.4.0
185185
, exceptions ^>=0.10.7
186-
, hedgehog ^>=1.2
186+
, hedgehog ^>=1.4
187187
, hedgehog-corpus ^>=0.2
188-
, hspec ^>=2.10.10
189-
, hspec-core ^>=2.10.10
188+
, hspec ^>=2.11.7
189+
, hspec-core ^>=2.11.7
190190
, hspec-expectations-pretty-diff ^>=0.7.2.6
191-
, hspec-hedgehog ^>=0.0.1.2
191+
, hspec-hedgehog ^>=0.1.1
192192
, HUnit ^>=1.6.2.0
193193
, pslua
194194
, typed-process ^>=0.2.10.1

0 commit comments

Comments
 (0)