[darcs-users] darcs patch: Add a sunset notice to our UTF8 module (and 1 more)

Petr Rockai me at mornfall.net
Wed Feb 18 10:40:01 UTC 2009


Eric Kow <kowey at darcs.net> writes:

Add a sunset notice to our UTF8 module
--------------------------------------
> hunk ./src/UTF8.lhs 38
>  > module UTF8
>  >   ( encode ) where
>  
> +
> +SUNSET: we should remove this module after the 2009-07 release
> +of darcs and just use Codec.Binary.UTF8.String instead
> +
>  #ifdef HAVE_UTF8STRING
>  > import qualified Codec.Binary.UTF8.String (encode)
>  > import Data.Word (Word8)
> [Cabal: require utf8-string by default.
> Eric Kow <kowey at darcs.net>**20090217153111
>  Ignore-this: e9f37c379b46a403ccd9f6359aa8d92e
>  The user can go back to the internal utf8-string binding with cabal configure -f-utf8-string
> ] hunk ./darcs.cabal 99
>    description: Use the external zlib binding package.
>    default:     False
>  
> +-- SUNSET: this should be mandatory after the 2009-07 release is out
> +flag external-utf8-string
> +  description: Use the external utf8-string binding package.
> +
>  flag haskeline
>    description: Use the haskeline package for command line editing support.
>  
> hunk ./darcs.cabal 380
>    else
>      extra-libraries:  z
>  
> +  if flag(external-utf8-string)
> +    build-depends:    utf8-string == 0.3.*
> +    cpp-options:      -DHAVE_UTF8STRING
> +
>    -- The terminfo package cannot be built on Windows.
>    if flag(terminfo) && !os(windows)
>      build-depends:    terminfo == 0.3.*
> hunk ./darcs.cabal 517
>    else
>      extra-libraries:  z
>  
> +  if flag(external-utf8-string)
> +    build-depends:    utf8-string == 0.3.*
> +    cpp-options:      -DHAVE_UTF8STRING
> +
>    -- The terminfo package cannot be built on Windows.
>    if flag(terminfo) && !os(windows)
>      build-depends:    terminfo == 0.3.*

It'd make sense to improve consistency among the various flag names. Some are
named external-foo, other just foo. I'd go for simple naming scheme:

if flag(hackage-name)
   build-depends: hackage-name (...)

like we use for terminfo and such. Then, -f-utf8-string would mean that you
don't want to use the utf8-string package (probably using some internal
substitute).

Other than that,

Reviewed-By: Petr Rockai <me at mornfall.net>
Acked-By: Petr Rockai <me at mornfall.net>

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation


More information about the darcs-users mailing list