[Haskell-cafe] about import alias

Daniel Fischer daniel.is.fischer at web.de
Sat Apr 4 11:43:35 EDT 2009


Am Samstag 04 April 2009 17:33:55 schrieb Manlio Perillo:
> Hi.
>
> Haskell 98 allows import alias:
>      import qualified VeryLongModuleName as C
>
> however it does not allow aliasing for imported names
>      import NormalModule (veryLongFunctionName as C)
>
>
> what is the rational?
> IMHO this can be very useful in some cases.
>

You can always do

{-# INLINE short #-}
short = 
C.veryLongFunctionNameThatIReallyDoNotWantToTypeOutEveryTimeIUseIt

so it's not necessary.

>
>
> Thanks  Manlio



More information about the Haskell-Cafe mailing list