[Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Marc Weber
I know about

  module Foo (
exportedFuncA,
ExportedType(..)
  ) where

  exportedFuncA :: ..
  exportedFuncA = ..

  data ExportedType = ExportedType


It's great that you can only export a subset of all functions defined
in a module. However this kind of declaration causes some work when merging
branches etc. Its not a big deal but takes time.

So does it make sense to add this information using pragmas?


  {-# HIDE logInfo, logError #-}
  logInfo :: Int - String - (Bool, Double)
  logInfo = logM INFO this.module
  logError :: Int - String - (Bool, Double)
  logInfo = logM ERROR this.module


Adding a pragma like HIDE, EXPORT is only a small change but can make a
big difference in everyday life ?

Can template haskell add those pragmas as well?

Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Bulat Ziganshin
Hello Marc,

Wednesday, July 22, 2009, 4:28:49 PM, you wrote:

 So does it make sense to add this information using pragmas?

pragmas shouldn't change program behavior or alter whether program may
be compiled

of course, LANGUAGE pragmas violate this law, but is considered as bug
in Haskell developments rather than welcomed feature


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Thomas Davie


On 22 Jul 2009, at 14:53, Bulat Ziganshin wrote:


Hello Marc,

Wednesday, July 22, 2009, 4:28:49 PM, you wrote:


So does it make sense to add this information using pragmas?


pragmas shouldn't change program behavior or alter whether program may
be compiled

of course, LANGUAGE pragmas violate this law, but is considered as bug
in Haskell developments rather than welcomed feature


Why shouldn't they?  I'm not particularly in support of this idea --  
it makes it less clear what is being exported by the module, but I  
don't get your reasoning.


Bob
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Bulat Ziganshin
Hello Thomas,

Wednesday, July 22, 2009, 5:08:15 PM, you wrote:

 Why shouldn't they?  I'm not particularly in support of this idea --
 it makes it less clear what is being exported by the module, but I  
 don't get your reasoning.

pragmas supposed to be some hints to compiler helping it to improve
speed or debugging. program semantic shouldn't be altered when all
pragmas are stripped off. otherwise, we are easily lose difference
between pragmas and language itself

-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe