Modified 'monad/base' module. Added types in tests.