Moral transliteration of the imvujs Promise class into Haskell