Commit eee9cb91 authored by John van Groningen's avatar John van Groningen
Browse files

convert record updates of multiple records into one update node

parent 3d41fb40
......@@ -1858,19 +1858,18 @@ where
addKinds _ []
= []
convertExpr (RecordUpdate _ expr updates)
= foldl (convertUpdate) (convertExpr expr) updates
= beUpdateNode (beArgs (convertExpr expr) (convertUpdates updates))
convertUpdate expr {bind_src=NoBind _}
= expr
convertUpdate expr {bind_src, bind_dst=bind_dst=:{glob_module, glob_object={fs_index}}}
= beUpdateNode
convertUpdates []
= beNoArgs
convertUpdates [{bind_src=NoBind _}:updates]
= convertUpdates updates
convertUpdates [{bind_src, bind_dst=bind_dst=:{glob_module, glob_object={fs_index}}}:updates]
= (beArgs
(beSelectorNode BESelector (beFieldSymbol fs_index glob_module)
(beArgs (convertExpr bind_src)
(convertUpdates updates))
convertExpr (Update expr1 [singleSelection] expr2)
= case singleSelection of
RecordSelection _ _
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment