Suggestion from @natefaubion.
Something vaguely like:
module MyPrelude
( module Data.Map as M
...
) where
import Data.Map
Then you can:
import MyPrelude
myInsert = M.insert
or:
import MyPrelude as MP
myInsert = MP.M.insert
etc.
After giving it some thought, I think it would be pretty nice to have. I'm not sure exactly how we'd want to deal with the syntax for making it work in the exports though - I'd prefer not to have as M in the exports (using the same naming within the module as with what it exports is better I think), but also I don't think we want to automatically include qualification when an import has it, as it will prevent the current useful behaviour of:
module A
( ...
, module Exports
) where
import Foo (x, y, z) as Exports
import Bar (a, b, c) as Exports
Reactions are currently unavailable
Suggestion from @natefaubion.
Something vaguely like:
Then you can:
or:
etc.
After giving it some thought, I think it would be pretty nice to have. I'm not sure exactly how we'd want to deal with the syntax for making it work in the exports though - I'd prefer not to have as M in the exports (using the same naming within the module as with what it exports is better I think), but also I don't think we want to automatically include qualification when an import has it, as it will prevent the current useful behaviour of: