I want to sort my imports by name, qualified and unqualified
import A
import qualified B
import C
import qualified D
But there are big gaps in code, and lines are long, so I want to shorten it
{-# LANGUAGE CPP #-}
#define importq import qualified
import A
importq B
import C
importq D
It looks great, but now I get error from CPP
error: invalid preprocessing directive #!
#!/usr/bin/env runhaskell
^
phase `C pre-processor' failed (exitcode = 1)
if I want to run my program with help of shebang. CPP confilcts with shebangs.
How to deal with this problem? Is there another simple macro system allowing to make an alias importq = import qualified
? Or is there another way to shorten import qualified
?