diff --git a/Example.binembed b/Example.binembed
new file mode 100644
--- /dev/null
+++ b/Example.binembed
@@ -0,0 +1,8 @@
+Example.binembed
+LICENSE
+Main_haskell.hs
+Makefile
+README
+Setup.hs
+binembed-example.cabal
+main_c.c
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c)2010, Claude Heiland-Allen
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Claude Heiland-Allen nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Main_haskell.hs b/Main_haskell.hs
new file mode 100644
--- /dev/null
+++ b/Main_haskell.hs
@@ -0,0 +1,24 @@
+import Prelude hiding  (putStr)
+import Data.ByteString (putStr, ByteString)
+import Data.Map (toAscList)
+import System.FilePath ((</>))
+import Example
+
+main :: IO ()
+main = do
+  putStrLn "binembed-example\n\
+           \================"
+  printEmbedded "binembed-example" =<< unBinEmbed example
+
+printEmbedded :: String -> Node ByteString -> IO ()
+printEmbedded path (File f) = do
+  putStrLn "\n"
+  putStrLn path
+  putStrLn (replicate (length path) '-')
+  putStrLn ""
+  putStrLn "{{{"
+  putStr f
+  putStrLn "}}}"
+
+printEmbedded path (Dir d) = do
+  mapM_ (\(p, n) -> printEmbedded (path </> p) n) (toAscList d)
diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+all: binembed-example
+
+clean:
+	rm -f binembed-example \
+	Example.s Example.h Example.c
+
+binembed-example: main_c.c Example.c Example.s
+	gcc -std=c99 -Wall -pedantic -O2 -o $@ $^
+
+%.s %.h %.c: %.binembed
+	binembed --output-s=$*.s --output-h=$*.h --output-c=$*.c $*.binembed
diff --git a/README b/README
new file mode 100644
--- /dev/null
+++ b/README
@@ -0,0 +1,16 @@
+binembed is designed to be as simple as possible to use.  This example
+package contains two programs, each of which print out the sources of
+the package.
+
+Usage from Haskell:
+  Example.binembed
+  Main_haskell.hs
+  Setup.hs
+  binembed-example.cabal
+  -- 'cabal sdist' is currently broken; use 'runhaskell Setup.hs sdist'
+
+Usage from C:
+  Example.binembed
+  main_c.c
+  Makefile
+  -- 'make install' is currently unimplemented
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,5 @@
+import Distribution.Simple
+import Distribution.Simple.BinEmbed
+
+main :: IO ()
+main = defaultMainWithHooks (withBinEmbed simpleUserHooks)
diff --git a/binembed-example.cabal b/binembed-example.cabal
new file mode 100644
--- /dev/null
+++ b/binembed-example.cabal
@@ -0,0 +1,38 @@
+Name:                binembed-example
+Version:             0.1
+Synopsis:            Example project using binembed to embed data in object files.
+Description:         binembed-example prints out its source code, embedded into it
+                     at compile time using the "binembed" package.
+
+Homepage:            http://gitorious.org/binembed
+License:             BSD3
+License-file:        LICENSE
+Author:              Claude Heiland-Allen
+Maintainer:          claudiusmaximus@goto10.org
+Category:            Distribution
+Build-type:          Custom
+Cabal-version:       >=1.6
+
+Extra-source-files:  main_c.c
+                     Makefile
+                     README
+
+Executable binembed-example
+  Main-is:             Main_haskell.hs
+  Other-modules:       Example
+  -- The next line is needed for the @withBinEmbed@ hooks to work:
+  x-binembed:          Example
+  Build-depends:       base >= 4 && < 5, bytestring >= 0.9 && < 0.10, filepath >= 1.1 && < 1.2, containers >= 0.3 && < 0.4, binembed >= 0.1 && < 0.2
+  GHC-options:         -Wall
+  GHC-prof-options:    -prof -auto-all
+
+Source-repository head
+  type:     git
+  location: git://gitorious.org/binembed/binembed.git
+  subdir:   example
+
+Source-repository this
+  type:     git
+  location: git://gitorious.org/binembed/binembed.git
+  subdir:   example
+  tag:      v0.1
diff --git a/main_c.c b/main_c.c
new file mode 100644
--- /dev/null
+++ b/main_c.c
@@ -0,0 +1,57 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "Example.h"
+
+#define SEP "/"
+
+void printEmbedded(char const *path, struct binembed_node const *node) {
+  int pathLength = 0;
+  char *pathBuffer = 0;
+  for (; node->type != binembed_none; ++node) {
+    switch (node->type) {
+      case binembed_file:
+        pathLength = strlen(path) + strlen(SEP) + strlen(node->name);
+        pathBuffer = malloc(pathLength + 1);
+        if (! pathBuffer) {
+          exit(1);
+        }
+        sprintf(pathBuffer, "%s%s%s", path, SEP, node->name);
+        printf("\n\n%s\n", pathBuffer);
+        for (int i = 0; i < pathLength; ++i) {
+          printf("-");
+        }
+        printf("\n\n{{{\n");
+        struct binembed_file const *f = node->content.file;
+        fflush(stdout);
+        if (1 != fwrite(f->data, f->size, 1, stdout)) {
+          exit(1);
+        }
+        fflush(stdout);
+        printf("}}}\n");
+        free(pathBuffer);
+        pathBuffer = 0;
+        break;
+      case binembed_dir:
+        pathLength = strlen(path) + strlen(SEP) + strlen(node->name);
+        pathBuffer = malloc(pathLength + 1);
+        if (! pathBuffer) {
+          exit(1);
+        }
+        sprintf(pathBuffer, "%s%s%s", path, SEP, node->name);
+        printEmbedded(pathBuffer, node->content.dir);
+        free(pathBuffer);
+        pathBuffer = 0;
+        break;
+      default:
+        break;
+    }
+  }
+}
+
+int main(int argc, char **argv) {
+  printf("binembed-example\n");
+  printf("================\n");
+  printEmbedded("binembed-example", Example);
+  return 0;
+}
