Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TPair (TInt 1) (TVar 0)
- TVar (LVar 0)
- Map.empty
- should be
- TPair (TInt 1) (TVar (LVar 0))
- TVar (LVar 0)
- Map.empty
- this will fails the occur check
- You want to add this to the substitution:
- {TPair (TInt 1) (TVar (LVar 0))}
- -> {LVar 0: TPair (TInt 1) (TVar (LVar 0))}
- before doing extend, walk this term: TPair (TInt 1) (TVar (LVar 0))
- we get the same thing back
- ^^Test for A2 for ===
- Conjegate: (conjunction variable)
- a = Just 8
- >a
- Just 8
- >let (Just b) = a
- > b
- 8
- >a
- Just 8
- >f (Just x) = x
- >f a
- 8
- TPair (TInt 1) (TVar (LVar 0))
- TPair (TInt 1) (TVar (LVar 0))
- Map.empty
- ^This case is already unified so youd return an empty map
Add Comment
Please, Sign In to add comment