remove Foreign.Marshal.Error.void

So now that we have void in Control.Monad, can we remove it from Foreign.Marshal.Error? Or at least make them the same function? It's mildly annoying when importing both Control.Monad and Foreign winds up with ambiguous symbol errors.

On 16 March 2012 05:38, Evan Laforge
So now that we have void in Control.Monad, can we remove it from Foreign.Marshal.Error? Or at least make them the same function? It's mildly annoying when importing both Control.Monad and Foreign winds up with ambiguous symbol errors.
+1 for first making it the same function and then removing it from Foreign.Marshal.Error. Preferably there's a deprecation cycle where the export from Foreign.Marshal.Error is marked as deprecated in favor of the export from Control.Monad. However that's not possible (yet): http://hackage.haskell.org/trac/ghc/ticket/4879 I assume your proposal has the normal 2-week discussion period Bas

On Sun, 18 Mar 2012, Bas van Dijk wrote:
On 16 March 2012 05:38, Evan Laforge
wrote: So now that we have void in Control.Monad, can we remove it from Foreign.Marshal.Error? Or at least make them the same function? It's mildly annoying when importing both Control.Monad and Foreign winds up with ambiguous symbol errors.
+1 for first making it the same function and then removing it from Foreign.Marshal.Error.
You could skip the step of making Foreign.Marshal.Error.void and Control.Monad.void the same function and deprecate Foreign.Marshal.Error.void immediately. However I generally think that explicit or qualified imports are the best way to avoid name clashes. There are many programmers out there that do not program Haskell every day and do not know where 'void' is defined when they read a Haskell program.

On Sun, 18 Mar 2012, Bas van Dijk wrote:
+1 for first making it the same function and then removing it from Foreign.Marshal.Error.
Oh yes. Let's say until March 29.
On Sun, Mar 18, 2012 at 3:21 AM, Henning Thielemann
You could skip the step of making Foreign.Marshal.Error.void and Control.Monad.void the same function and deprecate Foreign.Marshal.Error.void immediately. However I generally think that explicit or qualified imports are the best way to avoid name clashes. There are many programmers out there that do not program Haskell every day and do not know where 'void' is defined when they read a Haskell program.
Normally I use qualified imports, but these two modules are special. Foreign must be imported unqualified when used with hsc2hs, because hsc2hs emits unqualified identifiers. And Control.Monad.... well, it doesn't have to be unqualified, but since it's full of control structures it's one of the few modules I'm accustomed to importing unqualified.

On Sun, 18 Mar 2012, Evan Laforge wrote:
On Sun, Mar 18, 2012 at 3:21 AM, Henning Thielemann
wrote: You could skip the step of making Foreign.Marshal.Error.void and Control.Monad.void the same function and deprecate Foreign.Marshal.Error.void immediately. However I generally think that explicit or qualified imports are the best way to avoid name clashes. There are many programmers out there that do not program Haskell every day and do not know where 'void' is defined when they read a Haskell program.
Normally I use qualified imports, but these two modules are special. Foreign must be imported unqualified when used with hsc2hs, because hsc2hs emits unqualified identifiers.
I can't remember problems with hsc2hs, but I usually import not the whole Foreign, but Foreign.Storable etc. individually.
And Control.Monad.... well, it doesn't have to be unqualified, but since it's full of control structures it's one of the few modules I'm accustomed to importing unqualified.
I also use to import unqualified from Control.Monad, since identifiers like liftM2 already contain the monadic 'M'. However in this case I import explicitly: import Control.Monad (liftM2)
participants (3)
-
Bas van Dijk
-
Evan Laforge
-
Henning Thielemann