extend/cowboy — pull request #456 by si14 (2013-02-28 22:36:00+00:00)
Title: Fix types in cowboy_router module, add opaque type constructor and fix hello_world example

Steps to reproduce a bug:

```
si14@si14-laptop:~/repos/cowboy-si14/examples/hello_world
> rebar get-deps compile
...

si14@si14-laptop:~/repos/cowboy-si14/examples/hello_world
> dialyzer --build_plt --output_plt .hello_world.plt --apps erts kernel stdlib crypto public_key deps/*
Creating PLT .hello_world.plt ...

si14@si14-laptop:~/repos/cowboy-si14/examples/hello_world
> dialyzer -r ebin --plt .hello_world.plt -Werror_handling -Wunmatched_returns
==> hello_world (compile)
Checking whether the PLT .hello_world.plt is up-to-date... yes
Proceeding with analysis...
hello_world_app.erl:13: Function start/2 has no local return
hello_world_app.erl:14: The call cowboy_router:compile([{'_',[{[47,...],'toppage_handler',[]},...]},...]) does not have an opaque term of type cowboy_router:routes() as 1st argument
done in 0m0.60s
done (warnings were emitted)

```

With this patches:

```
> dialyzer -r ebin --plt .hello_world.plt -Werror_handling -Wunmatched_returns
==> hello_world (compile)
Checking whether the PLT .hello_world.plt is up-to-date... yes
Proceeding with analysis... done in 0m0.57s
done (passed successfully)

```