1module Darcs.Patch.Debug ( PatchDebug(..) )where 2 3import Darcs.Patch.Witnesses.Ordered ( FL, RL ) 4 5-- | PatchDebug is a hook class for temporarily adding debug information. 6-- To use it, add any methods that are required, implement those methods 7-- where needed, and then make it available in the relevant contexts. 8-- For example it can be temporarily added as a superclass of `Patchy`. 9-- The advantage of having it here already is that everything is 10-- (or should be) declared as an instance of it, so you can use 11-- defaulting or just leave out declarations of instance methods and 12-- code will still compile. 13class PatchDebug p where 14 -- | A dummy method so we can export/import PatchDebug(..) without 15 -- triggering warnings 16 patchDebugDummy :: p wX wY -> () 17 patchDebugDummy _ = () 18 19instance PatchDebug p => PatchDebug (FL p) 20instance PatchDebug p => PatchDebug (RL p) 21