add README.md and fix code examples in haddocks