From oleg at pobox.com Sat Jun 2 06:33:01 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sat Jun 2 06:28:40 2007 Subject: [Hs-Generics] patch applied (generics): generic equality is implementable in SmashA. Added Geq test. Message-ID: <20070602103301.GA5024@cvs.haskell.org> Sat Jun 2 02:24:26 PDT 2007 oleg@okmij.org * generic equality is implementable in SmashA. Added Geq test. M ./comparison/SmashA/CompanyDats.hs +80 A ./comparison/SmashA/GEq.hs M ./comparison/SmashA/Syb4A.hs -19 +70 From oleg at pobox.com Sat Jun 2 06:33:02 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sat Jun 2 06:28:40 2007 Subject: [Hs-Generics] patch applied (generics): Added GMap. Generic map is indeed only one line, for any traversable data type. Message-ID: <20070602103302.GA5050@cvs.haskell.org> Sat Jun 2 02:57:45 PDT 2007 oleg@okmij.org * Added GMap. Generic map is indeed only one line, for any traversable data type. A ./comparison/SmashA/BTreeDats.hs A ./comparison/SmashA/GMap.hs From oleg at pobox.com Sat Jun 2 06:33:04 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sat Jun 2 06:28:40 2007 Subject: [Hs-Generics] patch applied (generics): Added reduce test. Message-ID: <20070602103304.GA5064@cvs.haskell.org> Sat Jun 2 03:30:17 PDT 2007 oleg@okmij.org * Added reduce test. A ./comparison/SmashA/Reduce.hs M ./comparison/SmashA/TreeDats.hs +13 From oleg at pobox.com Tue Jun 5 03:07:48 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 5 03:03:19 2007 Subject: [Hs-Generics] patch applied (generics): More comments and examples. Message-ID: <20070605070748.GA6722@cvs.haskell.org> Mon Jun 4 18:08:35 PDT 2007 oleg@okmij.org * More comments and examples. M ./comparison/SmashA/Syb4A.hs -37 +53 From oleg at pobox.com Tue Jun 5 03:07:52 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 5 03:03:20 2007 Subject: [Hs-Generics] patch applied (generics): GAPP makes instance derivation automatic. The LDat instance becomes a simple function of the datatype definition. Message-ID: <20070605070752.GA6742@cvs.haskell.org> Mon Jun 4 19:57:16 PDT 2007 oleg@okmij.org * GAPP makes instance derivation automatic. The LDat instance becomes a simple function of the datatype definition. M ./comparison/SmashA/BTreeDats.hs -4 +4 M ./comparison/SmashA/CompanyDats.hs -161 +51 M ./comparison/SmashA/FoldTree.hs +2 M ./comparison/SmashA/GEq.hs -6 +3 M ./comparison/SmashA/GMap.hs +2 M ./comparison/SmashA/GShow.hs +2 M ./comparison/SmashA/Paradise.hs +2 M ./comparison/SmashA/Reduce.hs +2 A ./comparison/SmashA/RoseDats.hs M ./comparison/SmashA/Syb4A.hs -32 +37 M ./comparison/SmashA/TreeDats.hs -8 +8 From oleg at pobox.com Tue Jun 5 03:07:54 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 5 03:03:22 2007 Subject: [Hs-Generics] patch applied (generics): Generic minimum/maximum. Message-ID: <20070605070754.GA6756@cvs.haskell.org> Tue Jun 5 00:05:03 PDT 2007 oleg@okmij.org * Generic minimum/maximum. M ./comparison/SmashA/Syb4A.hs -4 +4 A ./comparison/SmashA/Syb4ABuild.hs From alexey at cs.uu.nl Thu Jun 7 12:41:20 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 7 12:36:41 2007 Subject: [Hs-Generics] patch applied (generics): New test: can a generic function be extended in another module? Message-ID: <20070607164120.GA11834@cvs.haskell.org> Thu Jun 7 09:05:01 PDT 2007 Alexey Rodriguez * New test: can a generic function be extended in another module? The new test requires to extend generic equality in another module, take a look at TestGEqTree.lhs and GL/GEqTree.lhs for details. M ./comparison/GL/GEq.lhs -1 +1 A ./comparison/GL/GEqTree.lhs M ./comparison/GL/TreeReps.hs +2 A ./comparison/TestGEqTree.exp A ./comparison/TestGEqTree.lhs M ./comparison/TreeDatatype.hs +10 M ./comparison/test.hs -1 +2 From alexey at cs.uu.nl Thu Jun 7 12:41:22 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 7 12:36:43 2007 Subject: [Hs-Generics] patch applied (generics): Updated to the latest version of GL, code due to Bruno Message-ID: <20070607164122.GA11854@cvs.haskell.org> Thu Jun 7 09:38:41 PDT 2007 Alexey Rodriguez * Updated to the latest version of GL, code due to Bruno M ./comparison/GL/CompanyReps.hs -1 +1 A ./comparison/GL/CompanyReps3.hs M ./comparison/GL/FoldTree.lhs -3 +5 A ./comparison/GL/GEq3.lhs M ./comparison/GL/GEqTree.lhs -3 +3 M ./comparison/GL/GL.hs -12 +16 A ./comparison/GL/GL3.hs A ./comparison/GL/GMap3.lhs M ./comparison/GL/GShow.lhs -2 +2 A ./comparison/GL/GZipWith3.lhs A ./comparison/GL/Paradise3.lhs M ./comparison/GL/TreeReps.hs -2 +2 From alexey at cs.uu.nl Fri Jun 8 11:23:34 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Fri Jun 8 11:18:51 2007 Subject: [Hs-Generics] patch applied (generics): Corrected reduce function for RepLib Message-ID: <20070608152334.GA6068@cvs.haskell.org> Tue Jun 5 15:49:44 PDT 2007 agerdes@mac.com * Corrected reduce function for RepLib M ./comparison/RepLib/Reduce.lhs -31 +41 M ./comparison/RepLib/TreeDatatype.hs -2 +5 From alexey at cs.uu.nl Tue Jun 12 11:24:48 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Tue Jun 12 11:19:53 2007 Subject: [Hs-Generics] patch applied (generics): Initial Generic Programming, Now! checkin and removed unnecessary files. Message-ID: <20070612152448.GA19028@cvs.haskell.org> Thu Jun 7 15:14:26 PDT 2007 agerdes@mac.com * Initial Generic Programming, Now! checkin and removed unnecessary files. R ./comparison/GL/BinTreeDatatype.hs R ./comparison/GL/CompanyDatatypes.hs R ./comparison/GL/TreeDatatype.hs R ./comparison/GM/BinTreeDatatype.hs R ./comparison/GM/CompanyDatatypes.hs R ./comparison/GM/TreeDatatype.hs A ./comparison/NOW/ A ./comparison/NOW/FoldTree.lhs A ./comparison/NOW/GEq.lhs A ./comparison/NOW/GShow.lhs A ./comparison/NOW/NOW.hs A ./comparison/NOW/Paradise.lhs R ./comparison/RepLib/BinTreeDatatype.hs R ./comparison/RepLib/TreeDatatype.hs From alexey at cs.uu.nl Tue Jun 12 11:24:49 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Tue Jun 12 11:19:53 2007 Subject: [Hs-Generics] patch applied (generics): Added test with a nested datatype Message-ID: <20070612152449.GA19049@cvs.haskell.org> Tue Jun 12 06:44:00 PDT 2007 agerdes@mac.com * Added test with a nested datatype A ./comparison/GL/Nested.lhs A ./comparison/GL/PerfectReps.hs A ./comparison/PerfectDatatype.hs A ./comparison/TestNested.lhs M ./comparison/test.hs -2 +2 From alexey at cs.uu.nl Wed Jun 13 08:58:54 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 08:53:55 2007 Subject: [Hs-Generics] patch applied (generics): Added conparison/PolyP Message-ID: <20070613125854.GA20628@cvs.haskell.org> Wed Jun 13 04:07:48 PDT 2007 patrikj@chalmers.se * Added conparison/PolyP A ./comparison/PolyP/ A ./comparison/PolyP/log.txt M ./comparison/test.hs -1 +1 From alexey at cs.uu.nl Wed Jun 13 08:58:55 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 08:53:55 2007 Subject: [Hs-Generics] patch applied (generics): Added comparison/PolyP/PolyLib Message-ID: <20070613125855.GA20648@cvs.haskell.org> Wed Jun 13 04:09:04 PDT 2007 patrikj@chalmers.se * Added comparison/PolyP/PolyLib A ./comparison/PolyP/GEq.lhs A ./comparison/PolyP/PolyLib/ A ./comparison/PolyP/PolyLib/Base.hs A ./comparison/PolyP/PolyLib/BaseM.hs A ./comparison/PolyP/PolyLib/Compare.hs A ./comparison/PolyP/PolyLib/ConstructorName.hs A ./comparison/PolyP/PolyLib/Crush.hs A ./comparison/PolyP/PolyLib/CrushFuns.hs A ./comparison/PolyP/PolyLib/EP.hs A ./comparison/PolyP/PolyLib/Equal.hs A ./comparison/PolyP/PolyLib/EqualVariants.hs A ./comparison/PolyP/PolyLib/Flatten.hs A ./comparison/PolyP/PolyLib/Fold.hs A ./comparison/PolyP/PolyLib/FunctorOf.hs A ./comparison/PolyP/PolyLib/Prelude.hs A ./comparison/PolyP/PolyLib/Propagate.hs A ./comparison/PolyP/PolyLib/Show.hs A ./comparison/PolyP/PolyLib/Substructures.hs A ./comparison/PolyP/PolyLib/Sum.hs A ./comparison/PolyP/PolyLib/Thread.hs A ./comparison/PolyP/PolyLib/ThreadFuns.hs A ./comparison/PolyP/PolyLib/Transpose.hs A ./comparison/PolyP/PolyLib/Zip.hs A ./comparison/PolyP/PolyLib/ZipVariants.hs From alexey at cs.uu.nl Wed Jun 13 08:58:56 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 08:53:58 2007 Subject: [Hs-Generics] patch applied (generics): GL GRose equality Message-ID: <20070613125856.GA20662@cvs.haskell.org> Wed Jun 13 04:50:53 PDT 2007 agerdes@mac.com * GL GRose equality M ./comparison/GL/GEq.lhs -1 +3 From alexey at cs.uu.nl Wed Jun 13 11:35:04 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 11:30:04 2007 Subject: [Hs-Generics] patch applied (generics): Trimming whitespace (no semantic change) Message-ID: <20070613153504.GA26636@cvs.haskell.org> Wed Jun 13 08:13:26 PDT 2007 patrikj@chalmers.se * Trimming whitespace (no semantic change) M ./comparison/GL/GEqTree.lhs -1 +1 M ./comparison/TreeDatatype.hs -6 +2 M ./comparison/test.hs -1 +1 From alexey at cs.uu.nl Wed Jun 13 11:35:05 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 11:30:05 2007 Subject: [Hs-Generics] patch applied (generics): Added PolyP/GEqTree.hs (failing because PolyP cannot extend a polytypic function in this way) Message-ID: <20070613153505.GA26656@cvs.haskell.org> Wed Jun 13 08:13:57 PDT 2007 patrikj@chalmers.se * Added PolyP/GEqTree.hs (failing because PolyP cannot extend a polytypic function in this way) A ./comparison/PolyP/GEqTree.lhs From alexey at cs.uu.nl Wed Jun 13 14:35:42 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 14:30:42 2007 Subject: [Hs-Generics] patch applied (generics): Cleaned up whitespace + added flags to PolyP example Message-ID: <20070613183542.GA31027@cvs.haskell.org> Wed Jun 13 10:38:10 PDT 2007 patrikj@chalmers.se * Cleaned up whitespace + added flags to PolyP example M ./comparison/GL/BinTreeReps.hs +1 M ./comparison/GL/FoldTree.lhs -4 +4 M ./comparison/GL/GShow.lhs -4 +2 M ./comparison/GL/Nested.lhs -1 +1 M ./comparison/GL/Paradise.lhs -14 M ./comparison/GL/Reduce.lhs -4 +3 M ./comparison/GL/TreeReps2.hs -2 +2 M ./comparison/GM/FoldTree.lhs -1 +1 M ./comparison/GM/GShow.lhs -2 +2 M ./comparison/GM/Paradise.lhs -15 +1 M ./comparison/GM/Reduce.lhs -1 +1 M ./comparison/LIGD/FoldTree.lhs -2 M ./comparison/LIGD/GMap.lhs -2 M ./comparison/LIGD/Paradise.lhs -1 M ./comparison/NOW/FoldTree.lhs -2 M ./comparison/NOW/GShow.lhs -1 M ./comparison/NOW/Paradise.lhs +1 M ./comparison/PerfectDatatype.hs -5 +4 M ./comparison/PolyP/PolyLib/Base.hs +1 M ./comparison/RepLib/FoldTree.lhs -7 +5 M ./comparison/RepLib/GShow.lhs -4 +2 M ./comparison/RepLib/Reduce.lhs -10 +10 M ./comparison/SYB1_2/FoldTree.lhs -1 M ./comparison/SYB1_2/GShow.lhs -1 M ./comparison/SYB1_2/Reduce.lhs -1 M ./comparison/Spine/FoldTree.lhs -2 M ./comparison/Spine/GShow.lhs -2 +2 M ./comparison/Spine/Paradise.lhs -3 +2 M ./comparison/TestFoldTree.lhs -2 +1 M ./comparison/TestGMap.lhs -1 +1 M ./comparison/TestGShow.lhs -1 +1 M ./comparison/TestNested.lhs -2 +3 M ./comparison/TestParadise.lhs -1 M ./comparison/TestReduce.lhs -2 +1 From alexey at cs.uu.nl Wed Jun 13 14:35:43 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 13 14:30:43 2007 Subject: [Hs-Generics] patch applied (generics): Added the rest of the PolyP test cases (most failing) Message-ID: <20070613183543.GA31048@cvs.haskell.org> Wed Jun 13 10:41:13 PDT 2007 patrikj@chalmers.se * Added the rest of the PolyP test cases (most failing) A ./comparison/PolyP/BinTreeRep.lhs A ./comparison/PolyP/FoldTree.lhs A ./comparison/PolyP/GMap.lhs A ./comparison/PolyP/GShow.lhs A ./comparison/PolyP/Nested.lhs A ./comparison/PolyP/Paradise.lhs A ./comparison/PolyP/Reduce.lhs From oleg at pobox.com Fri Jun 15 19:38:21 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Fri Jun 15 19:33:14 2007 Subject: [Hs-Generics] patch applied (generics): LIGD: trimmed spaces + aligned + fixed comments + small rename Message-ID: <20070615233821.GA28332@cvs.haskell.org> Fri Jun 15 09:42:32 PDT 2007 patrikj@chalmers.se * LIGD: trimmed spaces + aligned + fixed comments + small rename M ./comparison/CompanyDatatypes.hs -3 +3 M ./comparison/GM/GM.lhs -3 +3 M ./comparison/LIGD/BinTreeReps.hs -5 +4 M ./comparison/LIGD/CompanyReps.hs -13 +13 M ./comparison/LIGD/FoldTree.lhs -6 +6 M ./comparison/LIGD/GEq.lhs -28 +17 M ./comparison/LIGD/GMap.lhs -3 +2 M ./comparison/LIGD/GRoseReps.hs -1 +2 M ./comparison/LIGD/GShow.lhs -19 +15 M ./comparison/LIGD/Reduce.lhs -2 M ./comparison/LIGD/TreeReps.hs -7 +7 M ./comparison/TestGEqGRose.lhs -3 From oleg at pobox.com Fri Jun 15 19:38:39 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Fri Jun 15 19:33:31 2007 Subject: [Hs-Generics] patch applied (generics): LIGD/Nested (working) and LIGD/GEqTree (failing) added Message-ID: <20070615233839.GA28374@cvs.haskell.org> Fri Jun 15 10:40:12 PDT 2007 patrikj@chalmers.se * LIGD/Nested (working) and LIGD/GEqTree (failing) added M ./comparison/LIGD/GEq.lhs -1 +1 A ./comparison/LIGD/GEqTree.lhs A ./comparison/LIGD/Nested.lhs A ./comparison/LIGD/PerfectReps.hs A ./comparison/TestNested.exp From johanj at cs.uu.nl Sun Jun 17 15:46:30 2007 From: johanj at cs.uu.nl (Johan Jeuring) Date: Sun Jun 17 15:35:45 2007 Subject: [Hs-Generics] Paper about comparing libraries Message-ID: <53CF56E6-FEC2-4712-B62C-E00966D0A2C2@cs.uu.nl> Dear generics-subscribers, I announced our attempt to write a paper for the Haskell workshop on this list more than a month ago. I'm afraid we failed. Not because we have been lazy, but because it turned out to be more work to perform all the tests and evaluations. And while we were writing the paper a new library for generic programming appeared! On the other hand, we got quite far, and we have the feeling we can write quite a nice paper about the subject. To mention something recent: Patrik Jansson performed some time-measurements for the different libraries. The very limited tests (form which you cannot draw any conclusions without more evidence, I think) show that the fastest approach is around 8 times faster than the slowest approach! So we will try to keep up the momentum, and submit a paper to POPL. It has to take a bit broader perspective, but we think that that should be possible. If you're interested in participating let me know, then I can give you access to the paper repository. The test code can be obtained from the darcs repository. Al the best , Johan From ndmitchell at gmail.com Sun Jun 17 16:47:06 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sun Jun 17 16:41:52 2007 Subject: [Hs-Generics] Paper about comparing libraries In-Reply-To: <53CF56E6-FEC2-4712-B62C-E00966D0A2C2@cs.uu.nl> References: <53CF56E6-FEC2-4712-B62C-E00966D0A2C2@cs.uu.nl> Message-ID: <404396ef0706171347v36a76fb8xb2d6a2ebdc95b391@mail.gmail.com> Hi Johan, > I announced our attempt to write a paper for the Haskell workshop on > this list more than a month ago. I'm afraid we failed. Not because we > have been lazy, but because it turned out to be more work to perform > all the tests and evaluations. And while we were writing the paper a > new library for generic programming appeared! I recently released Uniplate: http://www-users.cs.york.ac.uk/~ndm/uniplate/ I'd love to add Uniplate to the benchmark suite, but couldn't quite figure out where to start adding the library. I also can only see one function in the benchmark which does any vanilla traversal stuff, namely increase from Paradise. If that's all that Uniplate can be tested on, you may prefer not to have it included. My draft paper (linked to from the website) gives 9 benchmarks for generic traversals, you are welcome to incorporate them. Thanks Neil From oleg at pobox.com Sun Jun 17 18:42:29 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:15 2007 Subject: [Hs-Generics] patch applied (generics): Completed LIGD/GEqTree with an implementation that works (by representing weighted trees by stripping the weight). Message-ID: <20070617224229.GA7490@cvs.haskell.org> Fri Jun 15 12:09:16 PDT 2007 patrikj@chalmers.se * Completed LIGD/GEqTree with an implementation that works (by representing weighted trees by stripping the weight). M ./comparison/LIGD/GEqTree.lhs -1 +31 M ./comparison/PolyP/GEqTree.lhs -7 M ./comparison/TestGEq.lhs -9 M ./comparison/TestGEqTree.lhs -2 From oleg at pobox.com Sun Jun 17 18:42:31 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:16 2007 Subject: [Hs-Generics] patch applied (generics): Renamed Tree to WTree (same as paper) Message-ID: <20070617224231.GA7510@cvs.haskell.org> Sat Jun 16 02:35:42 PDT 2007 patrikj@chalmers.se * Renamed Tree to WTree (same as paper) M ./comparison/GL/FoldTree.lhs -1 +1 M ./comparison/GL/GEqTree.lhs -5 +5 M ./comparison/GL/GZipWith3.lhs -4 +4 M ./comparison/GL/Reduce.lhs -3 +3 M ./comparison/GL/TreeReps.hs -1 +1 M ./comparison/GM/Reduce.lhs -3 +3 M ./comparison/GM/TreeReps.hs -2 +2 M ./comparison/LIGD/FoldTree.lhs -1 +1 M ./comparison/LIGD/GEqTree.lhs -5 +5 M ./comparison/LIGD/Reduce.lhs -3 +3 M ./comparison/LIGD/TreeReps.hs -4 +4 M ./comparison/NOW/NOW.hs -4 +4 M ./comparison/PolyP/FoldTree.lhs -2 +2 M ./comparison/PolyP/GEqTree.lhs -6 +6 M ./comparison/PolyP/GShow.lhs -1 M ./comparison/PolyP/Reduce.lhs -4 +4 M ./comparison/RepLib/FoldTree.lhs -2 +2 M ./comparison/RepLib/Reduce.lhs -3 +3 M ./comparison/SYB1_2/FoldTree.lhs -1 +1 M ./comparison/SYB1_2/Reduce.lhs -7 +7 M ./comparison/Smash/FoldTree.hs -1 +1 M ./comparison/Smash/TreeDats.hs -2 +2 M ./comparison/SmashA/FoldTree.hs -1 +1 M ./comparison/SmashA/Reduce.hs -2 +2 M ./comparison/SmashA/TreeDats.hs -5 +5 M ./comparison/Spine/FoldTree.lhs -1 +1 M ./comparison/Spine/Reduce.lhs -3 +3 M ./comparison/Spine/SYB1.hs -2 +2 M ./comparison/TestGEqTree.lhs -1 +1 M ./comparison/TestReduce.lhs -1 +1 M ./comparison/TreeDatatype.hs -9 +7 From oleg at pobox.com Sun Jun 17 18:42:32 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:18 2007 Subject: [Hs-Generics] patch applied (generics): renamed GM to GMsec3 + cleaning Message-ID: <20070617224232.GA7524@cvs.haskell.org> Sat Jun 16 06:19:09 PDT 2007 patrikj@chalmers.se * renamed GM to GMsec3 + cleaning ./comparison/GM/GM.lhs -> ./comparison/GM/GMsec3.lhs M ./comparison/GM/BinTreeReps.hs -2 +2 M ./comparison/GM/CompanyReps.hs -3 +3 M ./comparison/GM/FoldTree.lhs -2 +1 M ./comparison/GM/GEq.lhs -2 +2 M ./comparison/GM/GMap.lhs -2 +2 M ./comparison/GM/GMsec2.lhs -2 +3 M ./comparison/GM/GMsec3.lhs -2 +4 M ./comparison/GM/GShow.lhs -1 M ./comparison/GM/Prettier.lhs -3 +3 M ./comparison/GM/Reduce.lhs -1 +1 M ./comparison/GM/TreeReps.hs -1 +2 M ./comparison/Makefile +3 From oleg at pobox.com Sun Jun 17 18:42:44 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:32 2007 Subject: [Hs-Generics] patch applied (generics): Just cleaning. Message-ID: <20070617224244.GA7557@cvs.haskell.org> Sat Jun 16 06:20:54 PDT 2007 patrikj@chalmers.se * Just cleaning. M ./comparison/TestGShow.lhs -4 +2 From oleg at pobox.com Sun Jun 17 18:42:54 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:46 2007 Subject: [Hs-Generics] patch applied (generics): renamed GL to EMGM + unified the lib order in test.hs and the table in the paper Message-ID: <20070617224254.GA7589@cvs.haskell.org> Sat Jun 16 06:33:24 PDT 2007 patrikj@chalmers.se * renamed GL to EMGM + unified the lib order in test.hs and the table in the paper ./comparison/GL -> ./comparison/EMGM M ./comparison/test.hs -1 +1 From oleg at pobox.com Sun Jun 17 18:43:05 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:37:50 2007 Subject: [Hs-Generics] patch applied (generics): Cleaning up NOW (resolved ghc warnings + whitespace). Message-ID: <20070617224305.GA7621@cvs.haskell.org> Sat Jun 16 06:55:28 PDT 2007 patrikj@chalmers.se * Cleaning up NOW (resolved ghc warnings + whitespace). M ./comparison/NOW/NOW.hs -138 +148 From oleg at pobox.com Sun Jun 17 18:43:14 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:00 2007 Subject: [Hs-Generics] patch applied (generics): Replaced OPTIONS with OPTIONS_GHC (all are GHC-specific) Message-ID: <20070617224314.GA7653@cvs.haskell.org> Sun Jun 17 02:25:50 PDT 2007 patrikj@chalmers.se * Replaced OPTIONS with OPTIONS_GHC (all are GHC-specific) M ./comparison/BinTreeDatatype.hs -1 +1 M ./comparison/CompanyDatatypes.hs -1 +1 M ./comparison/EMGM/BinTreeReps.hs +1 M ./comparison/EMGM/CompanyReps.hs -1 +1 M ./comparison/EMGM/CompanyReps3.hs -1 +1 M ./comparison/EMGM/FoldTree.lhs -1 +1 M ./comparison/EMGM/GEq3.lhs -1 +1 M ./comparison/EMGM/GEqTree.lhs -1 +1 M ./comparison/EMGM/GL.hs -1 +1 M ./comparison/EMGM/GL2.hs -1 +1 M ./comparison/EMGM/GL3.hs -1 +1 M ./comparison/EMGM/GMap3.lhs -1 +1 M ./comparison/EMGM/GShow.lhs -1 +1 M ./comparison/EMGM/GZipWith3.lhs -1 +1 M ./comparison/EMGM/Paradise3.lhs -1 +1 M ./comparison/EMGM/PerfectReps.hs -1 +1 M ./comparison/EMGM/TreeReps.hs -1 +1 M ./comparison/GM/GShow.lhs -1 +1 M ./comparison/GRoseDatatype.hs -1 +1 M ./comparison/GRoseInstances.hs -1 +1 M ./comparison/LIGD/CompanyReps.hs -1 +1 M ./comparison/LIGD/GRoseReps.hs +1 M ./comparison/LIGD/LIGD.lhs -1 +1 M ./comparison/LIGD/Reduce.lhs -1 +1 M ./comparison/NOW/FoldTree.lhs -1 +1 M ./comparison/NOW/GEq.lhs -1 +1 M ./comparison/NOW/GShow.lhs -1 +1 M ./comparison/NOW/NOW.hs -1 +1 M ./comparison/NOW/Paradise.lhs -1 +1 M ./comparison/PerfectDatatype.hs -1 +1 M ./comparison/PolyP/GEq.lhs -1 +1 M ./comparison/PolyP/GEqTree.lhs -1 +1 M ./comparison/PolyP/GShow.lhs -1 +1 M ./comparison/PolyP/PolyLib/Base.hs -1 +1 M ./comparison/PolyP/PolyLib/Equal.hs -1 +1 M ./comparison/PolyP/PolyLib/FunctorOf.hs -1 +1 M ./comparison/PolyP/PolyLib/Prelude.hs -1 +1 M ./comparison/RepLib/CompanyReps.hs -1 +1 M ./comparison/RepLib/FoldTree.lhs -1 +1 M ./comparison/RepLib/GEq.lhs -1 +1 M ./comparison/RepLib/GMap.lhs -1 +1 M ./comparison/RepLib/GShow.lhs -1 +1 M ./comparison/RepLib/Paradise.lhs -1 +1 M ./comparison/RepLib/R2.hs -1 +1 M ./comparison/RepLib/Reduce.lhs -1 +1 M ./comparison/RepLib/RepLib.hs -1 +1 M ./comparison/RepLib/RepLib/Derive.hs -1 +1 M ./comparison/RepLib/RepLib/Lib.hs -1 +1 M ./comparison/RepLib/RepLib/PreludeLib.hs -1 +1 M ./comparison/RepLib/RepLib/PreludeReps.hs -1 +1 M ./comparison/RepLib/RepLib/R.hs -1 +1 M ./comparison/RepLib/RepLib/R1.hs -1 +1 M ./comparison/RepLib/RepLib/RepAux.hs -1 +1 M ./comparison/RepLib/RepLib/RepLib.hs -1 +1 M ./comparison/RepLib/RepLib/SYB/Aliases.hs -1 +1 M ./comparison/RepLib/RepLib/SYB/Schemes.hs -1 +1 M ./comparison/SYB1_2/GEq.lhs -1 +1 M ./comparison/SYB1_2/GShow.lhs -1 +1 M ./comparison/SYB1_2/Paradise.lhs -1 +1 M ./comparison/Smash/CompanyDats.hs -2 +2 M ./comparison/Smash/CompanyTDats.hs -2 +2 M ./comparison/Smash/FoldTree.hs -1 +1 M ./comparison/Smash/GShow.hs -1 +1 M ./comparison/Smash/Paradise.hs -1 +1 M ./comparison/Smash/Syb4.hs -3 +3 M ./comparison/Smash/TreeDats.hs -2 +2 M ./comparison/SmashA/BTreeDats.hs -2 +2 M ./comparison/SmashA/CompanyDats.hs -2 +2 M ./comparison/SmashA/FoldTree.hs -2 +2 M ./comparison/SmashA/GEq.hs -2 +2 M ./comparison/SmashA/GMap.hs -2 +2 M ./comparison/SmashA/GShow.hs -2 +2 M ./comparison/SmashA/Paradise.hs -2 +2 M ./comparison/SmashA/Reduce.hs -2 +2 M ./comparison/SmashA/RoseDats.hs -2 +2 M ./comparison/SmashA/Syb4A.hs -3 +3 M ./comparison/SmashA/Syb4ABuild.hs -3 +3 M ./comparison/SmashA/TreeDats.hs -2 +2 M ./comparison/Spine/FoldTree.lhs -1 +1 M ./comparison/Spine/GEq.lhs -1 +1 M ./comparison/Spine/GShow.lhs -1 +1 M ./comparison/Spine/Paradise.lhs -1 +1 M ./comparison/Spine/SYB1.hs -1 +1 M ./comparison/TreeDatatype.hs -1 +1 From oleg at pobox.com Sun Jun 17 18:43:22 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:07 2007 Subject: [Hs-Generics] patch applied (generics): Cleaning up trailing whitespace Message-ID: <20070617224322.GA7683@cvs.haskell.org> Sun Jun 17 02:29:45 PDT 2007 patrikj@chalmers.se * Cleaning up trailing whitespace M ./comparison/EMGM/CompanyReps.hs -3 +3 M ./comparison/EMGM/CompanyReps3.hs -7 +7 M ./comparison/EMGM/GEq.lhs -1 +1 M ./comparison/EMGM/GL.hs -9 +9 M ./comparison/EMGM/GL2.hs -1 +1 M ./comparison/EMGM/Paradise3.lhs -1 +1 M ./comparison/EMGM/PerfectReps.hs +1 M ./comparison/EMGM/TreeReps.hs -1 +2 M ./comparison/EMGM/TreeReps2.hs +1 M ./comparison/LIGD/GEq.lhs +1 M ./comparison/RepLib/GEq.lhs -1 +1 M ./comparison/RepLib/GMap.lhs -6 +6 M ./comparison/SmashA/RoseDats.hs -4 +4 M ./comparison/Spine/SYB1.hs -45 +45 From oleg at pobox.com Sun Jun 17 18:43:29 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:17 2007 Subject: [Hs-Generics] patch applied (generics): EMGM: corrected and completed ...Reps files Message-ID: <20070617224329.GA7715@cvs.haskell.org> Sun Jun 17 02:32:23 PDT 2007 patrikj@chalmers.se * EMGM: corrected and completed ...Reps files M ./comparison/EMGM/BinTreeReps.hs -2 +5 M ./comparison/EMGM/GEqTree.lhs -3 +3 M ./comparison/EMGM/GMap.lhs -1 +1 M ./comparison/EMGM/Reduce.lhs -1 +1 M ./comparison/EMGM/TreeReps.hs -1 +2 From oleg at pobox.com Sun Jun 17 18:43:37 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:23 2007 Subject: [Hs-Generics] patch applied (generics): Added simple test of efficiency (to LIGD, Spine, EMGM so far) Message-ID: <20070617224337.GA7749@cvs.haskell.org> Sun Jun 17 02:35:40 PDT 2007 patrikj@chalmers.se * Added simple test of efficiency (to LIGD, Spine, EMGM so far) A ./comparison/EMGM/Efficiency.lhs A ./comparison/LIGD/Efficiency.lhs A ./comparison/Spine/Efficiency.lhs M ./comparison/Spine/GEq.lhs -1 +1 M ./comparison/Spine/SYB1.hs +7 M ./comparison/test.hs -1 +1 From oleg at pobox.com Sun Jun 17 18:44:06 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:51 2007 Subject: [Hs-Generics] patch applied (generics): Minor alignment fixes in Spine/GEq Message-ID: <20070617224406.GA7791@cvs.haskell.org> Sun Jun 17 02:38:27 PDT 2007 patrikj@chalmers.se * Minor alignment fixes in Spine/GEq M ./comparison/Spine/GEq.lhs -3 +2 From oleg at pobox.com Sun Jun 17 18:44:07 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Sun Jun 17 18:38:53 2007 Subject: [Hs-Generics] patch applied (generics): Added log.txt with an overview of test impl. status Message-ID: <20070617224407.GA7806@cvs.haskell.org> Sun Jun 17 03:17:43 PDT 2007 patrikj@chalmers.se * Added log.txt with an overview of test impl. status A ./comparison/log.txt From ndmitchell at gmail.com Sun Jun 17 20:17:58 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sun Jun 17 20:12:44 2007 Subject: [Hs-Generics] Paper about comparing libraries In-Reply-To: <404396ef0706171347v36a76fb8xb2d6a2ebdc95b391@mail.gmail.com> References: <53CF56E6-FEC2-4712-B62C-E00966D0A2C2@cs.uu.nl> <404396ef0706171347v36a76fb8xb2d6a2ebdc95b391@mail.gmail.com> Message-ID: <404396ef0706171717g6e66e4x226ddd5e1263f02c@mail.gmail.com> Hi > I'd love to add Uniplate to the benchmark suite I've written three patches for the generics benchmark, the first adds deriving Data/Typeable to the Perfect data type. The second implements the following benchmarks for Uniplate: * Paradise * FoldTree * Nested * Reduce The third fixes up the Reduce benchmark for Uniplate to meet the spec. All the four modules implemented pass their test, and I think meet the required spec. I doubt that Uniplate can do any of the other benchmarks, apart from possibly the efficiency test - but I couldn't figure out what that benchmark is meant to do. Please apply, thanks Neil -------------- next part -------------- A non-text attachment was scrubbed... Name: uniplate.patch.gz Type: application/x-gzip Size: 4106 bytes Desc: not available Url : http://www.haskell.org/pipermail/generics/attachments/20070618/a869c37b/uniplate.patch.bin From oleg at pobox.com Mon Jun 18 19:01:46 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:30 2007 Subject: [Hs-Generics] patch applied (generics): added SYB1_2/Efficiency (slowest so far) Message-ID: <20070618230146.GA12002@cvs.haskell.org> Sun Jun 17 03:53:25 PDT 2007 patrikj@chalmers.se * added SYB1_2/Efficiency (slowest so far) ./comparison/GRoseInstances.hs -> ./comparison/SYB1_2/GRoseInstances.hs A ./comparison/SYB1_2/Efficiency.lhs M ./comparison/SYB1_2/GEq.lhs -1 +1 M ./comparison/SYB1_2/GRoseInstances.hs -1 +2 M ./comparison/log.txt -5 +9 From oleg at pobox.com Mon Jun 18 19:01:48 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:31 2007 Subject: [Hs-Generics] patch applied (generics): RepLib whitespace cleanup Message-ID: <20070618230148.GA12023@cvs.haskell.org> Sun Jun 17 04:33:02 PDT 2007 patrikj@chalmers.se * RepLib whitespace cleanup M ./comparison/RepLib/CompanyReps.hs -6 +6 M ./comparison/RepLib/FoldTree.lhs -1 +1 M ./comparison/RepLib/GEq.lhs -3 +2 M ./comparison/RepLib/GShow.lhs -1 +1 M ./comparison/RepLib/R2.hs -3 +4 M ./comparison/RepLib/RepLib.hs -4 +4 M ./comparison/RepLib/RepLib/Derive.hs -56 +56 M ./comparison/RepLib/RepLib/Lib.hs -48 +48 M ./comparison/RepLib/RepLib/PreludeLib.hs -39 +39 M ./comparison/RepLib/RepLib/PreludeReps.hs -9 +9 M ./comparison/RepLib/RepLib/R.hs -35 +35 M ./comparison/RepLib/RepLib/R1.hs -13 +13 M ./comparison/RepLib/RepLib/RepAux.hs -40 +40 M ./comparison/RepLib/RepLib/RepLib.hs -4 +4 M ./comparison/RepLib/RepLib/SYB/Aliases.hs -9 +9 M ./comparison/RepLib/RepLib/SYB/Schemes.hs -7 +7 M ./comparison/log.txt +2 From oleg at pobox.com Mon Jun 18 19:01:49 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:32 2007 Subject: [Hs-Generics] patch applied (generics): Added RepLib/Efficiency (fastest so far) Message-ID: <20070618230149.GA12038@cvs.haskell.org> Sun Jun 17 04:36:20 PDT 2007 patrikj@chalmers.se * Added RepLib/Efficiency (fastest so far) A ./comparison/RepLib/Efficiency.lhs From oleg at pobox.com Mon Jun 18 19:01:51 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:33 2007 Subject: [Hs-Generics] patch applied (generics): Added time target to main Makefile Message-ID: <20070618230151.GA12052@cvs.haskell.org> Sun Jun 17 05:43:43 PDT 2007 patrikj@chalmers.se * Added time target to main Makefile M ./comparison/Makefile +13 M ./comparison/log.txt -2 +2 From oleg at pobox.com Mon Jun 18 19:01:52 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:35 2007 Subject: [Hs-Generics] patch applied (generics): NOW reduce function + Paradis fix Message-ID: <20070618230152.GA12067@cvs.haskell.org> Sat Jun 16 12:00:05 PDT 2007 agerdes@mac.com * NOW reduce function + Paradis fix M! ./comparison/NOW/NOW.hs -2 +13 M! ./comparison/NOW/Paradise.lhs -4 +3 From oleg at pobox.com Mon Jun 18 19:01:53 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:35 2007 Subject: [Hs-Generics] patch applied (generics): Trivial changes to resolve conflict when applying Alex patch in NOW/ Message-ID: <20070618230153.GA12082@cvs.haskell.org> Sun Jun 17 05:49:00 PDT 2007 patrikj@chalmers.se * Trivial changes to resolve conflict when applying Alex patch in NOW/ M ./comparison/NOW/NOW.hs -2 +2 M ./comparison/NOW/Paradise.lhs -2 +1 From oleg at pobox.com Mon Jun 18 19:01:54 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:38 2007 Subject: [Hs-Generics] patch applied (generics): Two more fixes related to the previous NOW patch Message-ID: <20070618230154.GA12097@cvs.haskell.org> Sun Jun 17 06:03:37 PDT 2007 patrikj@chalmers.se * Two more fixes related to the previous NOW patch M ./comparison/NOW/NOW.hs -14 +1 From oleg at pobox.com Mon Jun 18 19:01:56 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:56:39 2007 Subject: [Hs-Generics] patch applied (generics): Added PolyP/Efficiency (second best) Message-ID: <20070618230156.GA12112@cvs.haskell.org> Sun Jun 17 06:23:41 PDT 2007 patrikj@chalmers.se * Added PolyP/Efficiency (second best) M ./comparison/Makefile -1 +1 M ./comparison/PolyP/BinTreeRep.lhs -1 +2 A ./comparison/PolyP/Efficiency.lhs M ./comparison/PolyP/GEq.lhs -1 M ./comparison/log.txt -6 +5 From oleg at pobox.com Mon Jun 18 19:04:53 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:59:35 2007 Subject: [Hs-Generics] patch applied (generics): Resolved conflict in NOW Message-ID: <20070618230453.GA12295@cvs.haskell.org> Mon Jun 18 00:37:10 PDT 2007 agerdes@mac.com * Resolved conflict in NOW M! ./comparison/NOW/NOW.hs +13 M! ./comparison/NOW/Paradise.lhs -1 +2 From oleg at pobox.com Mon Jun 18 19:04:54 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 18:59:37 2007 Subject: [Hs-Generics] patch applied (generics): Another conflict resolve patch Message-ID: <20070618230454.GA12316@cvs.haskell.org> Mon Jun 18 02:16:07 PDT 2007 agerdes@mac.com * Another conflict resolve patch M ./comparison/NOW/NOW.hs -12 +1 M ./comparison/NOW/Paradise.lhs -1 +1 From oleg at pobox.com Mon Jun 18 19:05:40 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 19:00:23 2007 Subject: [Hs-Generics] patch applied (generics): Add Uniplate examples to the suite Message-ID: <20070618230540.GA12375@cvs.haskell.org> Sun Jun 17 17:05:57 PDT 2007 Neil Mitchell * Add Uniplate examples to the suite A ./comparison/Uniplate/ A ./comparison/Uniplate/FoldTree.lhs A ./comparison/Uniplate/Nested.lhs A ./comparison/Uniplate/Paradise.lhs A ./comparison/Uniplate/Readme.txt A ./comparison/Uniplate/Reduce.lhs From oleg at pobox.com Mon Jun 18 19:05:42 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Mon Jun 18 19:00:25 2007 Subject: [Hs-Generics] patch applied (generics): Added Uniplate lib and fixed reduce extensions import Message-ID: <20070618230542.GA12391@cvs.haskell.org> Mon Jun 18 02:59:57 PDT 2007 agerdes@mac.com * Added Uniplate lib and fixed reduce extensions import A ./comparison/Uniplate/Data/ A ./comparison/Uniplate/Data/Generics/ A ./comparison/Uniplate/Data/Generics/Biplate.hs A ./comparison/Uniplate/Data/Generics/PlateData.hs A ./comparison/Uniplate/Data/Generics/PlateDirect.hs A ./comparison/Uniplate/Data/Generics/PlateInternal.hs A ./comparison/Uniplate/Data/Generics/PlateTypeable.hs A ./comparison/Uniplate/Data/Generics/Uniplate.hs A ./comparison/Uniplate/Data/Generics/UniplateOn.hs M ./comparison/Uniplate/Reduce.lhs -1 +1 From ndmitchell at gmail.com Mon Jun 18 20:42:51 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Mon Jun 18 20:37:33 2007 Subject: [Hs-Generics] Uniplate updated patch Message-ID: <404396ef0706181742g510edebdy7248e29a827b7a6d@mail.gmail.com> Hi Here are 3 more Uniplate patches, 2 are resends from yesterday that don't seem to have been applied. The final one changes Uniplate's Reduce module to no longer require -fglasgow-exts. Thanks Neil -------------- next part -------------- A non-text attachment was scrubbed... Name: uniplate_reduce2.patch.gz Type: application/x-gzip Size: 4030 bytes Desc: not available Url : http://www.haskell.org/pipermail/generics/attachments/20070619/48f7ce4f/uniplate_reduce2.patch.bin From oleg at pobox.com Tue Jun 19 03:15:58 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 19 03:10:59 2007 Subject: [Hs-Generics] patch applied (generics): Derive Data/Typeable for Perfect Message-ID: <20070619071558.GA24798@cvs.haskell.org> Sun Jun 17 17:03:59 PDT 2007 Neil Mitchell * Derive Data/Typeable for Perfect M ./comparison/PerfectDatatype.hs -3 +5 From oleg at pobox.com Tue Jun 19 03:16:18 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 19 03:11:08 2007 Subject: [Hs-Generics] patch applied (generics): Fix up the Uniplate Reduce benchmark to meet the specificatino Message-ID: <20070619071618.GA24821@cvs.haskell.org> Sun Jun 17 17:12:48 PDT 2007 Neil Mitchell * Fix up the Uniplate Reduce benchmark to meet the specificatino M ./comparison/Uniplate/Reduce.lhs -17 +7 From oleg at pobox.com Tue Jun 19 03:16:28 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 19 03:11:19 2007 Subject: [Hs-Generics] patch applied (generics): Remove -fglasgow-exts for Uniplate's Reduce, instead of an explicit type signature use asTypeOf Message-ID: <20070619071628.GA24836@cvs.haskell.org> Mon Jun 18 17:37:22 PDT 2007 Neil Mitchell * Remove -fglasgow-exts for Uniplate's Reduce, instead of an explicit type signature use asTypeOf M ./comparison/Uniplate/Reduce.lhs -6 +4 From oleg at pobox.com Tue Jun 19 07:00:18 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Tue Jun 19 06:54:59 2007 Subject: [Hs-Generics] patch applied (generics): Nested data types for Smash. Less easy, but possible -- and even a bit insightful. Message-ID: <20070619110018.GA1482@cvs.haskell.org> Tue Jun 19 03:53:35 PDT 2007 oleg@okmij.org * Nested data types for Smash. Less easy, but possible -- and even a bit insightful. Nested data types with Smash is a bit less obvious: polymorphic recursion in the presence of constraints doesn't quite work. Smash is more general than is required for this task. The solution is nevertheless possible and short. It also illustrates how to pass generic functions as arguments without any need for higher-rank types. So, Smash's generic functions are first-class, and have always been. It just goes to show to higher-rank is already present in Haskell98. A ./comparison/SmashA/Nested.hs A ./comparison/SmashA/PerfectDats.hs M ./comparison/SmashA/RoseDats.hs -1 +1 From alexey at cs.uu.nl Wed Jun 20 11:35:42 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 20 11:30:19 2007 Subject: [Hs-Generics] patch applied (generics): Missing NOW files added, added NOW to time Makefile Message-ID: <20070620153542.GA24602@cvs.haskell.org> Wed Jun 20 06:42:24 PDT 2007 agerdes@mac.com * Missing NOW files added, added NOW to time Makefile M ./comparison/Makefile -1 +1 A ./comparison/NOW/GEqTree.lhs A ./comparison/NOW/GMap.lhs A ./comparison/NOW/Nested.lhs A ./comparison/NOW/Reduce.lhs From alexey at cs.uu.nl Wed Jun 20 11:37:22 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Wed Jun 20 11:32:00 2007 Subject: [Hs-Generics] patch applied (generics): Added NOW Efficiency file Message-ID: <20070620153722.GA24708@cvs.haskell.org> Wed Jun 20 02:03:49 PDT 2007 agerdes@mac.com * Added NOW Efficiency file A ./comparison/NOW/Efficiency.lhs From alexey at cs.uu.nl Thu Jun 21 06:19:32 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 06:14:07 2007 Subject: [Hs-Generics] patch applied (generics): Finished NOW, all functions pass the test and including the efficiency test Message-ID: <20070621101932.GA23786@cvs.haskell.org> Tue Jun 19 17:43:54 PDT 2007 agerdes@mac.com * Finished NOW, all functions pass the test and including the efficiency test M ./comparison/NOW/FoldTree.lhs -1 +1 M ./comparison/NOW/GShow.lhs -4 +17 M ./comparison/NOW/NOW.hs -8 +28 M ./comparison/NOW/Paradise.lhs -2 +2 From alexey at cs.uu.nl Thu Jun 21 06:31:54 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 06:26:28 2007 Subject: [Hs-Generics] patch applied (generics): Renamed equalTree to equalWTree Message-ID: <20070621103154.GA24482@cvs.haskell.org> Sun Jun 17 02:37:34 PDT 2007 patrikj@chalmers.se * Renamed equalTree to equalWTree M ./comparison/LIGD/GEqTree.lhs -5 +5 M ./comparison/PolyP/GEqTree.lhs -3 +3 M ./comparison/TestGEqTree.lhs -3 +3 M ./comparison/test.hs -2 From alexey at cs.uu.nl Thu Jun 21 11:36:45 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:19 2007 Subject: [Hs-Generics] patch applied (generics): Split TestFoldTree to test traversing of a term independently from ad-hoc defs. . Also removed TestEfficiency from test Message-ID: <20070621153645.GA2888@cvs.haskell.org> Thu Jun 21 07:12:56 PDT 2007 Alexey Rodriguez * Split TestFoldTree to test traversing of a term independently from ad-hoc defs. . Also removed TestEfficiency from test M ./comparison/TestFoldTree.exp -1 +1 M ./comparison/TestFoldTree.lhs -2 +10 A ./comparison/TestFoldTreeSalary.exp A ./comparison/TestFoldTreeSalary.lhs M ./comparison/test.hs -2 +3 From alexey at cs.uu.nl Thu Jun 21 11:36:46 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:21 2007 Subject: [Hs-Generics] patch applied (generics): Made test driver more user friendly Message-ID: <20070621153646.GA2908@cvs.haskell.org> Thu Jun 21 07:14:50 PDT 2007 Alexey Rodriguez * Made test driver more user friendly M ./comparison/test.hs -13 +34 From alexey at cs.uu.nl Thu Jun 21 11:36:48 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:21 2007 Subject: [Hs-Generics] patch applied (generics): added GRose type rep for EMGM Message-ID: <20070621153648.GA2924@cvs.haskell.org> Thu Jun 21 04:15:17 PDT 2007 agerdes@mac.com * added GRose type rep for EMGM A ./comparison/EMGM/GRoseReps.hs From alexey at cs.uu.nl Thu Jun 21 11:36:49 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:25 2007 Subject: [Hs-Generics] patch applied (generics): Added nested grose trees Message-ID: <20070621153649.GA2938@cvs.haskell.org> Thu Jun 21 08:27:32 PDT 2007 Alexey Rodriguez * Added nested grose trees M ./comparison/LIGD/GEq.lhs -1 +7 A ./comparison/LIGD/NGRoseReps.hs A ./comparison/NGRoseDatatype.hs M ./comparison/TestFoldTreeSalary.lhs +5 A ./comparison/TestGEqNGRose.exp A ./comparison/TestGEqNGRose.lhs M ./comparison/test.hs -1 +2 From alexey at cs.uu.nl Thu Jun 21 11:36:50 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:26 2007 Subject: [Hs-Generics] patch applied (generics): Cannot give instances for NGRose Message-ID: <20070621153650.GA2952@cvs.haskell.org> Thu Jun 21 08:33:40 PDT 2007 Alexey Rodriguez * Cannot give instances for NGRose M ./comparison/SYB1_2/GEq.lhs -1 +7 From alexey at cs.uu.nl Thu Jun 21 11:36:51 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 11:31:27 2007 Subject: [Hs-Generics] patch applied (generics): README Message-ID: <20070621153651.GA2966@cvs.haskell.org> Thu Jun 21 08:36:16 PDT 2007 Alexey Rodriguez * README M ./comparison/README -4 +10 From alexey at cs.uu.nl Thu Jun 21 12:20:02 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Thu Jun 21 12:14:36 2007 Subject: [Hs-Generics] patch applied (generics): Uniplate was missing from the list of approaches to test Message-ID: <20070621162002.GA4543@cvs.haskell.org> Thu Jun 21 09:13:59 PDT 2007 Alexey Rodriguez * Uniplate was missing from the list of approaches to test M ./comparison/test.hs -1 +1 From alexey at cs.uu.nl Mon Jun 25 13:08:41 2007 From: alexey at cs.uu.nl (Alexey Rodriguez Yakushev) Date: Mon Jun 25 13:03:03 2007 Subject: [Hs-Generics] patch applied (generics): Added time measurement top-level file (forgot it earlier). Message-ID: <20070625170841.GA10069@cvs.haskell.org> Sat Jun 23 07:09:18 PDT 2007 patrikj@cs.chalmers.se * Added time measurement top-level file (forgot it earlier). A ./comparison/TestEfficiency.lhs From hughperkins at gmail.com Tue Jun 26 15:39:49 2007 From: hughperkins at gmail.com (Hugh Perkins) Date: Tue Jun 26 15:34:06 2007 Subject: [Hs-Generics] xml deserialization using generics? Message-ID: <837db430706261239p1b4f456an385f31ccde7e4628@mail.gmail.com> Cant decide whether this list is appropriate for questions related to generics usage, or only to generics design? So let me know if I should use haskell@haskell.org instead, but on the other hand I figure you guys are the experts :-) Trying to write an xmlserialization function for arbitrary (Data) objects, and not requiring a DTD or a code generation step. It's possible in C# so it really ought to be possible in Haskell ;-) xml serialization is pretty easy, see section 9.1.1 of http://www.haskell.org/haskellwiki/HXT On the other hand deserialization is still a work in progress. At least I'm not smart enough to figure it out, and nothing comes up in Google. The xml parsing bit is done, see section 9.1.2 of http://www.haskell.org/haskellwiki/HXT So, we can get a list of pairs/triples etc containing the data of our choice, such as field names, field values (in string format), data types, constructors, etc. What's remaining is to take makeConstrM, our final data type, and the list of field values, and to create the final object. Here's my non-working attempt at this bit so far. Most of the working bits come from a demonstration by kpreid in irc yesterday night of using makeConstrM with a pair of strings. The rest of the code is my feeble attempt to get this working for the Config custom data type. runM' :: (MonadState [String] m, Monad m, Data a) => m a runM' = do value <- gets head modify tail -- then one of: (pick the non-working function of your choice ;-) : -- return read (fromJust value) -- return (fromJust $ cast value ) -- return (fst $ head $ gread( "(" ++ value ++ ")" ) ) -- return (fromConstrM runM' constr) -- return (fromConstr contr) testConstrM' :: (Read a, Data a, Read c, Read b, Data b, Data c) => [String] -> a -> (b,c) testConstrM' fieldvalues object = evalState( fromConstrM runM' (toConstr object) ) fieldvalues data Config = Config{ name :: String, age :: Int } deriving( Data, Show, Typeable, Ord, Eq, Read ) createConfig = Config "blah" 3 test = testConstrM' ["qsdfqsdf", "7"] createConfig Note that whilst I'm a total Haskell newbie (this is week 2), I've used Reflection extensively in other languages, eg wrote a fast async rpc layer over guaranteed udp for C# http://metaverse.svn.sourceforge.net/viewvc/metaverse/Trunk/Source/Metaverse.Networking/, so I know more or less what I'm aiming for, just not exactly how to do it ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/generics/attachments/20070626/5e24bb8a/attachment.htm From oleg at pobox.com Wed Jun 27 04:25:36 2007 From: oleg at pobox.com (Oleg Kiselyov) Date: Wed Jun 27 04:19:53 2007 Subject: [Hs-Generics] patch applied (generics): Added Monadic reconstruction; example of a simple deserialization. Message-ID: <20070627082536.GA31472@cvs.haskell.org> Wed Jun 27 01:22:45 PDT 2007 oleg@okmij.org * Added Monadic reconstruction; example of a simple deserialization. M ./comparison/SmashA/CompanyDats.hs -1 +68 A ./comparison/SmashA/Deserialize.hs M ./comparison/SmashA/Syb4A.hs +39 From oleg at pobox.com Wed Jun 27 04:39:12 2007 From: oleg at pobox.com (oleg@pobox.com) Date: Wed Jun 27 04:36:09 2007 Subject: [Hs-Generics] xml deserialization using generics? In-Reply-To: <837db430706261239p1b4f456an385f31ccde7e4628@mail.gmail.com> Message-ID: <20070627083912.51533AD43@Adric.metnet.fnmoc.navy.mil> Hugh Perkins wrote: > Cant decide whether this list is appropriate for questions related to > generics usage, or only to generics design? I think your question is quite appropriate -- actually, it is a good question. It asks essentially for a monadic gmap, which seems quite important. This operation is also the `inverse' of one of our comparison tests: listify. The latter collects values from the leaves of a data type in a list. That list is a `state' of a value, so to speak. The state can be transported over the network, and, on the other end, can be infused into a prototype object (assuming it has the same structure). The monadic gmap subsumes two traversals: generic map and reduction. So, your question looks even better. I wonder if we should add monadic gmap to our test suite? I have just committed the monadic gmap implementation and the test for one generic library, the one I'm more familiar with. The test is in the file http://darcs.haskell.org/generics/comparison/SmashA/Deserialize.hs We start with the data type of a company C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)), PU (E (P "Marlow" "Cambridge") (S 2000.0))], D "Strategy" (E (P "Blair" "London") (S 100000.0)) []] (see http://darcs.haskell.org/generics/comparison/CompanyDatatypes.hs) We can serialize it: test1 = serialize genCom obtaining a list ["Research","Laemmel","Amsterdam","8000.0","Joost","Amsterdam", "1000.0","Marlow","Cambridge","2000.0","Strategy","Blair", "London","100000.0"] OTH, we can take the list retro = ["Metaphysics", "Kant","Koeningsberg","800.0", "Hume","Edinburgh","100.0", "Marlowe","Cambridge","200.0", "Ruling","Thatcher","London","50000.0"] and use it to `upgrade' the company genCom: test2 = deserialize genCom retro giving us *Deserialize> test2 C [D "Metaphysics" (E (P "Kant" "Koeningsberg") (S 800.0)) [PU (E (P "Hume" "Edinburgh") (S 100.0)), PU (E (P "Marlowe" "Cambridge") (S 200.0))], D "Ruling" (E (P "Thatcher" "London") (S 50000.0)) []] From jeremy.gibbons at comlab.ox.ac.uk Wed Jun 27 05:16:50 2007 From: jeremy.gibbons at comlab.ox.ac.uk (Jeremy Gibbons) Date: Wed Jun 27 05:11:14 2007 Subject: [Hs-Generics] xml deserialization using generics? In-Reply-To: <20070627083912.51533AD43@Adric.metnet.fnmoc.navy.mil> References: <20070627083912.51533AD43@Adric.metnet.fnmoc.navy.mil> Message-ID: <500DCD95-10EB-43D6-90B9-A50A492CA58C@comlab.ox.ac.uk> Better still is McBride and Paterson's idiomatic traverse, which subsumes monadic gmap and a bit more (since some idioms - phantom idioms - aren't monads). The serialise/deserialise example is given there too. See Bruno's and my paper "The Essence of the Iterator Pattern". http://web.comlab.ox.ac.uk/jeremy.gibbons/publications/#iterator Jeremy On 27 Jun 2007, at 09:39, oleg@pobox.com wrote: > > Hugh Perkins wrote: >> Cant decide whether this list is appropriate for questions related to >> generics usage, or only to generics design? > > I think your question is quite appropriate -- actually, it is a good > question. It asks essentially for a monadic gmap, which seems quite > important. This operation is also the `inverse' of one of our > comparison tests: listify. The latter collects values from the leaves > of a data type in a list. That list is a `state' of a value, so to > speak. The state can be transported over the network, and, on the > other end, can be infused into a prototype object (assuming it has the > same structure). > > The monadic gmap subsumes two traversals: generic map and > reduction. So, your question looks even better. > > I wonder if we should add monadic gmap to our test suite? > > I have just committed the monadic gmap implementation and the test for > one generic library, the one I'm more familiar with. The test is in > the file > > http://darcs.haskell.org/generics/comparison/SmashA/Deserialize.hs > > We start with the data type of a company > > C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) > [PU (E (P "Joost" "Amsterdam") (S 1000.0)), > PU (E (P "Marlow" "Cambridge") (S 2000.0))], > D "Strategy" (E (P "Blair" "London") (S 100000.0)) []] > > (see http://darcs.haskell.org/generics/comparison/CompanyDatatypes.hs) > > We can serialize it: > > test1 = serialize genCom > > obtaining a list > > ["Research","Laemmel","Amsterdam","8000.0","Joost","Amsterdam", > "1000.0","Marlow","Cambridge","2000.0","Strategy","Blair", > "London","100000.0"] > > OTH, we can take the list > > retro = ["Metaphysics", > "Kant","Koeningsberg","800.0", > "Hume","Edinburgh","100.0", > "Marlowe","Cambridge","200.0", > "Ruling","Thatcher","London","50000.0"] > > and use it to `upgrade' the company genCom: > > test2 = deserialize genCom retro > > giving us > > *Deserialize> test2 > C [D "Metaphysics" (E (P "Kant" "Koeningsberg") (S 800.0)) > [PU (E (P "Hume" "Edinburgh") (S 100.0)), > PU (E (P "Marlowe" "Cambridge") (S 200.0))], > D "Ruling" (E (P "Thatcher" "London") (S 50000.0)) []] > > _______________________________________________ > Generics mailing list > Generics@haskell.org > http://www.haskell.org/mailman/listinfo/generics Jeremy.Gibbons@comlab.ox.ac.uk Oxford University Computing Laboratory, TEL: +44 1865 283508 Wolfson Building, Parks Road, FAX: +44 1865 283531 Oxford OX1 3QD, UK. URL: http://www.comlab.ox.ac.uk/oucl/people/jeremy.gibbons.html From hughperkins at gmail.com Sat Jun 30 13:17:03 2007 From: hughperkins at gmail.com (Hugh Perkins) Date: Sat Jun 30 13:11:08 2007 Subject: [Hs-Generics] xml deserialization using generics? In-Reply-To: <20070627083912.51533AD43@Adric.metnet.fnmoc.navy.mil> References: <837db430706261239p1b4f456an385f31ccde7e4628@mail.gmail.com> <20070627083912.51533AD43@Adric.metnet.fnmoc.navy.mil> Message-ID: <837db430706301017r5cafa61ej4337424c512707cd@mail.gmail.com> Oleg, Ok that looks like exactly what I'm looking for :-) Unfortunately I cant seem to run it. It comes up with strange typing messages when compiling: *TestDeserialize> serialize P :1:0: No instance for (LDat (TL_red [a]) (HCons (Int -> [String]) (HCons (Float -> [String]) (HCons (String -> [S tring]) HNil))) (String -> String -> Person) df) arising from use of `serialize' at :1:0-10 Possible fix: add an instance declaration for (LDat (TL_red [a]) (HCons (Int -> [String]) (HCons (Float -> [String]) (HCons (String -> [String]) HNil)) ) (String -> String -> Person) df) In the expression: serialize P In the definition of `it': it = serialize P where P is: getP = P "Lammel" "Amsterdam" (for simplicity) Similar looking errors with genCom, and/or with deserialize. I guess I need to add an instance or deriving statement to the P class? On another track, read through SYB3 a little, and it seems to have a really clean way to create polymorphic functions, such as: class Data a => StringParser a where parsestring :: String -> a parsestring x = fst $ head $gread(x) instance StringParser Int where parsestring x = read x instance StringParser String where parsestring x = read( "\"" ++ x ++ "\"" ) Looks like it should do exactly what I need: take a string and create any data type, as long as the data type is an instance of Data. Unfortunately, and strangely(?), it only seems to work for datatypes declared as instance. That's surprising since the default function in the class declaration works for the Data class. It would make sense if the default function would be applied to all data types which are instances of the base classes? So, that didnt work yet. A normal "read" ought to work, but there's no way of declaring that the children of the parent data type are instances of Read, so it works straight away less well (gets caught by the compiler). The only return functions which build so far are: return (fromJust $ fst $ head $ gread( "(" ++ (fromJust value) ++ ")" ) ) and: return ((fromJust . cast) value) ... but neither of these work particularly well at runtime, and they're difficult to customize for different data types. I really like the SYB3 approach to creating customizable generic functions, but it's a shame that there's no way of declaring a default function that works for all instances of the base classe(s). Or maybe I just didnt find out how to do that yet? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/generics/attachments/20070630/fbe66259/attachment.htm