diff src/elab_ops.sml @ 1718:dd12d6d9e9a7

Add another rule to simplify record concatenations for pretty-printing
author Adam Chlipala <adam@chlipala.net>
date Sat, 21 Apr 2012 14:06:03 -0400
parents d6c45026240d
children ec47f49c6aa3
line wrap: on
line diff
--- a/src/elab_ops.sml	Sat Apr 21 13:57:10 2012 -0400
+++ b/src/elab_ops.sml	Sat Apr 21 14:06:03 2012 -0400
@@ -1,4 +1,4 @@
-(* Copyright (c) 2008, Adam Chlipala
+(* Copyright (c) 2008, 2012, Adam Chlipala
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -482,6 +482,7 @@
               | ((CRecord (_, []), _), _) => c2
               | ((CConcat (c11, c12), loc), _) => reduceCon env (CConcat (c11, (CConcat (c12, c2), loc)), loc)
               | (_, (CRecord (_, []), _)) => c1
+              | ((CRecord (k, xcs1), loc), (CConcat ((CRecord (_, xcs2), _), c2'), _)) => (CConcat ((CRecord (k, xcs1 @ xcs2), loc), c2'), loc)
               | _ => (CConcat (c1, c2), loc)
         end
       | CMap _ => cAll