Skip to content

Commit cd6852e

Browse files
authored
Merge pull request #845 from smucclaw/mengwong/test-fails
Fix test failures: list equality and library import priority
2 parents 483ff7f + b88dea1 commit cd6852e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

jl4-core/src/L4/EvaluateLazy/Machine.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,8 @@ runBinOpEquals ValNil ValNil = Backward $ valBool Tru
20032003
runBinOpEquals (ValCons r1 rs1) (ValCons r2 rs2) = do
20042004
PushFrame (EqConstructor1 r2 [(rs1, rs2)])
20052005
EvalRef r1
2006+
runBinOpEquals ValNil (ValCons _ _) = Backward $ ValBool False
2007+
runBinOpEquals (ValCons _ _) ValNil = Backward $ ValBool False
20062008
runBinOpEquals (ValConstructor n1 rs1) (ValConstructor n2 rs2)
20072009
| sameResolved n1 n2 && length rs1 == length rs2 =
20082010
let

jl4-lsp/src/LSP/L4/Rules.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,15 @@ jl4Rules evalConfig rootDirectory recorder = do
447447
Just p -> [p </> modName <.> "l4"]
448448
Nothing -> []
449449

450-
-- 2. XDG data directory (~/.local/share/jl4/libraries/)
450+
-- 2. Cabal's getDataDir (source tree during development, install prefix when installed)
451+
dataDir <- Paths_jl4_core.getDataDir
452+
let cabalPath = dataDir </> "libraries" </> modName <.> "l4"
453+
454+
-- 3. XDG data directory (~/.local/share/jl4/libraries/)
451455
xdgDataDir <- getXdgDirectory XdgData "jl4"
452456
let xdgPath = xdgDataDir </> "libraries" </> modName <.> "l4"
453457

454-
-- 3. VSCode extension bundled libraries
458+
-- 4. VSCode extension bundled libraries
455459
-- The VSCode extension structure is:
456460
-- extension/
457461
-- ├── bin/<platform>/jl4-lsp[.exe] <- executable is here
@@ -462,11 +466,7 @@ jl4Rules evalConfig rootDirectory recorder = do
462466
let extensionRoot = exeDir </> ".." </> ".."
463467
let bundledPath = extensionRoot </> "libraries" </> modName <.> "l4"
464468

465-
-- 4. Cabal's getDataDir (for development / cabal run)
466-
dataDir <- Paths_jl4_core.getDataDir
467-
let cabalPath = dataDir </> "libraries" </> modName <.> "l4"
468-
469-
pure $ envPaths <> [xdgPath, bundledPath, cabalPath]
469+
pure $ envPaths <> [cabalPath, xdgPath, bundledPath]
470470

471471
pure $ [Just rootPath, relPath] <> map Just builtinPaths
472472

0 commit comments

Comments
 (0)