Fix random function in Prelude
Fix order of type class dictionaries passed to a function