on master help sign in
Rename unifySuper to unifyFlexSuper to make specific usage clearer
077d8e9Evan Czaplicki
src/Type/Unify.hs+7−7
@@ -206,7 +206,7 @@ actuallyUnify context@(Context _ _ firstDesc _ secondDesc) =
206 unifyFlex context secondContent
206 unifyFlex context secondContent
207
207
208 Var Flex (Just super) _ ->
208 Var Flex (Just super) _ ->
209− unifySuper context super secondContent
209+ unifyFlexSuper context super secondContent
210
210
211 Var Rigid maybeSuper maybeName ->
211 Var Rigid maybeSuper maybeName ->
212 unifyRigid context maybeSuper maybeName firstContent secondContent
212 unifyRigid context maybeSuper maybeName firstContent secondContent
@@ -289,11 +289,11 @@ unifyRigid context maybeSuper maybeName content otherContent =
289-- UNIFY SUPER VARIABLES
289-- UNIFY SUPER VARIABLES
290
290
291
291
292−unifySuper :: Context -> Super -> Content -> Unify ()
292+unifyFlexSuper :: Context -> Super -> Content -> Unify ()
293−unifySuper context super otherContent =
293+unifyFlexSuper context super otherContent =
294 case otherContent of
294 case otherContent of
295 Structure term ->
295 Structure term ->
296− unifySuperStructure context super term
296+ unifyFlexSuperStructure context super term
297
297
298 Atom name ->
298 Atom name ->
299 if atomMatchesSuper super name then
299 if atomMatchesSuper super name then
@@ -388,8 +388,8 @@ atomMatchesSuper super name =
388 Var.isPrim "String" name
388 Var.isPrim "String" name
389
389
390
390
391−unifySuperStructure :: Context -> Super -> Term1 Variable -> Unify ()
391+unifyFlexSuperStructure :: Context -> Super -> Term1 Variable -> Unify ()
392−unifySuperStructure context super term =
392+unifyFlexSuperStructure context super term =
393 do appStructure <- liftIO (collectApps (Structure term))
393 do appStructure <- liftIO (collectApps (Structure term))
394 case appStructure of
394 case appStructure of
395 Other ->
395 Other ->
@@ -586,7 +586,7 @@ unifyStructure context term otherContent =
586 merge context (Structure term)
586 merge context (Structure term)
587
587
588 Var Flex (Just super) _ ->
588 Var Flex (Just super) _ ->
589− unifySuper (reorient context) super (Structure term)
589+ unifyFlexSuper (reorient context) super (Structure term)
590
590
591 Var Rigid _ maybeName ->
591 Var Rigid _ maybeName ->
592 mismatch context (Just (Error.flipReason (badRigid maybeName)))
592 mismatch context (Just (Error.flipReason (badRigid maybeName)))