[ghc-steering-committee] #216: Qualified Do again, recommendation: accept the alternative

Joachim Breitner mail at joachim-breitner.de
Thu Apr 16 15:11:12 UTC 2020


Hi,

Am Donnerstag, den 16.04.2020, 15:01 +0000 schrieb Simon Peyton Jones
via ghc-steering-committee:
> >  And you are sure that the complexity of this is more than that of
> >  “fully settled” types?
> 
> I didn't say that.  But I am sure that it's more complicated than 6.1
> without 6.1.2!   If I understand aright, the *only* gain is that one
> can omit three words:
>
> 	import qualified MyMonad


that’s fair… I guess with 6.1 we would imply

   To use qualified do, the recommended idiom is to import the module
   (1) qualified and
   (2) without an explicit import list.

Put like this, I think I can live it with it.


I still find it odd that those people who like to list all imports
explicitly would be forced to  write

   import qualified MyMonad ((>>))

   foo = MyMonad.do { a; b }

and then even have to adjust the import list when they write 

   foo = MyMonad.do { _ <- a; b }

instead. But yeah, saying “just don’t list your imports when you
qualify your module import” works indeed.


With that, I am happy to support 6.1 as well (but still prefer 6.1.2)

Cheers,
Joachim



-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/




More information about the ghc-steering-committee mailing list