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

Marc Weber marco-oweber at gmx.de
Wed Jul 22 08:28:49 EDT 2009


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


More information about the Haskell-Cafe mailing list