[Haskell-cafe] Proposal: Shorter Import Syntax

Alexey Shmalko rasen.dubi at gmail.com
Thu Jun 4 00:43:02 UTC 2015


I like Richard's syntax more. The only note is that I'd like to omit
asterisk when it's last in line. Then the only case when * should be
stated is something semantically similar to

import Foo as F

(which I found silly anyway).

Here are more examples:
import Foo qualified            --> import qualified Foo
import Foo qualified as F       --> import qualified Foo as F
import Foo (foo) qualified as F --> import Foo as F (foo)
import Foo * qualified as F     --> import Foo as F

It doesn't seem to break backward compatibility for me (am I wrong?).

This syntax also fixes alignment of module names in import list. You
don't need to align anything because all module names are right after
"import".


More information about the Haskell-Cafe mailing list