[Haskell-cafe] Syntax extension - adding import support to let/where bindings

Oliver Charles ollie at ocharles.org.uk
Wed Aug 5 11:39:42 UTC 2015

On Wed, Aug 5, 2015 at 12:34 PM Yuras Shumovich <shumovichy at gmail.com>

> > I find myself wanting to be able to say something like:
> >
> > foo = ...
> >   where import Something.Specific
> Then GHC will need to parse all the source code in order to build
> dependency tree. Also people may want to build dependency tree in their
> minds too, it is easier with global imports (in the module header.)
> What about the next:
> -- In the module header:
> import qualified Something.Specific as Specific
> ...
> -- Somewhere else:
> foo = ...
>   where import Specific -- Note: importing by module alias

I would rather we are able to use exactly the same features as global
imports to reduce the cognitive burden of knowing what you can and can't
do. If those responsible for GHC tell me that what I want is unrealistic
then maybe we'll have to compromise, but right now I would rather not add

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150805/9fb4df4f/attachment.html>

More information about the Haskell-Cafe mailing list