Ticket #20 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Changed 5 years ago by kowey

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.