Index: pyyaml/trunk/lib/yaml/__init__.py
===================================================================
--- pyyaml/trunk/lib/yaml/__init__.py	(revision 136)
+++ pyyaml/trunk/lib/yaml/__init__.py	(revision 137)
@@ -12,5 +12,5 @@
 from representer import *
 
-from detector import *
+from resolver import *
 
 from tokens import *
@@ -197,5 +197,6 @@
     return dump_all([data], stream, Dumper=SafeDumper, **kwds)
 
-def add_detector(tag, regexp, first=None, Loader=Loader, Dumper=Dumper):
+def add_implicit_detector(tag, regexp, first=None,
+        Loader=Loader, Dumper=Dumper):
     """
     Add an implicit scalar detector.
@@ -204,8 +205,8 @@
     first is a sequence of possible initial characters or None.
     """
-    Loader.add_detector(tag, regexp, first)
-    Dumper.add_detector(tag, regexp, first)
-
-def add_resolver(tag, path, Loader=Loader):
+    Loader.add_implicit_resolver(tag, regexp, first)
+    Dumper.add_implicit_resolver(tag, regexp, first)
+
+def add_path_resolver(tag, path, kind=None, Loader=Loader, Dumper=Dumper):
     """
     Add a path based resolver for the given tag.
@@ -214,5 +215,6 @@
     Keys can be string values, integers, or None.
     """
-    Loader.add_resolver(tag, path)
+    Loader.add_path_resolver(tag, path, kind)
+    Dumper.add_path_resolver(tag, path, kind)
 
 def add_constructor(tag, constructor, Loader=Loader):
@@ -232,4 +234,13 @@
     """
     Loader.add_multi_constructor(tag_prefix, multi_constructor)
+
+def add_representer(data_type, representer, Dumper=Dumper):
+    """
+    Add a representer for the given type.
+    Representer is a function accepting a Dumper instance
+    and an instance of the given data type
+    and producing the corresponding representation node.
+    """
+    Dumper.add_representer(data_type, representer)
 
 class YAMLObjectMetaclass(type):
