what about adding a HIDE pragma ?

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

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, Bulat mailto:Bulat.Ziganshin@gmail.com

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

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, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (3)
-
Bulat Ziganshin
-
Marc Weber
-
Thomas Davie