This repository was archived by the owner on Jul 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Matching of qualified names #10
Copy link
Copy link
Open
Description
When asked to unfold a function foo defined in module A, currently retrie will ignore qualified occurrences of foo. I would expect that these occurrences would be unfolded too.
Test case:
-u Qualified.foo
===
module Qualified where
foo :: Int -> Int
foo x = x - x
-quux y = Qualified.foo y
+quux y = y - y
Results in:
Test suite test: RUNNING...
retrie
golden
Qualified:
============================================================
Original:
============================================================
module Qualified where
foo :: Int -> Int
foo x = x - x
quux y = Qualified.foo y
============================================================
Expected:
============================================================
module Qualified where
foo :: Int -> Int
foo x = x - x
quux y = y - y
============================================================
Got:
============================================================
module Qualified where
foo :: Int -> Int
foo x = x - x
quux y = Qualified.foo y
============================================================
Diff:
============================================================
6c6
< quux y = y - y
---
> quux y = Qualified.foo y
============================================================
FAIL
Exception: HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "Golden", srcLocFile = "tests/Golden.hs", srcLocStartLine = 119, srcLocStartCol = 7, srcLocEndLine = 119, srcLocEndCol = 43})) (Reason "file contents differ")
parseQualified: OK
Metadata
Metadata
Assignees
Labels
No labels