Ticket #20 (closed defect: fixed)
unification bug
| Reported by: | kowey | Owned by: | somebody |
|---|---|---|---|
| Priority: | blocker | Milestone: | |
| Component: | core | Version: | |
| Keywords: | Cc: |
Description
The code
main =
do print $ head $ unify left right
print $ head $ unify right left
where
left = map (GVar . show) [1..3]
right = drop 1 left ++ [GConst ["X"]]
The output
([?1,?1,X],fromList [("1",X),("2",X),("3",X)])
([?2,?3,X],fromList [("1",X),("2",X),("3",X)])
I think it should be
The output
([X,X,X],fromList [("1",X),("2",X),("3",X)])
([X,X,X],fromList [("1",X),("2",X),("3",X)])
The fix is probably simple: just replace after unify
Change History
Note: See
TracTickets for help on using
tickets.