[darcs-devel] [patch631] Merge Set2, Set2Unwitnessed and Set3Unwi... (and 12 more)

Iago Abal iago.abal at gmail.com
Mon Jul 11 10:14:47 UTC 2011


It looks fine for me.

I took a look to the Prim.V3 code, it is mostly incomplete so I cannot do
lot of comments for now. But as I said to Petr in the IRC I think we should
avoid the use of "Int" type to represent offset because now it is likely to
produce overflow in some (perhaps not so rare) situations.

For now I think the reorganization of the testing code is good, at least
with respect to the QC code I was working on. I will take another look
during this week to see some stuff with more detail. Just some remark, I
think we should adopt some convention to name TestSuite modules, because now
under Darcs.Test you can find many kind of modules, and it continues to grow
it will become hard to distinguish one from others. Darcs.Test.Patch.Info is
a test-suite whilst Darcs.Test.Patch.V1Model is another stuff. Maybe we
could end test-suites wih *Test or *Suite, so that would make clear that
Darcs.Test.Patch.InfoSuite is a module which contains the test-suite for
Darcs.Patch.Info.

On Sun, Jun 26, 2011 at 9:54 AM, Eric Kow <bugs at darcs.net> wrote:

>
> Eric Kow <kowey at darcs.net> added the comment:
>
> Hi Iago,
>
> As you may be aware, Petr is working on GSoC project towards V3 of Darcs
> primitive patches [1].  He wants to do it in a TDD way (!), but writing
> all the Arbitrary instances is quite boring and involves cleaning up a
> lot of the pre-existing QC infrastructure.  Do you think you might have
> time and/or be interested in commenting on his cleanup patch?
>
> Thanks!
>
> Eric
>
> [1]
> http://web.mornfall.net/blog/soc_reloaded:_darcs_primitive_patches_version_3.html
>
> On Tue, Jun 21, 2011 at 17:46:44 +0000, Petr Ročkai wrote:
> > More test suite reworking. It does use ImpredicativeTypes, but this
> should be
> > fairly harmless (I haven't tried with anything but GHC7 yet, though). I'd
> > expect more things could be conflated (some properties are still at least
> > duplicated, if not triplicated). There are quite a few properties that
> are
> > simply commented out and something should be done about those as well
> (probably
> > removing them or maybe fixing them).
> >
> > I'll keep conflating commonalities together, although I think that reuse
> is now
> > quite good. It also shows that our property coverage is rather weak: even
> > though the original test lists were pretty long, they were more or less
> just
> > repeating themselves.
> >
> > I'll still do some final cleanups, but other than that, I am done with
> the
> > test-suite for now, on the general level. I'll write arbitrary instances
> for V3
> > Prims next and then based on that, I'll start adding properties and fill
> in the
> > V3 implementation. I expect that the properties will be reusable in other
> > contexts, with the current testsuite structure.
> >
> > Yours,
> >    Petr
> >
> > 13 patches for repository http://darcs.net:
> >
> > Sun Jun  5 23:55:12 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Merge Set2, Set2Unwitnessed and Set3Unwitnessed in
> Test.Patch.Examples.
> >
> >   Set2 have been only used to implement Set3, and not directly by any
> >   tests. Everything is internal to Set2Unwitnessed now.
> >
> > Mon Jun 20 11:06:41 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Add a Show1 instance for (:>).
> >
> > Mon Jun 20 11:06:58 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Make (V1) Prim an instance of PrimPatchBase/FromPrim.
> >
> > Mon Jun 20 11:07:18 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Remove redundant imports in Darcs.Repository.Internal.
> >
> > Mon Jun 20 11:18:10 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Reorganise the Patch tests further.
> >
> > Mon Jun 20 14:30:27 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Generalise the V1.Prim Arbitrary instance based on Tree to any
> PrimPatch.
> >
> > Mon Jun 20 14:33:54 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Generalise a bunch of merge/commute properties over the patch type &
> generator.
> >
> > Mon Jun 20 15:36:51 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Split Test.Patch.Test into Properties.Check and Arbitrary.PatchV1.
> >
> > Tue Jun 21 16:11:12 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Print detailed diagnostic in patchAndInverseCommute.
> >
> > Tue Jun 21 16:12:34 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Slightly restructure and expand the Prim Arbitrary instances.
> >
> > Tue Jun 21 16:13:11 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Further restructuring of QC properties of patches.
> >
> > Tue Jun 21 16:22:50 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Replace tCommuteRecommute with recommute from Properties.Generic.
> >
> > Tue Jun 21 16:23:03 CEST 2011  Petr Rockai <me at mornfall.net>
> >   * Replace tMergeSwapMerge with Properties.Generic mergeEitherWay.
> >
> > ----------
> > files:
> merge-set2_-set2unwitnessed-and-set3unwitnessed-in-test_patch_examples_.dpatch,
> unnamed, unnamed
> > messages: 14546
> > nosy: mornfall
> > status: needs-screening
> > title: Merge Set2, Set2Unwitnessed and Set3Unwi... (and 12 more)
> >
> > __________________________________
> > Darcs bug tracker <bugs at darcs.net>
> > <http://bugs.darcs.net/patch631>
> > __________________________________
>
> >
> > [Merge Set2, Set2Unwitnessed and Set3Unwitnessed in Test.Patch.Examples.
> > Petr Rockai <me at mornfall.net>**20110605215512
> >  Ignore-this: 8c718a43d7e780f582b91900dd7464c5
> >
> >  Set2 have been only used to implement Set3, and not directly by any
> >  tests. Everything is internal to Set2Unwitnessed now.
> > ] hunk ./src/Darcs/Test/Patch/Examples/Set2.hs 1
> > -{-# LANGUAGE CPP #-}
> > -
> > -#include "gadts.h"
> > -
> > -module Darcs.Test.Patch.Examples.Set2
> > -    ( mergeExamples, commuteExamples, tripleExamples
> > -    , realPatchLoopExamples
> > -    )
> > -    where
> > -
> > -import Darcs.Patch.Invert ( Invert )
> > -import Darcs.Patch.Merge ( Merge )
> > -import Darcs.Patch.Prim ( PrimPatchBase(..), FromPrim )
> > -import Darcs.Patch.Prim.V1.Core ( Prim(FP), FilePatchType(Hunk) )
> > -import Darcs.Patch.FileName ( FileName, fp2fn )
> > -
> > -import Darcs.Witnesses.Ordered ( (:>), (:\/:) )
> > -import Darcs.Witnesses.Sealed ( Sealed(..), Sealed2, seal2, unseal2 )
> > -
> > -import qualified Data.ByteString as B ( ByteString )
> > -import qualified Data.ByteString.Char8 as BC ( pack )
> > -
> > -import Darcs.Test.Patch.RepoModel ( RepoModel, Content
> > -                                   , makeRepo, makeName, makeFile)
> > -import Darcs.Test.Patch.WithState ( WithStartState(..) )
> > -
> > -import Darcs.Test.Patch.Arbitrary.Generic
> > -    ( Tree(..)
> > -    , TreeWithFlattenPos(..)
> > -    , commutePairFromTree, commuteTripleFromTree
> > -    , mergePairFromCommutePair, commutePairFromTWFP
> > -    , canonizeTree
> > -    )
> > -import Darcs.Test.Patch.Arbitrary.PrimV1 () -- instances
> > -
> > -
> > -
> > -makeSimpleRepo :: String -> Content -> RepoModel C(x)
> > -makeSimpleRepo filename content = makeRepo [(makeName filename, makeFile
> content)]
> > -
> > -
> > -tripleExamples :: (FromPrim p, Merge p, Invert p, PrimPatchBase p,
> PrimOf p ~ Prim) => [Sealed2 (p :> p :> p)]
> > -tripleExamples = [commuteTripleFromTree seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [])
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "g"]))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack
> "j"]))
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "s"])) NilTree)))
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "e"])) NilTree))
> > -                  ,commuteTripleFromTree seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [BC.pack "j"])
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "s"]))
> > -                     (ParTree
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "j"] [])) NilTree)
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "j"] [])) NilTree)))
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree))
> > -                  ]
> > -
> > -
> > -mergeExamples :: (FromPrim p, Merge p, Invert p, PrimPatchBase p, PrimOf
> p ~ Prim) => [Sealed2 (p :\/: p)]
> > -mergeExamples = map (unseal2 (mergePairFromCommutePair seal2))
> commuteExamples
> > -
> > -commuteExamples :: (FromPrim p, Merge p, PrimPatchBase p, PrimOf p ~
> Prim) => [Sealed2 (p :> p)]
> > -commuteExamples = [
> > -                   commutePairFromTWFP seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [])
> > -                   (TWFP 3
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"])) NilTree)
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "b"]))
> > -                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"]))
> > -                         (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "v"]))
> > -                           (SeqTree (FP (fp2fn "./file") (Hunk 2
> [BC.pack "f"] [])) NilTree)))))),
> > -                   commutePairFromTWFP seal2 $
> > -                   WithStartState
> > -                   (makeSimpleRepo "file" [BC.pack "f",BC.pack
> "s",BC.pack "d"])
> > -                   (TWFP 3
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "d"]
> [])) NilTree)
> > -                     (ParTree
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] [])) NilTree)
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] []))
> > -                        (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "s",BC.pack "d"] []))
> > -                          (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "v"])) NilTree)))))),
> > -{-                   commutePairFromTWFP seal2 $
> > -                   WithStartState
> > -                   (makeSimpleRepo "file" [BC.pack "f",BC.pack "u",
> > -                                            BC.pack "s",BC.pack "d"])
> > -                   (TWFP 5
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 5 [] [BC.pack
> "x"]))
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack
> "d"] [])) NilTree))
> > -                     (ParTree
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f",BC.pack "u"] [])) NilTree)
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] []))
> > -                       (SeqTree (FP(fp2fn "./file") (Hunk 1 [BC.pack
> "u",BC.pack "s",BC.pack "d"] []))
> > -                        (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "a"]))
> > -                         (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "a"] [])) NilTree))))))),-}
> > -                   commutePairFromTree seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [BC.pack
> "n",BC.pack "t",BC.pack "h"])
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "n",BC.pack "t",BC.pack "h"] []))
> > -                     NilTree)
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "h"]
> []))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n"]
> []))
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "t"] [])) NilTree)))),
> > -                  commutePairFromTree seal2 $
> > -                  WithStartState (makeSimpleRepo "file" [])
> > -                  (ParTree
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "n"])) NilTree)
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "i"]))
> > -                                (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "i"])) NilTree))),
> > -                  commutePairFromTree seal2 $
> > -                  WithStartState (makeSimpleRepo "file" [])
> > -                  (ParTree
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "c"]))
> > -                     (ParTree
> > -                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "c"] [BC.pack "r"])) NilTree)
> > -                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"]))
> > -                        (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "d"])) NilTree))))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree)),
> > -                  commutePairFromTWFP seal2 $
> > -                  WithStartState (makeSimpleRepo "file" [])
> > -                  (TWFP 1
> > -                  (ParTree
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "t"])) NilTree)
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "t"])) NilTree))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree))),
> > -                   commutePairFromTWFP seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [BC.pack
> "f",BC.pack " r",
> > -                                                            BC.pack
> "c",BC.pack "v"])
> > -                   (TWFP 4
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack
> "c",BC.pack "v"] []))
> > -                        (ParTree
> > -                         (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "r"] []))
> > -                          (SeqTree (FP (fp2fn "fi le") (Hunk 1 [BC.pack
> "f"] [])) NilTree))
> > -                         (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f",BC.pack "r"] []))
> > -                          (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "y"])) NilTree))))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "v"]
> [])) NilTree))),
> > -                   commutePairFromTree seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [])
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "z"])) NilTree)
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree)
> > -                     (ParTree
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "r"])) NilTree)
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "d"])) NilTree))))
> > -                 , commutePairFromTree seal2 $
> > -                   WithStartState (makeSimpleRepo "file" [BC.pack
> "t",BC.pack "r",BC.pack "h"])
> > -                   (ParTree
> > -                    (ParTree
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "t",BC.pack "r",BC.pack "h"] []))
> > -                              NilTree)
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "o"])) NilTree))
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"]
> []))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "h"]
> [])) NilTree)))
> > -                 , commutePairFromTWFP seal2 $
> > -                   WithStartState (makeSimpleRepo "file" []) $
> > -                   TWFP 2
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"])) NilTree)
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "y"]))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack
> "m"]))
> > -                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree))))
> > -                 , commutePairFromTree seal2 $
> > -                 WithStartState (makeSimpleRepo "file" [])
> > -                 (ParTree
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "p"]))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "p"]
> []))
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "c"])) NilTree)))
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "z"])) NilTree))
> > -                 , commutePairFromTree seal2 $
> > -                 WithStartState (makeSimpleRepo "file" [])
> > -                 (ParTree
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"
> ]))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree))
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree))
> > -                 , commutePairFromTree seal2 $
> > -                 WithStartState (makeSimpleRepo "file" [])
> > -                 (ParTree
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree)
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"
> ]))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree)))
> > -                 , commutePairFromTree seal2 $
> > -                 WithStartState (makeSimpleRepo "file" [BC.pack
> "x",BC.pack "c"])
> > -                 (ParTree
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"]))
> > -                   (ParTree
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c"]
> [])) NilTree)
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "x"]
> []))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "j"])) NilTree))))
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "l"])) NilTree))
> > -                 , commutePairFromTree seal2 $
> > -                 WithStartState (makeSimpleRepo "file" [])
> > -                 (ParTree
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "s"))) NilTree)
> > -                  (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "k")))
> > -                   (SeqTree (FP (fp2fn "./file") (Hunk 1
> (packStringLetters "k") []))
> > -                    (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "m")))
> > -                     (SeqTree (FP (fp2fn "./file") (Hunk 1
> (packStringLetters "m") [])) NilTree)))))
> > -                 ]
> > -
> > -packStringLetters :: String -> [B.ByteString]
> > -packStringLetters = map (BC.pack . (:[]))
> > -
> > -realPatchLoopExamples :: [Sealed (WithStartState RepoModel (Tree Prim))]
> > -realPatchLoopExamples =
> > -    [Sealed (WithStartState (makeSimpleRepo fx_name [])
> > -     $ canonizeTree
> > -     (ParTree
> > -      (SeqTree (FP fx (Hunk 1 [] (packStringLetters
> "pkotufogbvdabnmbzajvolwviqebieonxvcvuvigkfgybmqhzuaaurjspd")))
> > -       (ParTree
> > -        (SeqTree (FP fx (Hunk 47 (packStringLetters "qhzu")
> (packStringLetters "zafybdcokyjskcgnvhkbzpysaafnjjhcstgrczplxsfwagmh")))
> > -         (ParTree
> > -          (ParTree
> > -           NilTree
> > -           (ParTree
> > -            (ParTree
> > -             (ParTree
> > -              (SeqTree (FP fx (Hunk 15 (packStringLetters
> "mbzajvolwviqebieonxvcvuvigkfgyb") (packStringLetters
> "vujnxnhvybvpouyciaabszfmgssezlwwjgnethvrpnfrkubphzvdgymjjoacppqps")))
> > -               (ParTree
> > -                NilTree
> > -                (ParTree
> > -                 (SeqTree (FP fx (Hunk 40 (packStringLetters
> "ssezlwwjgnethvrpnfrkubphzvdgymjjoacppqpsmzafybdcokyjskcgnvhkbz")
> (packStringLetters "wnesidpccwoiqiichxaaejdsyrhrusqljlcoro")))
> > -                  (ParTree
> > -                   (ParTree
> > -                    (SeqTree (FP fx (Hunk 12 (packStringLetters
> "abnvujnxnhvybvpouyciaabszfmgwnesidpccwoiqii") (packStringLetters
> "czfdhqkipdstfjycqaxwnbxrihrufdeyneqiiiafwzlmg"))) NilTree)
> > -                    NilTree)
> > -                   NilTree))
> > -                 (SeqTree (FP fx (Hunk 25 [] (packStringLetters
> "dihgmsotezucqdgxczvcivijootyvhlwymbiueufnvpwpeukmskqllalfe"))) NilTree))))
> > -              (SeqTree (FP fx (Hunk 56 (packStringLetters
> "yjskcgnvhkbzpysaafnjjhcstgrczplxsfwagmhaaurjsp") (packStringLetters
> "xldhrutyhcyaqeezwujiguawfyawjjqlirxshjddvq"))) NilTree))
> > -             (SeqTree (FP fx (Hunk 20 [] (packStringLetters
> "ooygwiyogqrqnytixqtmvdxx")))
> > -              (SeqTree (FP fx (Hunk 26 (packStringLetters
> "yogqrqnytixqtmvdxxvolwviqebieonxvcvuvigkfgybmzafybdcokyjskcgnvhkbz")
> (packStringLetters "akhsmlbkdxnvfoikmiatfbpzdrsyykkpoxvvddeaspzxe")))
> > -               (SeqTree (FP fx (Hunk 39 [] (packStringLetters "ji")))
> > -                (ParTree
> > -                 NilTree
> > -                 (ParTree
> > -                  NilTree
> > -                  (ParTree
> > -                   (ParTree
> > -                    NilTree
> > -                    (SeqTree (FP fx (Hunk 26 (packStringLetters
> "akhsmlbkdxnvfjioikmiatfbpzdrsyykkpoxvvddeaspzxepysaafnjjhcstgrczplxs")
> (packStringLetters "onjbhddskcj")))
> > -                     (SeqTree (FP fx (Hunk 39 [] (packStringLetters
> "fyscunxxxjjtyqpfxeznhtwvlphmp"))) NilTree)))
> > -                   (ParTree
> > -                    NilTree
> > -                    (SeqTree (FP fx (Hunk 44 [] (packStringLetters
> "xcchzwmzoezxkmkhcmesplnjpqriypshgiqklgdnbmmkldnydiy")))
> > -                     (ParTree
> > -                      NilTree
> > -                      (SeqTree (FP fx (Hunk 64 (packStringLetters
> "plnjpqriypshgiqklgdnbmmkldnydiymiatfbpzdrsyykkpoxvvddeaspzxepysaafn")
> (packStringLetters "anjlzfdqbjqbcplvqvkhwjtkigp"))) NilTree)))))))))))
> > -            (ParTree
> > -             NilTree
> > -             NilTree)))
> > -          NilTree))
> > -        NilTree))
> > -      (ParTree
> > -       NilTree
> > -       (SeqTree (FP fx (Hunk 1 [] (packStringLetters "ti")))
> > -        (SeqTree (FP fx (Hunk 1 (packStringLetters "t")
> (packStringLetters "ybcop")))
> > -         (SeqTree (FP fx (Hunk 2 [] (packStringLetters
> "dvlhgwqlpaeweerqrhnjtfolczbqbzoccnvdsyqiefqitrqneralf")))
> > -          (SeqTree (FP fx (Hunk 15 [] (packStringLetters
> "yairbjphwtnaerccdlfewujvjvmjakbc")))
> > -           (SeqTree (FP fx (Hunk 51 [] (packStringLetters
> "xayvfuwaiiogginufnhsrmktpmlbvxiakjwllddkiyofyfw")))
> > -            (ParTree
> > -             NilTree
> > -             NilTree)))))))))]
> > -  where
> > -      fx_name :: String
> > -      fx_name = "F"
> > -
> > -      fx :: FileName
> > -      fx = fp2fn "./F"
> > -
> > rmfile ./src/Darcs/Test/Patch/Examples/Set2.hs
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 1
> > -module Darcs.Test.Patch.Examples.Set2Unwitnessed where
> > -
> > -import qualified Darcs.Test.Patch.Examples.Set2 as W
> > -     ( mergeExamples, commuteExamples, tripleExamples
> > -     , realPatchLoopExamples
> > -     )
> > -import Darcs.Test.Patch.RepoModel ( RepoModel )
> > -import Darcs.Test.Patch.WithState ( WithStartState )
> > -import Darcs.Test.Patch.WSub
> > -import Darcs.Test.Patch.Arbitrary.Generic ( Tree )
> > -
> > -import Darcs.Witnesses.Sealed
> > -
> > -import Darcs.Patch.Prim.V1 ( Prim )
> > -import Darcs.Patch.V2 ( RealPatch )
> > -
> > -mergeExamples :: [Sealed2 (RealPatch Prim :\/: RealPatch Prim)]
> > -mergeExamples = map (mapSeal2 fromW) W.mergeExamples
> > -
> > -realPatchLoopExamples :: [Sealed (WithStartState RepoModel (Tree Prim))]
> > -realPatchLoopExamples = W.realPatchLoopExamples
> > -
> > -commuteExamples :: [Sealed2 (RealPatch Prim :> RealPatch Prim)]
> > -commuteExamples = map (mapSeal2 fromW) W.commuteExamples
> > -
> > -tripleExamples :: [Sealed2 (RealPatch Prim :> RealPatch Prim :>
> RealPatch Prim)]
> > -tripleExamples = map (mapSeal2 fromW) W.tripleExamples
> > -
> > rmfile ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs
> > move ./src/Darcs/Test/Patch/Examples/Set3Unwitnessed.hs
> ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs
> > hunk ./darcs.cabal 606
> >      other-modules:    Darcs.Test.Email
> >                        Darcs.Test.Patch.Check
> >                        Darcs.Test.Patch.Examples.Set1
> > -                      Darcs.Test.Patch.Examples.Set2
> >                        Darcs.Test.Patch.Examples.Set2Unwitnessed
> > hunk ./darcs.cabal 607
> > -                      Darcs.Test.Patch.Examples.Set3Unwitnessed
> >                        Darcs.Test.Patch.WSub
> >                        Darcs.Test.Patch.Info
> >                        Darcs.Test.Patch.Properties.V1Set1
> > hunk ./src/Darcs/Test/Patch.hs 46
> >  import qualified Darcs.Test.Patch.Info
> >
> >  import qualified Darcs.Test.Patch.Examples.Set1 as Ex
> > +import qualified Darcs.Test.Patch.Examples.Set2Unwitnessed as ExU
> > +
> >  import qualified Darcs.Test.Patch.Properties.V1Set1 as Prop
> >  import qualified Darcs.Test.Patch.Properties.V1Set2 as Prop
> >  import qualified Darcs.Test.Patch.Properties.Generic as Prop
> > hunk ./src/Darcs/Test/Patch.hs 52
> >  import qualified Darcs.Test.Patch.Properties.Real as Prop
> > -
> > -import qualified Darcs.Test.Patch.WSub as WSub
> > -import qualified Darcs.Test.Patch.Examples.Set2Unwitnessed as ExU
> > -import qualified Darcs.Test.Patch.Examples.Set3Unwitnessed as ExU
> >  import qualified Darcs.Test.Patch.Properties.GenericUnwitnessed as PropU
> >
> > hunk ./src/Darcs/Test/Patch.hs 54
> > +import qualified Darcs.Test.Patch.WSub as WSub
> >  import Darcs.Test.Patch.Arbitrary.PrimV1
> >
> >  #include "gadts.h"
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 23
> >
> >  #include "gadts.h"
> >
> > -module Darcs.Test.Patch.Examples.Set3Unwitnessed
> > +module Darcs.Test.Patch.Examples.Set2Unwitnessed
> >         ( primPermutables, primPatches
> >         , commutables, commutablesFL
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 26
> > -       , realCommutables , realMergeables, realTriples,
> realNonduplicateTriples, realPatches
> > +       , realCommutables , realMergeables, realTriples
> > +       , realNonduplicateTriples, realPatches, realPatchLoopExamples
> >         ) where
> >
> >  import Data.Maybe ( catMaybes )
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 40
> >  import Darcs.Patch.V2 ( RealPatch )
> >  import Darcs.Patch.V2.Real ( prim2real )
> >  -- import Darcs.Test.Patch.Test () -- for instance Eq Patch
> > -import Darcs.Test.Patch.Examples.Set2Unwitnessed
> > +-- import Darcs.Test.Patch.Examples.Set2Unwitnessed
> >  import Darcs.Witnesses.Unsafe ( unsafeCoerceP )
> >  import qualified Darcs.Test.Patch.Arbitrary.Real as W (
> notDuplicatestriple )
> >  --import Printer ( greenText )
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 49
> >  import Darcs.ColorPrinter () -- for instance Show Doc
> >  import Darcs.Test.Patch.WSub
> >
> > +import qualified Darcs.Witnesses.Ordered as W ( (:>), (:\/:) )
> > +import qualified Data.ByteString as B ( ByteString )
> > +import Darcs.Test.Patch.RepoModel ( RepoModel, Content
> > +                                   , makeRepo, makeName, makeFile)
> > +import Darcs.Test.Patch.WithState ( WithStartState(..) )
> > +import Darcs.Patch.Prim.V1.Core ( Prim(FP), FilePatchType(Hunk) )
> > +import Darcs.Patch.FileName ( FileName, fp2fn )
> > +import Darcs.Patch.Prim ( PrimPatchBase(..), FromPrim )
> > +import Darcs.Patch.Merge ( Merge )
> > +import Darcs.Test.Patch.Arbitrary.Generic
> > +    ( Tree(..)
> > +    , TreeWithFlattenPos(..)
> > +    , commutePairFromTree, commuteTripleFromTree
> > +    , mergePairFromCommutePair, commutePairFromTWFP
> > +    , canonizeTree
> > +    )
> > +
> >  -- import Debug.Trace
> >  -- #include "impossible.h"
> >
> > hunk ./src/Darcs/Test/Patch/Examples/Set2Unwitnessed.hs 69
> > +makeSimpleRepo :: String -> Content -> RepoModel C(x)
> > +makeSimpleRepo filename content = makeRepo [(makeName filename, makeFile
> content)]
> > +
> > +
> > +w_tripleExamples :: (FromPrim p, Merge p, Invert p, PrimPatchBase p,
> PrimOf p ~ Prim) => [Sealed2 (p W.:> p W.:> p)]
> > +w_tripleExamples = [commuteTripleFromTree seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [])
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "g"]))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack
> "j"]))
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "s"])) NilTree)))
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "e"])) NilTree))
> > +                  ,commuteTripleFromTree seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [BC.pack "j"])
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "s"]))
> > +                     (ParTree
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "j"] [])) NilTree)
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "j"] [])) NilTree)))
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree))
> > +                  ]
> > +
> > +
> > +w_mergeExamples :: (FromPrim p, Merge p, Invert p, PrimPatchBase p,
> PrimOf p ~ Prim) => [Sealed2 (p W.:\/: p)]
> > +w_mergeExamples = map (unseal2 (mergePairFromCommutePair seal2))
> w_commuteExamples
> > +
> > +w_commuteExamples :: (FromPrim p, Merge p, PrimPatchBase p, PrimOf p ~
> Prim) => [Sealed2 (p W.:> p)]
> > +w_commuteExamples = [
> > +                   commutePairFromTWFP seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [])
> > +                   (TWFP 3
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"])) NilTree)
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "b"]))
> > +                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"]))
> > +                         (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "v"]))
> > +                           (SeqTree (FP (fp2fn "./file") (Hunk 2
> [BC.pack "f"] [])) NilTree)))))),
> > +                   commutePairFromTWFP seal2 $
> > +                   WithStartState
> > +                   (makeSimpleRepo "file" [BC.pack "f",BC.pack
> "s",BC.pack "d"])
> > +                   (TWFP 3
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "d"]
> [])) NilTree)
> > +                     (ParTree
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] [])) NilTree)
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] []))
> > +                        (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "s",BC.pack "d"] []))
> > +                          (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "v"])) NilTree)))))),
> > +{-                   commutePairFromTWFP seal2 $
> > +                   WithStartState
> > +                   (makeSimpleRepo "file" [BC.pack "f",BC.pack "u",
> > +                                            BC.pack "s",BC.pack "d"])
> > +                   (TWFP 5
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 5 [] [BC.pack
> "x"]))
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack
> "d"] [])) NilTree))
> > +                     (ParTree
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f",BC.pack "u"] [])) NilTree)
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f"] []))
> > +                       (SeqTree (FP(fp2fn "./file") (Hunk 1 [BC.pack
> "u",BC.pack "s",BC.pack "d"] []))
> > +                        (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "a"]))
> > +                         (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "a"] [])) NilTree))))))),-}
> > +                   commutePairFromTree seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [BC.pack
> "n",BC.pack "t",BC.pack "h"])
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "n",BC.pack "t",BC.pack "h"] []))
> > +                     NilTree)
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "h"]
> []))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "n"]
> []))
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "t"] [])) NilTree)))),
> > +                  commutePairFromTree seal2 $
> > +                  WithStartState (makeSimpleRepo "file" [])
> > +                  (ParTree
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "n"])) NilTree)
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "i"]))
> > +                                (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "i"])) NilTree))),
> > +                  commutePairFromTree seal2 $
> > +                  WithStartState (makeSimpleRepo "file" [])
> > +                  (ParTree
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "c"]))
> > +                     (ParTree
> > +                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "c"] [BC.pack "r"])) NilTree)
> > +                       (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"]))
> > +                        (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "d"])) NilTree))))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree)),
> > +                  commutePairFromTWFP seal2 $
> > +                  WithStartState (makeSimpleRepo "file" [])
> > +                  (TWFP 1
> > +                  (ParTree
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "t"])) NilTree)
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "t"])) NilTree))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree))),
> > +                   commutePairFromTWFP seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [BC.pack
> "f",BC.pack " r",
> > +                                                            BC.pack
> "c",BC.pack "v"])
> > +                   (TWFP 4
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack
> "c",BC.pack "v"] []))
> > +                        (ParTree
> > +                         (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack
> "r"] []))
> > +                          (SeqTree (FP (fp2fn "fi le") (Hunk 1 [BC.pack
> "f"] [])) NilTree))
> > +                         (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "f",BC.pack "r"] []))
> > +                          (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> [BC.pack "y"])) NilTree))))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 4 [BC.pack "v"]
> [])) NilTree))),
> > +                   commutePairFromTree seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [])
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "z"])) NilTree)
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "f"])) NilTree)
> > +                     (ParTree
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "r"])) NilTree)
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "d"])) NilTree))))
> > +                 , commutePairFromTree seal2 $
> > +                   WithStartState (makeSimpleRepo "file" [BC.pack
> "t",BC.pack "r",BC.pack "h"])
> > +                   (ParTree
> > +                    (ParTree
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack
> "t",BC.pack "r",BC.pack "h"] []))
> > +                              NilTree)
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "o"])) NilTree))
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "t"]
> []))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "h"]
> [])) NilTree)))
> > +                 , commutePairFromTWFP seal2 $
> > +                   WithStartState (makeSimpleRepo "file" []) $
> > +                   TWFP 2
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"])) NilTree)
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "y"]))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 2 [] [BC.pack
> "m"]))
> > +                      (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree))))
> > +                 , commutePairFromTree seal2 $
> > +                 WithStartState (makeSimpleRepo "file" [])
> > +                 (ParTree
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "p"]))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "p"]
> []))
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "c"])) NilTree)))
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "z"])) NilTree))
> > +                 , commutePairFromTree seal2 $
> > +                 WithStartState (makeSimpleRepo "file" [])
> > +                 (ParTree
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"
> ]))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree))
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree))
> > +                 , commutePairFromTree seal2 $
> > +                 WithStartState (makeSimpleRepo "file" [])
> > +                 (ParTree
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "v"])) NilTree)
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack "j"
> ]))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1 [BC.pack "j"]
> [])) NilTree)))
> > +                 , commutePairFromTree seal2 $
> > +                 WithStartState (makeSimpleRepo "file" [BC.pack
> "x",BC.pack "c"])
> > +                 (ParTree
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "h"]))
> > +                   (ParTree
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 3 [BC.pack "c"]
> [])) NilTree)
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 2 [BC.pack "x"]
> []))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "j"])) NilTree))))
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 [] [BC.pack
> "l"])) NilTree))
> > +                 , commutePairFromTree seal2 $
> > +                 WithStartState (makeSimpleRepo "file" [])
> > +                 (ParTree
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "s"))) NilTree)
> > +                  (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "k")))
> > +                   (SeqTree (FP (fp2fn "./file") (Hunk 1
> (packStringLetters "k") []))
> > +                    (SeqTree (FP (fp2fn "./file") (Hunk 1 []
> (packStringLetters "m")))
> > +                     (SeqTree (FP (fp2fn "./file") (Hunk 1
> (packStringLetters "m") [])) NilTree)))))
> > +                 ]
> > +
> > +packStringLetters :: String -> [B.ByteString]
> > +packStringLetters = map (BC.pack . (:[]))
> > +
> > +w_realPatchLoopExamples :: [Sealed (WithStartState RepoModel (Tree
> Prim))]
> > +w_realPatchLoopExamples =
> > +    [Sealed (WithStartState (makeSimpleRepo fx_name [])
> > +     $ canonizeTree
> > +     (ParTree
> > +      (SeqTree (FP fx (Hunk 1 [] (packStringLetters
> "pkotufogbvdabnmbzajvolwviqebieonxvcvuvigkfgybmqhzuaaurjspd")))
> > +       (ParTree
> > +        (SeqTree (FP fx (Hunk 47 (packStringLetters "qhzu")
> (packStringLetters "zafybdcokyjskcgnvhkbzpysaafnjjhcstgrczplxsfwagmh")))
> > +         (ParTree
> > +          (ParTree
> > +           NilTree
> > +           (ParTree
> > +            (ParTree
> > +             (ParTree
> > +              (SeqTree (FP fx (Hunk 15 (packStringLetters
> "mbzajvolwviqebieonxvcvuvigkfgyb") (packStringLetters
> "vujnxnhvybvpouyciaabszfmgssezlwwjgnethvrpnfrkubphzvdgymjjoacppqps")))
> > +               (ParTree
> > +                NilTree
> > +                (ParTree
> > +                 (SeqTree (FP fx (Hunk 40 (packStringLetters
> "ssezlwwjgnethvrpnfrkubphzvdgymjjoacppqpsmzafybdcokyjskcgnvhkbz")
> (packStringLetters "wnesidpccwoiqiichxaaejdsyrhrusqljlcoro")))
> > +                  (ParTree
> > +                   (ParTree
> > +                    (SeqTree (FP fx (Hunk 12 (packStringLetters
> "abnvujnxnhvybvpouyciaabszfmgwnesidpccwoiqii") (packStringLetters
> "czfdhqkipdstfjycqaxwnbxrihrufdeyneqiiiafwzlmg"))) NilTree)
> > +                    NilTree)
> > +                   NilTree))
> > +                 (SeqTree (FP fx (Hunk 25 [] (packStringLetters
> "dihgmsotezucqdgxczvcivijootyvhlwymbiueufnvpwpeukmskqllalfe"))) NilTree))))
> > +              (SeqTree (FP fx (Hunk 56 (packStringLetters
> "yjskcgnvhkbzpysaafnjjhcstgrczplxsfwagmhaaurjsp") (packStringLetters
> "xldhrutyhcyaqeezwujiguawfyawjjqlirxshjddvq"))) NilTree))
> > +             (SeqTree (FP fx (Hunk 20 [] (packStringLetters
> "ooygwiyogqrqnytixqtmvdxx")))
> > +              (SeqTree (FP fx (Hunk 26 (packStringLetters
> "yogqrqnytixqtmvdxxvolwviqebieonxvcvuvigkfgybmzafybdcokyjskcgnvhkbz")
> (packStringLetters "akhsmlbkdxnvfoikmiatfbpzdrsyykkpoxvvddeaspzxe")))
> > +               (SeqTree (FP fx (Hunk 39 [] (packStringLetters "ji")))
> > +                (ParTree
> > +                 NilTree
> > +                 (ParTree
> > +                  NilTree
> > +                  (ParTree
> > +                   (ParTree
> > +                    NilTree
> > +                    (SeqTree (FP fx (Hunk 26 (packStringLetters
> "akhsmlbkdxnvfjioikmiatfbpzdrsyykkpoxvvddeaspzxepysaafnjjhcstgrczplxs")
> (packStringLetters "onjbhddskcj")))
> > +                     (SeqTree (FP fx (Hunk 39 [] (packStringLetters
> "fyscunxxxjjtyqpfxeznhtwvlphmp"))) NilTree)))
> > +                   (ParTree
> > +                    NilTree
> > +                    (SeqTree (FP fx (Hunk 44 [] (packStringLetters
> "xcchzwmzoezxkmkhcmesplnjpqriypshgiqklgdnbmmkldnydiy")))
> > +                     (ParTree
> > +                      NilTree
> > +                      (SeqTree (FP fx (Hunk 64 (packStringLetters
> "plnjpqriypshgiqklgdnbmmkldnydiymiatfbpzdrsyykkpoxvvddeaspzxepysaafn")
> (packStringLetters "anjlzfdqbjqbcplvqvkhwjtkigp"))) NilTree)))))))))))
> > +            (ParTree
> > +             NilTree
> > +             NilTree)))
> > +          NilTree))
> > +        NilTree))
> > +      (ParTree
> > +       NilTree
> > +       (SeqTree (FP fx (Hunk 1 [] (packStringLetters "ti")))
> > +        (SeqTree (FP fx (Hunk 1 (packStringLetters "t")
> (packStringLetters "ybcop")))
> > +         (SeqTree (FP fx (Hunk 2 [] (packStringLetters
> "dvlhgwqlpaeweerqrhnjtfolczbqbzoccnvdsyqiefqitrqneralf")))
> > +          (SeqTree (FP fx (Hunk 15 [] (packStringLetters
> "yairbjphwtnaerccdlfewujvjvmjakbc")))
> > +           (SeqTree (FP fx (Hunk 51 [] (packStringLetters
> "xayvfuwaiiogginufnhsrmktpmlbvxiakjwllddkiyofyfw")))
> > +            (ParTree
> > +             NilTree
> > +             NilTree)))))))))]
> > +  where
> > +      fx_name :: String
> > +      fx_name = "F"
> > +
> > +      fx :: FileName
> > +      fx = fp2fn "./F"
> > +
> > +
> > +mergeExamples :: [Sealed2 (RealPatch Prim :\/: RealPatch Prim)]
> > +mergeExamples = map (mapSeal2 fromW) w_mergeExamples
> > +
> > +realPatchLoopExamples :: [Sealed (WithStartState RepoModel (Tree Prim))]
> > +realPatchLoopExamples = w_realPatchLoopExamples
> > +
> > +commuteExamples :: [Sealed2 (RealPatch Prim :> RealPatch Prim)]
> > +commuteExamples = map (mapSeal2 fromW) w_commuteExamples
> > +
> > +tripleExamples :: [Sealed2 (RealPatch Prim :> RealPatch Prim :>
> RealPatch Prim)]
> > +tripleExamples = map (mapSeal2 fromW) w_tripleExamples
> > +
> >  notDuplicatestriple :: (RealPatch Prim :> RealPatch Prim :> RealPatch
> Prim) C(x y) -> Bool
> >  notDuplicatestriple = W.notDuplicatestriple . toW
> >
> > hunk ./src/Darcs/Test/Patch/WSub.hs 5
> >  module Darcs.Test.Patch.WSub where
> >
> >  {-
> > -The Examples.Set3 module builds a lot of test cases by pattern matching
> > +The Examples.Set2Unwitnessed module builds a lot of test cases by
> pattern matching
> >  on the results of merge/commute in where clauses. This would
> >  be very painful to switch to using witnesses properly, because
> >  we'd have to make them use case in series.
> > [Add a Show1 instance for (:>).
> > Petr Rockai <me at mornfall.net>**20110620090641
> >  Ignore-this: f601c659c5a078eb1a337ff74e47d0dd
> > ] hunk ./src/Darcs/Witnesses/Ordered.hs 110
> >  instance Show2 a => Show2 (RL a) where
> >     showDict2 = ShowDictClass
> >
> > +instance (Show2 a, Show2 b) => Show1 ((a :> b) C(x)) where
> > +   showDict1 = ShowDictClass
> > +
> >  -- reverse list
> >  data RL a C(x z) where
> >      (:<:) :: a C(y z) -> RL a C(x y) -> RL a C(x z)
> > [Make (V1) Prim an instance of PrimPatchBase/FromPrim.
> > Petr Rockai <me at mornfall.net>**20110620090658
> >  Ignore-this: 2534da30774aac84a09342c3fbcda80e
> > ] hunk ./src/Darcs/Patch/Prim/V1.hs 12
> >  import Darcs.Patch.Prim.V1.Read ()
> >  import Darcs.Patch.Prim.V1.Show ()
> >
> > -import Darcs.Patch.Prim.Class ( PrimPatch )
> > +import Darcs.Patch.Prim.Class ( PrimPatch, PrimPatchBase(..),
> FromPrim(..) )
> >  import Darcs.Patch.Patchy ( Patchy )
> >
> >  instance PrimPatch Prim
> > hunk ./src/Darcs/Patch/Prim/V1.hs 17
> >  instance Patchy Prim
> > +instance PrimPatchBase Prim where
> > +  type PrimOf Prim = Prim
> > +
> > +instance FromPrim Prim where
> > +  fromPrim = id
> > [Remove redundant imports in Darcs.Repository.Internal.
> > Petr Rockai <me at mornfall.net>**20110620090718
> >  Ignore-this: 85333a422e8c83d6b8080dfde97aee1
> > ] hunk ./src/Darcs/Patch/Prim/V1/Details.hs 11
> >  import Darcs.Patch.Prim.V1.Core
> >      ( Prim(..), FilePatchType(..), DirPatchType(..) )
> >  import Darcs.Patch.SummaryData ( SummDetail(..), SummOp(..) )
> > -import Darcs.Patch.TokenReplace ( tryTokInternal )
> > -import Darcs.Patch.FileName ( fn2fp, fp2fn, movedirfilename, fn2ps )
> > -
> > -import qualified Data.ByteString as B ( ByteString, concat )
> > -import qualified Data.ByteString.Char8 as BC ( pack, split )
> > -import Data.Maybe ( catMaybes )
> >
> >  #include "gadts.h"
> >
> > hunk ./src/Darcs/Repository/Internal.hs 71
> >                                   writeProblem, readProblem,
> readfromAndWritetoProblem )
> >  import System.Directory ( doesDirectoryExist, setCurrentDirectory,
> >                            createDirectoryIfMissing, doesFileExist )
> > -import Control.Monad ( liftM, when, unless, filterM )
> > +import Control.Monad ( when, unless, filterM )
> >  import Control.Applicative ( (<$>) )
> >  import Workaround ( getCurrentDirectory, renameFile, setExecutable )
> >
> > hunk ./src/Darcs/Repository/Internal.hs 90
> >  import Darcs.Patch.Inspect ( PatchInspect )
> >  import Darcs.Patch.Prim ( PrimPatchBase, PrimOf, tryShrinkingInverse,
> PrimPatch )
> >  import Darcs.Patch.Bundle ( scanBundle, makeBundleN )
> > -import Darcs.Patch.PatchInfoAnd ( PatchInfoAnd, info,
> > -                         hopefully, hopefullyM )
> > +import Darcs.Patch.PatchInfoAnd ( PatchInfoAnd, hopefully )
> >  import qualified Darcs.Repository.HashedRepo as HashedRepo
> >                              ( revertTentativeChanges,
> finalizeTentativeChanges,
> >                                removeFromTentativeInventory,
> > hunk ./src/Darcs/Repository/Internal.hs 110
> >  import Darcs.Witnesses.Unsafe ( unsafeCoerceP, unsafeCoercePStart )
> >  import Darcs.Witnesses.Ordered ( FL(..), RL(..),
> >                               (:\/:)(..), (:/\:)(..), (:>)(..),
> > -                             (+>+), lengthFL, dropWhileFL,
> > +                             (+>+), lengthFL,
> >                               allFL, filterFLFL,
> >                               reverseFL, mapFL_FL, concatFL )
> >  import Darcs.Patch ( RepoPatch, Patchy, merge,
> > hunk ./src/Darcs/Repository/Internal.hs 115
> >                       listConflictedFiles, listTouchedFiles,
> > -                     Named, patchcontents,
> > +                     Named,
> >                       commuteRL, fromPrims,
> >                       readPatch,
> >                       effect, invert,
> > hunk ./src/Darcs/Repository/Internal.hs 124
> >                       apply, applyToTree,
> >                     )
> >  import Darcs.Patch.Permutations ( commuteWhatWeCanFL, removeFL )
> > -import Darcs.Patch.Info ( PatchInfo )
> >  import Darcs.Patch.Set ( PatchSet(..), SealedPatchSet, newset2FL )
> >  #ifdef GADT_WITNESSES
> >  import Darcs.Patch.Set ( Origin )
> > [Reorganise the Patch tests further.
> > Petr Rockai <me at mornfall.net>**20110620091810
> >  Ignore-this: b9bc5870d025d29d9d3d2dbd0fe950ad
> > ] hunk ./src/Darcs/Test/Patch.hs 24
> >  import Test.Framework ( Test, testGroup )
> >  import Test.Framework.Providers.HUnit ( testCase )
> >  import Test.Framework.Providers.QuickCheck2 ( testProperty )
> > +import Test.QuickCheck.Arbitrary( Arbitrary )
> >  import Test.HUnit ( assertBool )
> >
> >  import Darcs.Test.Util.TestResult ( TestResult, isOk, fromMaybe )
> > hunk ./src/Darcs/Test/Patch.hs 33
> >  import Darcs.Witnesses.Ordered
> >  import Darcs.Witnesses.Sealed
> >  import Darcs.Witnesses.Eq ( unsafeCompare )
> > -import Darcs.Patch.Prim( PrimPatch, join )
> > +import Darcs.Witnesses.Show
> > +import Darcs.Patch.Prim( PrimPatch, join, FromPrim, PrimOf,
> PrimPatchBase )
> >  import Darcs.Patch.Prim.V1 ( Prim )
> >  import Darcs.Patch.V2.Real ( isConsistent, isForward, RealPatch )
> >  import Darcs.Patch.Patchy ( Commute(..) )
> > hunk ./src/Darcs/Test/Patch.hs 39
> >
> > -import Darcs.Test.Patch.Arbitrary.Generic( Tree )
> > +import Darcs.Test.Patch.Arbitrary.Generic
> > +import qualified Darcs.Test.Patch.Arbitrary.PrimV1 as P1
> > +import Darcs.Test.Patch.Test( Check(..) )
> >  import Darcs.Test.Patch.Arbitrary.Real
> >  import Darcs.Test.Patch.Arbitrary.PrimV1 ()
> >  import Darcs.Test.Patch.RepoModel( RepoModel )
> > hunk ./src/Darcs/Test/Patch.hs 59
> >  import qualified Darcs.Test.Patch.Properties.GenericUnwitnessed as PropU
> >
> >  import qualified Darcs.Test.Patch.WSub as WSub
> > -import Darcs.Test.Patch.Arbitrary.PrimV1
> >
> >  #include "gadts.h"
> >
> > hunk ./src/Darcs/Test/Patch.hs 72
> >      where assertName = "Boolean assertion for \"" ++ name ++ "\""
> >            res        = and $ map (isOk . test) datas
> >
> > -patchExampleTests :: [Test]
> > -patchExampleTests =
> > +unit_V1P1:: [Test]
> > +unit_V1P1 =
> >    [ runPrimitiveTests "Checking known commutes" Prop.checkCommute
> Ex.knownCommutes
> >    , runPrimitiveTests "Checking known non-commutes"
> Prop.checkCantCommute Ex.knownCantCommutes
> >    , runPrimitiveTests "Checking known merges" Prop.checkMerge
> Ex.knownMerges
> > hunk ./src/Darcs/Test/Patch.hs 90
> >    , runPrimitiveTests "Checking primitive commute/recommute"
> Prop.tCommuteRecommute Ex.primitiveCommutePairs
> >    ]
> >
> > --- | The unit tests defined about patches
> > -patchUnitTests :: [Test]
> > -patchUnitTests =
> > +unit_V2P1 :: [Test]
> > +unit_V2P1 =
> >    [ runPrimitiveTests "join commute" (PropU.joinCommute WSub.join)
> ExU.primPermutables
> >    , runPrimitiveTests "prim recommute" (PropU.recommute WSub.commute)
> ExU.commutables
> >    , runPrimitiveTests "prim patch and inverse commute"
> (PropU.patchAndInverseCommute WSub.commute) ExU.commutables
> > hunk ./src/Darcs/Test/Patch.hs 122
> >  mergeEitherWayReals :: PrimPatch prim => (RealPatch prim :\/: RealPatch
> prim) C(x y) -> TestResult
> >  mergeEitherWayReals = Prop.mergeEitherWay
> >
> > -patchUnitTests2 :: [Test]
> > -patchUnitTests2 =
> > +qc_prim :: forall prim C(x y a).
> > +           (PrimPatch prim, ArbitraryPrim prim, Show2 prim
> > +           , Check prim, PrimPatchBase prim, PrimOf prim ~ prim
> > +           , FromPrim prim
> > +           , Arbitrary (Sealed2 prim)
> > +           , Arbitrary (Sealed2 (WithState RepoModel prim))
> > +           , Arbitrary (Sealed2 (WithState RepoModel (prim :> prim)))
> > +           , Arbitrary (Sealed2 (WithState RepoModel (FL prim :> FL
> prim)))
> > +           , Arbitrary (Sealed2 (WithState RepoModel (FL prim)))
> > +           , Arbitrary (Sealed2 (FL prim))
> > +           , Arbitrary (Sealed2 (prim :> prim))
> > +           , Arbitrary (Sealed2 (prim :> prim :> prim))
> > +           , Arbitrary (Sealed2 (FL prim :> FL prim))
> > +           ) => prim C(x y) -> [Test]
> > +qc_prim _ =
> >    [ testProperty "Checking Prim invert symmetry..."
> > hunk ./src/Darcs/Test/Patch.hs 138
> > -    (unseal2 $ Prop.invertSymmetry :: Sealed2 Prim -> TestResult)
> > +    (unseal2 $ Prop.invertSymmetry :: Sealed2 prim -> TestResult)
> >    , testProperty "Checking FL Prim invert symmetry..."
> > hunk ./src/Darcs/Test/Patch.hs 140
> > -    (unseal2 $ Prop.invertSymmetry :: Sealed2 (FL Prim) -> TestResult)
> > +    (unseal2 $ Prop.invertSymmetry :: Sealed2 (FL prim) -> TestResult)
> >    , testProperty "Checking Prim invert rollback..."
> > hunk ./src/Darcs/Test/Patch.hs 142
> > -    (unseal2 $ Prop.invertRollback :: Sealed2 (WithState RepoModel Prim)
> -> TestResult)
> > +    (unseal2 $ Prop.invertRollback :: Sealed2 (WithState RepoModel prim)
> -> TestResult)
> >    , testProperty "Checking FL Prim invert rollback..."
> > hunk ./src/Darcs/Test/Patch.hs 144
> > -    (unseal2 $ Prop.invertRollback :: Sealed2 (WithState RepoModel (FL
> Prim)) -> TestResult)
> > +    (unseal2 $ Prop.invertRollback :: Sealed2 (WithState RepoModel (FL
> prim)) -> TestResult)
> >    , testConditional "Checking Prim effect preserving..."
> > hunk ./src/Darcs/Test/Patch.hs 146
> > -    (unseal2 $ nonEmptyHunksPair . wsPatch)
> > -    (unseal2 $ Prop.effectPreserving commute :: Sealed2 (WithState
> RepoModel (Prim :> Prim)) -> TestResult)
> > +    (unseal2 $ P1.nonEmptyHunksPair . wsPatch)
> > +    (unseal2 $ Prop.effectPreserving commute :: Sealed2 (WithState
> RepoModel (prim :> prim)) -> TestResult)
> >    , testConditional "Checking FL Prim effect preserving..."
> > hunk ./src/Darcs/Test/Patch.hs 149
> > -    (unseal2 $ nonEmptyHunksFLPair . wsPatch)
> > -    (unseal2 $ Prop.effectPreserving commute :: Sealed2 (WithState
> RepoModel (FL Prim :> FL Prim)) -> TestResult)
> > +    (unseal2 $ P1.nonEmptyHunksFLPair . wsPatch)
> > +    (unseal2 $ Prop.effectPreserving commute :: Sealed2 (WithState
> RepoModel (FL prim :> FL prim)) -> TestResult)
> >    , testProperty "Checking Prim recommute..."
> > hunk ./src/Darcs/Test/Patch.hs 152
> > -    (unseal2 $ Prop.recommute commute :: Sealed2 (Prim :> Prim) ->
> TestResult)
> > +    (unseal2 $ Prop.recommute commute :: Sealed2 (prim :> prim) ->
> TestResult)
> >    , testProperty "Checking FL Prim recommute..."
> > hunk ./src/Darcs/Test/Patch.hs 154
> > -    (unseal2 $ Prop.recommute commute :: Sealed2 (FL Prim :> FL Prim) ->
> TestResult)
> > +    (unseal2 $ Prop.recommute commute :: Sealed2 (FL prim :> FL prim) ->
> TestResult)
> >    , testProperty "Checking Prim inverses commute..."
> > hunk ./src/Darcs/Test/Patch.hs 156
> > -    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (Prim :> Prim) ->
> TestResult)
> > +    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (prim :> prim) ->
> TestResult)
> >    , testProperty "Checking FL Prim inverses commute..."
> > hunk ./src/Darcs/Test/Patch.hs 158
> > -    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (FL Prim :> FL
> Prim) -> TestResult)
> > +    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (FL prim :> FL
> prim) -> TestResult)
> >      --do putStr "Checking with quickcheck that real patches have
> consistent flattenings... "
> >      --   quickCheck (not . isBottomTimeOut (Just 10) .
> propConsistentTreeFlattenings) >> return 0
> >      -- The following fails because of setpref patches...
> > hunk ./src/Darcs/Test/Patch.hs 165
> >      --,do putStr "Checking prim inverse doesn't commute using
> QuickCheck... "
> >      --    simpleCheck (inverseDoesntCommute :: Prim -> Maybe Doc)
> >    , testProperty "Checking prim join effect preserving... "
> > -    (unseal2 (Prop.joinEffectPreserving join :: WithState RepoModel
> (Prim :> Prim) C(x y) -> TestResult))
> > +    (unseal2 $ Prop.joinEffectPreserving join :: Sealed2 (WithState
> RepoModel (prim :> prim)) -> TestResult)
> >    , testConditional "Checking prim join commute using QuickCheck... "
> > hunk ./src/Darcs/Test/Patch.hs 167
> > -    (unseal2 nonEmptyHunksTriple)
> > -    (unseal2 (Prop.joinCommute join :: (Prim :> Prim :> Prim) C(x y) ->
> TestResult))
> > +    (unseal2 P1.nonEmptyHunksTriple)
> > +    (unseal2 $ Prop.joinCommute join :: Sealed2 (prim :> prim :> prim)
> -> TestResult)
> >      --,do putStr "Checking prim recommute using QuickCheck... "
> >      --    simpleCheck (recommute
> >      --                 (commute :: Prim :> Prim
> > hunk ./src/Darcs/Test/Patch.hs 173
> >      --                          -> Maybe (Prim :> Prim)))
> > -  , testProperty "Checking that readPatch and showPatch work on
> RealPatch... "
> > +  ]
> > +
> > +qc_V2P1 :: [Test]
> > +qc_V2P1 =
> > +  [ testProperty "Checking that readPatch and showPatch work on
> RealPatch... "
> >      (unseal $ patchFromTree $ (Prop.show_read :: RealPatch Prim C(x y)
> -> TestResult))
> >    , testProperty "Checking that readPatch and showPatch work on FL
> RealPatch... "
> >      (unseal2 $ (Prop.show_read :: FL (RealPatch Prim) C(x y) ->
> TestResult))
> > hunk ./src/Darcs/Test/Patch.hs 184
> >    , testProperty "Checking that tree flattenings are consistent... "
> >      Prop.propConsistentTreeFlattenings
> >    , testProperty "Checking with quickcheck that real patches are
> consistent... "
> > -    (unseal $ patchFromTree $ fromMaybe . isConsistent)
> > +    (unseal $ P1.patchFromTree $ fromMaybe . isConsistent)
> >
> >    , testProperty "Checking we can do merges using QuickCheck"
> >      (isNothing . (Prop.propIsMergeable ::
> > hunk ./src/Darcs/Test/Patch.hs 191
> >                       Sealed (WithStartState RepoModel (Tree Prim))
> >                       -> Maybe (Tree (RealPatch Prim) C(x))))
> >    , testProperty "Checking recommute using QuickCheck Tree generator"
> > -    (unseal $ commutePairFromTree $ Prop.recommute commuteReals)
> > +    (unseal $ P1.commutePairFromTree $ Prop.recommute commuteReals)
> >    , testProperty "Checking recommute using QuickCheck TWFP generator"
> > hunk ./src/Darcs/Test/Patch.hs 193
> > -    (unseal $ commutePairFromTWFP $ Prop.recommute commuteReals)
> > +    (unseal $ P1.commutePairFromTWFP $ Prop.recommute commuteReals)
> >    , testConditional "Checking nontrivial recommute"
> > hunk ./src/Darcs/Test/Patch.hs 195
> > -    (unseal $ commutePairFromTree $ nontrivialReals)
> > -    (unseal $ commutePairFromTree $ Prop.recommute commuteReals)
> > +    (unseal $ P1.commutePairFromTree $ nontrivialReals)
> > +    (unseal $ P1.commutePairFromTree $ Prop.recommute commuteReals)
> >    , testConditional "Checking nontrivial recommute using TWFP"
> > hunk ./src/Darcs/Test/Patch.hs 198
> > -    (unseal $ commutePairFromTWFP $ nontrivialReals)
> > -    (unseal $ commutePairFromTWFP $ Prop.recommute commuteReals)
> > +    (unseal $ P1.commutePairFromTWFP $ nontrivialReals)
> > +    (unseal $ P1.commutePairFromTWFP $ Prop.recommute commuteReals)
> >
> >    , testProperty "Checking inverses commute using QuickCheck Tree
> generator"
> > hunk ./src/Darcs/Test/Patch.hs 202
> > -    (unseal $ commutePairFromTree $
> > +    (unseal $ P1.commutePairFromTree $
> >       (Prop.commuteInverses commuteReals))
> >    , testProperty "Checking inverses commute using QuickCheck TWFP
> generator"
> > hunk ./src/Darcs/Test/Patch.hs 205
> > -    (unseal $ commutePairFromTWFP $ Prop.commuteInverses commuteReals)
> > +    (unseal $ P1.commutePairFromTWFP $ Prop.commuteInverses
> commuteReals)
> >    , testConditional "Checking nontrivial inverses commute"
> > hunk ./src/Darcs/Test/Patch.hs 207
> > -    (unseal $ commutePairFromTree $ nontrivialReals)
> > -    (unseal $ commutePairFromTree $ Prop.commuteInverses commuteReals)
> > +    (unseal $ P1.commutePairFromTree $ nontrivialReals)
> > +    (unseal $ P1.commutePairFromTree $ Prop.commuteInverses
> commuteReals)
> >    , testConditional "Checking nontrivial inverses commute using TWFP"
> > hunk ./src/Darcs/Test/Patch.hs 210
> > -    (unseal $ commutePairFromTWFP $ nontrivialReals)
> > -    (unseal $ commutePairFromTWFP $ Prop.commuteInverses commuteReals)
> > +    (unseal $ P1.commutePairFromTWFP $ nontrivialReals)
> > +    (unseal $ P1.commutePairFromTWFP $ Prop.commuteInverses
> commuteReals)
> >
> >    , testProperty "Checking merge either way using QuickCheck TWFP
> generator"
> > hunk ./src/Darcs/Test/Patch.hs 214
> > -    (unseal $ mergePairFromTWFP $ mergeEitherWayReals)
> > +    (unseal $ P1.mergePairFromTWFP $ mergeEitherWayReals)
> >    , testProperty "Checking merge either way using QuickCheck Tree
> generator"
> > hunk ./src/Darcs/Test/Patch.hs 216
> > -    (unseal $ mergePairFromTree $ mergeEitherWayReals)
> > +    (unseal $ P1.mergePairFromTree $ mergeEitherWayReals)
> >    , testConditional "Checking nontrivial merge either way"
> > hunk ./src/Darcs/Test/Patch.hs 218
> > -    (unseal $ mergePairFromTree $ nontrivialMergeReals)
> > -    (unseal $ mergePairFromTree $ mergeEitherWayReals)
> > +    (unseal $ P1.mergePairFromTree $ nontrivialMergeReals)
> > +    (unseal $ P1.mergePairFromTree $ mergeEitherWayReals)
> >    , testConditional "Checking nontrivial merge either way using TWFP"
> > hunk ./src/Darcs/Test/Patch.hs 221
> > -    (unseal $ mergePairFromTWFP $ nontrivialMergeReals)
> > -    (unseal $ mergePairFromTWFP $ mergeEitherWayReals)
> > +    (unseal $ P1.mergePairFromTWFP $ nontrivialMergeReals)
> > +    (unseal $ P1.mergePairFromTWFP $ mergeEitherWayReals)
> >
> >    , testConditional "Checking permutivity"
> > hunk ./src/Darcs/Test/Patch.hs 225
> > -    (unseal $ commuteTripleFromTree notDuplicatestriple)
> > -    (unseal $ commuteTripleFromTree $ Prop.permutivity commuteReals)
> > +    (unseal $ P1.commuteTripleFromTree notDuplicatestriple)
> > +    (unseal $ P1.commuteTripleFromTree $ Prop.permutivity commuteReals)
> >    , testConditional "Checking partial permutivity"
> > hunk ./src/Darcs/Test/Patch.hs 228
> > -    (unseal $ commuteTripleFromTree notDuplicatestriple)
> > -    (unseal $ commuteTripleFromTree $ Prop.partialPermutivity
> commuteReals)
> > +    (unseal $ P1.commuteTripleFromTree notDuplicatestriple)
> > +    (unseal $ P1.commuteTripleFromTree $ Prop.partialPermutivity
> commuteReals)
> >    , testConditional "Checking nontrivial permutivity"
> > hunk ./src/Darcs/Test/Patch.hs 231
> > -    (unseal $ commuteTripleFromTree (\t -> nontrivialTriple t &&
> notDuplicatestriple t))
> > -    (unseal $ commuteTripleFromTree $ (Prop.permutivity commuteReals))
> > +    (unseal $ P1.commuteTripleFromTree (\t -> nontrivialTriple t &&
> notDuplicatestriple t))
> > +    (unseal $ P1.commuteTripleFromTree $ (Prop.permutivity
> commuteReals))
> >    ]
> >
> > hunk ./src/Darcs/Test/Patch.hs 235
> > -patchPropertyTests :: [Test]
> > -patchPropertyTests =
> > +qc_V1P1 :: [Test]
> > +qc_V1P1 =
> >    [
> >      testProperty "Checking that show and read work right" (unseal
> Prop.propReadShow)
> >    ]
> > hunk ./src/Darcs/Test/Patch.hs 272
> >
> >  -- | This is the big list of tests that will be run using testrunner.
> >  testSuite :: [Test]
> > -testSuite = [ testGroup "Darcs.Patch (Properties.GenericUnwitnessed +
> Examples.Set3Unwitnessed)" patchUnitTests
> > -            , testGroup "Darcs.Patch (Properties.Generic + Arbitrary)"
> patchUnitTests2
> > -            , testGroup "Darcs.Patch (Properties.V1Set2 + Arbitrary)"
> patchPropertyTests
> > -            , testGroup "Darcs.Patch (Properties.V1Set1 +
> Examples.Set1)" patchExampleTests
> > +testSuite = [ testGroup "Darcs.Patch.Prim.V1" $ qc_prim (undefined ::
> Prim C(x y))
> > +            , testGroup "Darcs.Patch.V1 (using Prim.V1)" $ unit_V1P1 ++
> qc_V1P1
> > +            , testGroup "Darcs.Patch.V2 (using Prim.V1)" $ unit_V2P1 ++
> qc_V2P1
> >              , Darcs.Test.Patch.Info.testSuite
> >              ]
> > [Generalise the V1.Prim Arbitrary instance based on Tree to any
> PrimPatch.
> > Petr Rockai <me at mornfall.net>**20110620123027
> >  Ignore-this: 289e1227afffcec6484ce10a477f977a
> > ] hunk ./src/Darcs/Test/Patch/Arbitrary/Generic.hs 31
> >  import Darcs.Patch.Patchy ( Invert(..), Commute(..) )
> >  import Darcs.Patch.Prim ( PrimOf, PrimPatch, PrimPatchBase,
> FromPrim(..), move )
> >  import Darcs.Patch.Prim.V1 ()
> > +import Darcs.Patch.V2 ( RealPatch ) -- XXX this is more or less a hack
> >  --import Darcs.ColorPrinter ( errorDoc )
> >  --import Darcs.ColorPrinter ( traceDoc )
> >  import Darcs.Witnesses.Show
> > hunk ./src/Darcs/Test/Patch/Arbitrary/Generic.hs 222
> >  getTriples (_:>:NilFL) = []
> >  getTriples (_:>:_:>:NilFL) = []
> >  getTriples (a:>:b:>:c:>:d) = seal2 (a:>b:>c) : getTriples (b:>:c:>:d)
> > +
> > +instance ArbitraryPrim prim => Arbitrary (Sealed (WithStartState
> RepoModel (TreeWithFlattenPos prim))) where
> > +   arbitrary = do Sealed (WithStartState rm t) <- arbitrary
> > +                  let num = unseal (length . getPairs) (flattenOneRP t)
> > +                  if num == 0 then return $ Sealed $ WithStartState rm $
> TWFP 0 NilTree
> > +                    else do n <- choose (0, num - 1)
> > +                            return $ Sealed $ WithStartState rm $ TWFP n
> t
> > +                    where -- just used to get the length. In principle
> this should be independent of the patch type.
> > +                          flattenOneRP :: Tree prim C(x) -> Sealed (FL
> (RealPatch prim) C(x))
> > +                          flattenOneRP = flattenOne
> > +
> > hunk ./src/Darcs/Test/Patch/Arbitrary/Real.hs 19
> >  import Darcs.Witnesses.Sealed
> >  import Darcs.Witnesses.Eq
> >  import Darcs.Patch.Prim ( FromPrim(..) )
> > -import Darcs.Patch.Prim.V1 ( Prim )
> >
> >  #include "gadts.h"
> >
> > hunk ./src/Darcs/Test/Patch/Arbitrary/Real.hs 65
> >          Just (c' :> b'') -> (not (a `unsafeCompare` a') || not (b
> `unsafeCompare` b')) &&
> >                              (not (c' `unsafeCompare` c) || not (b''
> `unsafeCompare` b)) &&
> >                              (not (c'' `unsafeCompare` c) || not (a''
> `unsafeCompare` a'))
> > -
> > -instance Arbitrary (Sealed (WithStartState RepoModel (TreeWithFlattenPos
> Prim))) where
> > -   arbitrary = do Sealed (WithStartState rm t) <- arbitrary
> > -                  let num = unseal (length . getPairs) (flattenOneRP t)
> > -                  if num == 0 then return $ Sealed $ WithStartState rm $
> TWFP 0 NilTree
> > -                    else do n <- choose (0, num - 1)
> > -                            return $ Sealed $ WithStartState rm $ TWFP n
> t
> > -                    where -- just used to get the length. In principle
> this should be independent of the patch type.
> > -                          flattenOneRP :: Tree Prim C(x) -> Sealed (FL
> (RealPatch Prim) C(x))
> > -                          flattenOneRP = flattenOne
> > -
> > [Generalise a bunch of merge/commute properties over the patch type &
> generator.
> > Petr Rockai <me at mornfall.net>**20110620123354
> >  Ignore-this: fd5b45e576226d719531182bedd5ac9d
> > ] hunk ./src/Darcs/Test/Patch.hs 1
> > +{-# OPTIONS_GHC -fno-warn-orphans #-}
> >  --  Copyright (C) 2002-2005,2007 David Roundy
> >  --
> >  --  This program is free software; you can redistribute it and/or modify
> > hunk ./src/Darcs/Test/Patch.hs 26
> >  import Test.Framework.Providers.HUnit ( testCase )
> >  import Test.Framework.Providers.QuickCheck2 ( testProperty )
> >  import Test.QuickCheck.Arbitrary( Arbitrary )
> > +import Test.QuickCheck( Testable )
> >  import Test.HUnit ( assertBool )
> >
> >  import Darcs.Test.Util.TestResult ( TestResult, isOk, fromMaybe )
> > hunk ./src/Darcs/Test/Patch.hs 38
> >  import Darcs.Witnesses.Show
> >  import Darcs.Patch.Prim( PrimPatch, join, FromPrim, PrimOf,
> PrimPatchBase )
> >  import Darcs.Patch.Prim.V1 ( Prim )
> > +import qualified Darcs.Patch.V1 as V1
> >  import Darcs.Patch.V2.Real ( isConsistent, isForward, RealPatch )
> > hunk ./src/Darcs/Test/Patch.hs 40
> > -import Darcs.Patch.Patchy ( Commute(..) )
> > +import Darcs.Patch.RepoPatch( RepoPatch )
> > +import Darcs.Patch.Patchy ( Commute(..), Patchy )
> >
> >  import Darcs.Test.Patch.Arbitrary.Generic
> >  import qualified Darcs.Test.Patch.Arbitrary.PrimV1 as P1
> > hunk ./src/Darcs/Test/Patch.hs 120
> >    , runPrimitiveTests "real partial permutivity"
> (PropU.partialPermutivity WSub.commute) ExU.realNonduplicateTriples
> >    ]
> >
> > +instance Check (RealPatch Prim) where
> > +  checkPatch p = return $ isNothing $ isConsistent p
> > +
> >  commuteReals :: PrimPatch prim => (RealPatch prim :> RealPatch prim) C(x
> y) -> Maybe ((RealPatch prim :> RealPatch prim) C(x y))
> >  commuteReals = commute
> >
> > hunk ./src/Darcs/Test/Patch.hs 126
> > -mergeEitherWayReals :: PrimPatch prim => (RealPatch prim :\/: RealPatch
> prim) C(x y) -> TestResult
> > -mergeEitherWayReals = Prop.mergeEitherWay
> > -
> >  qc_prim :: forall prim C(x y a).
> >             (PrimPatch prim, ArbitraryPrim prim, Show2 prim
> >             , Check prim, PrimPatchBase prim, PrimOf prim ~ prim
> > hunk ./src/Darcs/Test/Patch.hs 130
> >             , FromPrim prim
> > +           , Arbitrary (Sealed ((prim :> prim) C(a)))
> > +           , Arbitrary (Sealed ((FL prim :> FL prim) C(a)))
> > +           , Show1 ((PrimOf prim :> PrimOf prim) C(a))
> >             , Arbitrary (Sealed2 prim)
> >             , Arbitrary (Sealed2 (WithState RepoModel prim))
> >             , Arbitrary (Sealed2 (WithState RepoModel (prim :> prim)))
> > hunk ./src/Darcs/Test/Patch.hs 158
> >    , testConditional "Checking FL Prim effect preserving..."
> >      (unseal2 $ P1.nonEmptyHunksFLPair . wsPatch)
> >      (unseal2 $ Prop.effectPreserving commute :: Sealed2 (WithState
> RepoModel (FL prim :> FL prim)) -> TestResult)
> > -  , testProperty "Checking Prim recommute..."
> > -    (unseal2 $ Prop.recommute commute :: Sealed2 (prim :> prim) ->
> TestResult)
> > -  , testProperty "Checking FL Prim recommute..."
> > -    (unseal2 $ Prop.recommute commute :: Sealed2 (FL prim :> FL prim) ->
> TestResult)
> > -  , testProperty "Checking Prim inverses commute..."
> > -    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (prim :> prim) ->
> TestResult)
> > -  , testProperty "Checking FL Prim inverses commute..."
> > -    (unseal2 $ Prop.commuteInverses commute :: Sealed2 (FL prim :> FL
> prim) -> TestResult)
> >      --do putStr "Checking with quickcheck that real patches have
> consistent flattenings... "
> >      --   quickCheck (not . isBottomTimeOut (Just 10) .
> propConsistentTreeFlattenings) >> return 0
> >      -- The following fails because of setpref patches...
> > hunk ./src/Darcs/Test/Patch.hs 172
> >      --    simpleCheck (recommute
> >      --                 (commute :: Prim :> Prim
> >      --                          -> Maybe (Prim :> Prim)))
> > -  ]
> > +  ] ++ commute_properties (undefined :: prim C(x y)) "arbitrary"
> arbitraryCommutePair
> > +    ++ commute_properties (undefined :: FL prim C(x y)) "arbitrary FL"
> arbitraryFLCommutePair
> > +    where arbitraryCommutePair
> > +            :: (FORALL(xx yy) (prim :> prim) C(xx yy) -> t) ->
> > +               ((prim :> prim) C(a bb) -> t)
> > +          arbitraryCommutePair f p = f p
> > +          arbitraryFLCommutePair :: (FORALL(xx yy) (FL prim :> FL prim)
> C(xx yy) -> t) ->
> > +                                    ((FL prim :> FL prim) C(a bb) -> t)
> > +          arbitraryFLCommutePair f p = f p
> >
> >  qc_V2P1 :: [Test]
> >  qc_V2P1 =
> > hunk ./src/Darcs/Test/Patch.hs 184
> > +  -- utilities
> ------------------------------------------------------------------------------
> >    [ testProperty "Checking that readPatch and showPatch work on
> RealPatch... "
> >      (unseal $ patchFromTree $ (Prop.show_read :: RealPatch Prim C(x y)
> -> TestResult))
> >    , testProperty "Checking that readPatch and showPatch work on FL
> RealPatch... "
> > hunk ./src/Darcs/Test/Patch.hs 198
> >      (isNothing . (Prop.propIsMergeable ::
> >                       Sealed (WithStartState RepoModel (Tree Prim))
> >                       -> Maybe (Tree (RealPatch Prim) C(x))))
> > -  , testProperty "Checking recommute using QuickCheck Tree generator"
> > -    (unseal $ P1.commutePairFromTree $ Prop.recommute commuteReals)
> > -  , testProperty "Checking recommute using QuickCheck TWFP generator"
> > -    (unseal $ P1.commutePairFromTWFP $ Prop.recommute commuteReals)
> > -  , testConditional "Checking nontrivial recommute"
> > -    (unseal $ P1.commutePairFromTree $ nontrivialReals)
> > -    (unseal $ P1.commutePairFromTree $ Prop.recommute commuteReals)
> > -  , testConditional "Checking nontrivial recommute using TWFP"
> > -    (unseal $ P1.commutePairFromTWFP $ nontrivialReals)
> > -    (unseal $ P1.commutePairFromTWFP $ Prop.recommute commuteReals)
> > -
> > -  , testProperty "Checking inverses commute using QuickCheck Tree
> generator"
> > -    (unseal $ P1.commutePairFromTree $
> > -     (Prop.commuteInverses commuteReals))
> > -  , testProperty "Checking inverses commute using QuickCheck TWFP
> generator"
> > -    (unseal $ P1.commutePairFromTWFP $ Prop.commuteInverses
> commuteReals)
> > -  , testConditional "Checking nontrivial inverses commute"
> > -    (unseal $ P1.commutePairFromTree $ nontrivialReals)
> > -    (unseal $ P1.commutePairFromTree $ Prop.commuteInverses
> commuteReals)
> > -  , testConditional "Checking nontrivial inverses commute using TWFP"
> > -    (unseal $ P1.commutePairFromTWFP $ nontrivialReals)
> > -    (unseal $ P1.commutePairFromTWFP $ Prop.commuteInverses
> commuteReals)
> > -
> > -  , testProperty "Checking merge either way using QuickCheck TWFP
> generator"
> > -    (unseal $ P1.mergePairFromTWFP $ mergeEitherWayReals)
> > -  , testProperty "Checking merge either way using QuickCheck Tree
> generator"
> > -    (unseal $ P1.mergePairFromTree $ mergeEitherWayReals)
> > -  , testConditional "Checking nontrivial merge either way"
> > -    (unseal $ P1.mergePairFromTree $ nontrivialMergeReals)
> > -    (unseal $ P1.mergePairFromTree $ mergeEitherWayReals)
> > -  , testConditional "Checking nontrivial merge either way using TWFP"
> > -    (unseal $ P1.mergePairFromTWFP $ nontrivialMergeReals)
> > -    (unseal $ P1.mergePairFromTWFP $ mergeEitherWayReals)
> >
> > hunk ./src/Darcs/Test/Patch.hs 199
> > +  -- permutivity
> ----------------------------------------------------------------------------
> >    , testConditional "Checking permutivity"
> >      (unseal $ P1.commuteTripleFromTree notDuplicatestriple)
> >      (unseal $ P1.commuteTripleFromTree $ Prop.permutivity commuteReals)
> > hunk ./src/Darcs/Test/Patch.hs 209
> >    , testConditional "Checking nontrivial permutivity"
> >      (unseal $ P1.commuteTripleFromTree (\t -> nontrivialTriple t &&
> notDuplicatestriple t))
> >      (unseal $ P1.commuteTripleFromTree $ (Prop.permutivity
> commuteReals))
> > +
> > +  ] ++ merge_properties (undefined :: RealPatch Prim C(x y)) "tree"
> mergePairFromTree
> > +    ++ merge_properties (undefined :: RealPatch Prim C(x y)) "twfp"
> mergePairFromTWFP
> > +    ++ commute_properties (undefined :: RealPatch Prim C(x y)) "tree"
> commutePairFromTree
> > +    ++ commute_properties (undefined :: RealPatch Prim C(x y)) "twfp"
> commutePairFromTWFP
> > +
> > +commute_properties :: forall p x y gen. (Check p, ArbitraryPrim (PrimOf
> p), FromPrim p
> > +                                       , Show2 p, Show2 (PrimOf p),
> Patchy p
> > +                                       , Show1 gen, Arbitrary (Sealed
> gen))
> > +                 => p C(x y) -> String ->
> > +                    (FORALL(ctx t) ((FORALL(xx yy) (p :> p) xx yy -> t)
> -> (gen ctx -> t))) ->
> > +                    [Test]
> > +commute_properties _ genname gen =
> > +  [ prop "recommute" $ Prop.recommute commute
> > +  , cond "nontrivial recommute" nontrivialCommute $ Prop.recommute
> commute
> > +  , prop "inverses commute" $ Prop.commuteInverses commute
> > +  , cond "nontrivial inverses" nontrivialCommute $ Prop.commuteInverses
> commute
> >    ]
> > hunk ./src/Darcs/Test/Patch.hs 227
> > +  where prop :: String -> (FORALL (yy zz) (p :> p) C(yy zz) ->
> TestResult) -> Test
> > +        prop t p = cond t (const True) p
> > +        cond :: String ->
> > +                (FORALL (yy zz) (p :> p) C(yy zz) -> Bool) ->
> > +                (FORALL (yy zz) (p :> p) C(yy zz) -> TestResult) -> Test
> > +        cond t c p =
> > +          testConditional ("commute (" ++ genname ++ "): " ++ t)
> > +          (unseal $ gen c) (unseal $ gen p)
> > +
> > +merge_properties :: forall p x y gen. (Check p, ArbitraryPrim (PrimOf
> p), FromPrim p
> > +                                      , Show2 p, Show2 (PrimOf p),
> RepoPatch p
> > +                                      , Show1 gen, Arbitrary (Sealed
> gen))
> > +                 => p C(x y) -> String ->
> > +                    (FORALL(ctx t) ((FORALL(xx yy) (p :\/: p) xx yy ->
> t) -> (gen ctx -> t))) ->
> > +                    [Test]
> > +merge_properties _ genname gen =
> > +    [ prop "merge swap" Prop.tMergeSwapMerge
> > +    , prop "merge either way" Prop.mergeEitherWay
> > +    , prop "merge either way valid" Prop.tMergeEitherWayValid
> > +    , cond "nontrivial merge either way" nontrivialMerge
> Prop.mergeEitherWay
> > +    ]
> > +  where prop :: Testable t => String -> (FORALL (yy zz) (p :\/: p) C(yy
> zz) -> t) -> Test
> > +        prop t p = cond t (const True) p
> > +        cond :: (Testable t) => String ->
> > +                (FORALL (yy zz) (p :\/: p) C(yy zz) -> Bool) ->
> > +                (FORALL (yy zz) (p :\/: p) C(yy zz) -> t) -> Test
> > +        cond t c p =
> > +          testConditional ("merge (" ++ genname ++ "): " ++ t)
> > +          (unseal $ gen c) (unseal $ gen p)
> >
> >  qc_V1P1 :: [Test]
> >  qc_V1P1 =
> > hunk ./src/Darcs/Test/Patch.hs 269
> >    [ testProperty "Checking that commuting by patch and its inverse is
> ok" Prop.propCommuteInverse
> >     --putStr "Checking that conflict resolution is valid... "
> >     --runQuickCheckTest returnval propResolveConflictsValid
> > -  , testProperty "Checking that a patch followed by its inverse is
> identity" Prop.propPatchAndInverseIsIdentity
> > +  , testProperty "Checking that a patch followed by its inverse is
> identity"
> > +    Prop.propPatchAndInverseIsIdentity
> >    , testProperty "Checking 'simple smart merge'"
> Prop.propSimpleSmartMergeGoodEnough
> >    , testProperty "Checking that commutes are equivalent"
> Prop.propCommuteEquivalency
> >    , testProperty "Checking that merges are valid" Prop.propMergeValid
> > hunk ./src/Darcs/Test/Patch.hs 291
> >    , testProperty "Checking that merges commute and are well behaved"
> Prop.propMergeIsCommutableAndCorrect
> >    , testProperty "Checking that merges can be swapped"
> Prop.propMergeIsSwapable
> >    , testProperty "Checking again that merges can be swapped (I'm
> paranoid) " Prop.propMergeIsSwapable
> > -  ]
> > +
> > +  ] -- the following properties are disabled, because they routinely
> lead to
> > +    -- exponential cases, making the tests run for ever and ever;
> nevertheless,
> > +    -- we would expect them to hold
> > + {- ++ merge_properties (undefined :: V1.Patch Prim C(x y)) "tree"
> mergePairFromTree
> > +    ++ merge_properties (undefined :: V1.Patch Prim C(x y)) "twfp"
> mergePairFromTWFP
> > +    ++ commute_properties (undefined :: V1.Patch Prim C(x y)) "tree"
> commutePairFromTree
> > +    ++ commute_properties (undefined :: V1.Patch Prim C(x y)) "twfp"
> commutePairFromTWFP -}
> >
> >  -- | This is the big list of tests that will be run using testrunner.
> >  testSuite :: [Test]
> > hunk ./src/Darcs/Test/Patch/Arbitrary/Generic.hs 63
> >  instance Show2 p => Show1 (Tree p) where
> >      showDict1 = ShowDictClass
> >
> > +instance Show2 p => Show1 (TreeWithFlattenPos p) where
> > +    showDict1 = ShowDictClass
> > +
> >  sizeTree :: Tree p C(x) -> Int
> >  sizeTree NilTree = 0
> >  sizeTree (SeqTree _ t) = 1 + sizeTree t
> > hunk ./src/Darcs/Test/Patch/Arbitrary/PrimV1.hs 18
> >  import Darcs.Witnesses.Eq
> >  import Darcs.Witnesses.Unsafe
> >  import Darcs.Witnesses.Ordered
> > -import Darcs.Witnesses.Show
> > +-- import Darcs.Witnesses.Show
> >  import Darcs.Patch.Prim.V1 ()
> >  import Darcs.Patch.Prim.V1.Core ( FilePatchType( Hunk, TokReplace ),
> Prim( FP ), isIdentity )
> >  import Darcs.Patch.RepoPatch ( RepoPatch )
> > hunk ./src/Darcs/Test/Patch/Arbitrary/PrimV1.hs 84
> >    arbitrary = do repo <- aSmallRepo
> >                   liftM (unseal (seal2 . wesPatch)) $ arbitraryState repo
> >
> > -instance Show1 (TreeWithFlattenPos Prim) where
> > -   showDict1 = ShowDictClass
> > +-- instance Show1 (TreeWithFlattenPos Prim) where
> > +--   showDict1 = ShowDictClass
> >
> >  -- WithState and propFail are handy for debugging arbitrary code
> >  propFail :: Int -> Tree Prim C(x) -> Bool
> > hunk ./src/Darcs/Test/Patch/Arbitrary/PrimV1.hs 339
> >                   WithEndState pp _ <- aPrimPair repo
> >                   return $ seal2 pp
> >
> > +instance Arbitrary (Sealed ((Prim :> Prim) C(a))) where
> > +  arbitrary = do repo <- aSmallRepo
> > +                 WithEndState pp _ <- aPrimPair repo
> > +                 return $ seal pp
> > +
> >  instance Arbitrary (Sealed2 (Prim :> Prim :> Prim)) where
> >    arbitrary = makeGen aSmallRepo
> >
> > hunk ./src/Darcs/Test/Patch/Arbitrary/PrimV1.hs 353
> >  instance Arbitrary (Sealed2 (FL Prim :> FL Prim)) where
> >    arbitrary = makeGen aSmallRepo
> >
> > +instance Arbitrary (Sealed ((FL Prim :> FL Prim) C(a))) where
> > +  arbitrary = makeSGen aSmallRepo
> >
> >  instance Arbitrary (Sealed2 (WithState RepoModel Prim)) where
> >    arbitrary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20110711/45300f31/attachment-0001.html>


More information about the darcs-devel mailing list