on master help sign in
Move liftIO out of Type.Unify.gatherFields
commit6854570ae56bd50c613f1dc57c8095ecab72eccf authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 11 May 2017, 20:43 (9 years ago) parentc4c5702
1 file changed+4−4
src/Type/Unify.hs+4−4
src/Type/Unify.hs+4−4
@@ -613,8 +613,8 @@ unifyStructure context term content otherContent =
613613 subUnify context (_first context) ext
614614
615615 (Record1 fields extension, Record1 otherFields otherExtension) ->
616− do firstStructure <- gatherFields context fields extension
617− secondStructure <- gatherFields context otherFields otherExtension
616+ do firstStructure <- liftIO $ gatherFields context fields extension
617+ secondStructure <- liftIO $ gatherFields context otherFields otherExtension
618618 unifyRecord context firstStructure secondStructure
619619
620620 _ ->
@@ -714,9 +714,9 @@ data ExtensionStructure
714714 | Extension
715715
716716
717−gatherFields :: Context -> Map.Map Text Variable -> Variable -> Unify RecordStructure
717+gatherFields :: Context -> Map.Map Text Variable -> Variable -> IO RecordStructure
718718gatherFields context fields variable =
719− do desc <- liftIO (UF.descriptor variable)
719+ do desc <- UF.descriptor variable
720720 case _content desc of
721721 Structure (Record1 subFields subExt) ->
722722 gatherFields context (Map.union fields subFields) subExt