<div dir="ltr">I'd like to put in a plug for allowing the format used in debian/changelog, and for allowing a changelog-file field in the cabal file.  We have lots of packages with debian/changelog files that go back years, and you can't build a deb without a debian/changelog file.  There is a parser for the format in the debian package.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 10:29 AM, Duncan Coutts <span dir="ltr"><<a href="mailto:duncan.coutts@googlemail.com" target="_blank">duncan.coutts@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2013-10-18 at 16:05 +0200, Herbert Valerio Riedel wrote:<br>
> Hello Duncan,<br>
><br>
> ...any recommendation on this one? For isntance, how do I best add a link from the<br>
> description-field pointing to the changelog file?<br>
<br>
No I think the longer term solution is to treat the changelog properly<br>
in some machine-readable form so that hackage can show the changes in a<br>
reasonable way, e.g. most recent changes, expand to more detail.<br>
<br>
I don't think we really want to have the current situation where some<br>
packages have these huge descriptions including long changelogs and<br>
others have nothing. It's all rather inconsistent.<br>
<br>
We should probably have hackage show only the first ~20-30 lines of the<br>
description and let the user expand that if they want to see more, and<br>
do a similar thing for the changelog.<br>
<br>
Simon makes the point that he likes having the changelog in the .cabal<br>
file rather than a separate file because it's less mental effort to<br>
update, as you can see it at the same time as the version. So perhaps<br>
what we should do is add a changelog field to the .cabal file an allow<br>
that to be inline, or to refer to a file, e.g. "changelog:" or<br>
"changlog-file:". Either way we can then do a bit of simple syntax<br>
checking so we know we can format it ok on hackage and in other tools.<br>
<span class="HOEnZb"><font color="#888888"><br>
Duncan<br>
</font></span><br><br>---------- Forwarded message ----------<br>From: Simon Marlow <<a href="mailto:marlowsd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">marlowsd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>><br>To: <a href="mailto:ghc-devs-HC%2BZ4NTRIlBAfugRpC6u6w@public.gmane.org">ghc-devs-HC+Z4NTRIlBAfugRpC6u6w@public.gmane.org</a><br>
Cc: <br>Date: Fri, 18 Oct 2013 13:06:13 +0200<br>Subject: Re: [commit: packages/stm] master: Refactor & update `stm.cabal` to `cabal-version>=1.10` (aa4774b)<br>I'm not keen on losing the changelog from the description.  The idea of<br>

having the changelog in the description is:<br>
<br>
   - it is prominent on the Hackage page for the package<br>
<br>
   - it's next to the version in the .cabal file, so you're more likely<br>
     to update it when updating the version.<br>
<br>
I don't mind splitting it into two - maybe the first few entries in the<br>
description and the rest in a separate file, with a link from the<br>
description.<br>
<br>
Cheers,<br>
Simon<br>
<br>
On 14/10/2013 22:38, git-4Dsf34iY/<a href="mailto:NkouOHNgZ69ag@public.gmane.org">NkouOHNgZ69ag@public.gmane.org</a> wrote:<br>
> Repository : ssh://git-4Dsf34iY/<a href="http://NkouOHNgZ69ag@public.gmane.org/stm" target="_blank">NkouOHNgZ69ag@public.gmane.org/stm</a><br>
><br>
> On branch  : master<br>
> Link       : <a href="http://git.haskell.org/packages/stm.git/commitdiff/aa4774b7d5f65cbf007803ff54995921a36fbaeb" target="_blank">http://git.haskell.org/packages/stm.git/commitdiff/aa4774b7d5f65cbf007803ff54995921a36fbaeb</a><br>

><br>
>> ---------------------------------------------------------------<br>
><br>
> commit aa4774b7d5f65cbf007803ff54995921a36fbaeb<br>
> Author: Herbert Valerio Riedel <hvr-mXXj517/<a href="mailto:zsQ@public.gmane.org">zsQ@public.gmane.org</a>><br>
> Date:   Mon Oct 14 22:02:35 2013 +0200<br>
><br>
>      Refactor & update `stm.cabal` to `cabal-version>=1.10`<br>
><br>
>      As the current code fails to build with GHC 6.10, I've updated the Cabal<br>
>      meta-data to declare support for GHC>=6.12 and dropped support for<br>
>      base3. This also moves the changelog from the Cabal description field<br>
>      into a separate `changelog` file and adds a few entries.<br>
><br>
>      The code compiles warning-free for all tested GHC versions.<br>
><br>
>      Signed-off-by: Herbert Valerio Riedel <hvr-mXXj517/<a href="mailto:zsQ@public.gmane.org">zsQ@public.gmane.org</a>><br>
><br>
><br>
>> ---------------------------------------------------------------<br>
><br>
> aa4774b7d5f65cbf007803ff54995921a36fbaeb<br>
>   Control/Concurrent/STM/TVar.hs |    5 --<br>
>   Control/Sequential/STM.hs      |   18 -------<br>
>   changelog                      |   38 +++++++++++++++<br>
>   stm.cabal                      |  103 ++++++++++++++++++----------------------<br>
>   4 files changed, 83 insertions(+), 81 deletions(-)<br>
><br>
> diff --git a/Control/Concurrent/STM/TVar.hs b/Control/Concurrent/STM/TVar.hs<br>
> index d15896b..6435e17 100644<br>
> --- a/Control/Concurrent/STM/TVar.hs<br>
> +++ b/Control/Concurrent/STM/TVar.hs<br>
> @@ -43,11 +43,6 @@ import GHC.Weak<br>
>   import Control.Sequential.STM<br>
>   #endif<br>
><br>
> -#if ! (MIN_VERSION_base(4,2,0))<br>
> -readTVarIO = atomically . readTVar<br>
> -#endif<br>
> -<br>
> -<br>
>   -- Like 'modifyIORef' but for 'TVar'.<br>
>   -- | Mutate the contents of a 'TVar'. /N.B./, this version is<br>
>   -- non-strict.<br>
> diff --git a/Control/Sequential/STM.hs b/Control/Sequential/STM.hs<br>
> index 468e7bd..a644e67 100644<br>
> --- a/Control/Sequential/STM.hs<br>
> +++ b/Control/Sequential/STM.hs<br>
> @@ -40,35 +40,17 @@ instance Monad STM where<br>
>       x <- m r<br>
>       unSTM (k x) r<br>
><br>
> -#ifdef BASE4<br>
>   atomically :: STM a -> IO a<br>
>   atomically (STM m) = do<br>
>       r <- newIORef (return ())<br>
>       m r `onException` do<br>
>       rollback <- readIORef r<br>
>       rollback<br>
> -#else<br>
> -atomically :: STM a -> IO a<br>
> -atomically (STM m) = do<br>
> -    r <- newIORef (return ())<br>
> -    m r `catch` \ ex -> do<br>
> -     rollback <- readIORef r<br>
> -     rollback<br>
> -     throw ex<br>
> -#endif<br>
><br>
> -#ifdef BASE4<br>
>   throwSTM :: Exception e => e -> STM a<br>
> -#else<br>
> -throwSTM :: Exception -> STM a<br>
> -#endif<br>
>   throwSTM = STM . const . throwIO<br>
><br>
> -#ifdef BASE4<br>
>   catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a<br>
> -#else<br>
> -catchSTM :: STM a -> (Exception -> STM a) -> STM a<br>
> -#endif<br>
>   catchSTM (STM m) h = STM $ \ r -> do<br>
>       old_rollback <- readIORef r<br>
>       writeIORef r (return ())<br>
> diff --git a/changelog b/changelog<br>
> new file mode 100644<br>
> index 0000000..1296a41<br>
> --- /dev/null<br>
> +++ b/changelog<br>
> @@ -0,0 +1,38 @@<br>
> +-*-changelog-*-<br>
> +<br>
> +2.4.2.1  Oct 2013<br>
> +<br>
> +     * Updated behaviour of `newBroadcastTChanIO` to match<br>
> +     `newBroadcastTChan` in causing an error on a read from<br>
> +     the broadcast channel<br>
> +<br>
> +     * Add `mkWeakTVar`<br>
> +<br>
> +     * Add `isFullTBQueue`<br>
> +<br>
> +     * Fix `TChan` created via `newBroadcastTChanIO` to throw same<br>
> +     exception on a `readTChan` as when created via `newBroadcastTChan`<br>
> +<br>
> +2.4.2  Nov 2012<br>
> +<br>
> +     * Add "Control.Concurrent.STM.TSem" (transactional semaphore)<br>
> +<br>
> +     * Add Applicative/Alternative instances of STM for GHC <7.0<br>
> +<br>
> +        * Throw proper exception when `readTChan` called on a broadcast<br>
> +     `TChan`<br>
> +<br>
> +2.4  Jul 2012<br>
> +<br>
> +     * Add "Control.Concurrent.STM.TQueue" (a faster `TChan`)<br>
> +<br>
> +     * Add "Control.Concurrent.STM.TBQueue" (a bounded channel based on<br>
> +     `TQueue`)<br>
> +<br>
> +     * Add `Eq` instance for `TChan`<br>
> +<br>
> +     * Add `newBroadcastTChan` and `newBroadcastTChanIO`<br>
> +<br>
> +     * Some performance improvements for `TChan`<br>
> +<br>
> +     * Add `cloneTChan`<br>
> diff --git a/stm.cabal b/stm.cabal<br>
> index 568b8a3..998bb24 100644<br>
> --- a/stm.cabal<br>
> +++ b/stm.cabal<br>
> @@ -1,68 +1,55 @@<br>
> -name:                stm<br>
> +name:           stm<br>
>   version:        2.4.2.1<br>
> -license:     BSD3<br>
> -license-file:        LICENSE<br>
> -maintainer:  <a href="mailto:libraries-HC%2BZ4NTRIlBAfugRpC6u6w@public.gmane.org">libraries-HC+Z4NTRIlBAfugRpC6u6w@public.gmane.org</a><br>
> -synopsis:    Software Transactional Memory<br>
> +license:        BSD3<br>
> +license-file:   LICENSE<br>
> +maintainer:     <a href="mailto:libraries-HC%2BZ4NTRIlBAfugRpC6u6w@public.gmane.org">libraries-HC+Z4NTRIlBAfugRpC6u6w@public.gmane.org</a><br>
> +bug-reports:    <a href="http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=stm" target="_blank">http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=stm</a><br>

> +synopsis:       Software Transactional Memory<br>
>   category:       Concurrency<br>
> -description:<br>
> - A modular composable concurrency abstraction.<br>
> - .<br>
> - Changes in version 2.4.2.1<br>
> - .<br>
> - * Updated behaviour of @newBroadcastTChanIO@ to match<br>
> -   @newBroadcastTChan@ in causing an error on a read from<br>
> -   the broadcast channel.<br>
> - .<br>
> - Changes in version 2.4.2<br>
> - .<br>
> - * Added "Control.Concurrent.STM.TSem" (transactional semaphore)<br>
> - .<br>
> - Changes in version 2.4.1<br>
> - .<br>
> - * Added Applicative/Alternative instances of STM for GHC <7.0<br>
> - .<br>
> - Changes in version 2.4<br>
> - .<br>
> - * Added "Control.Concurrent.STM.TQueue" (a faster @TChan@)<br>
> - .<br>
> - * Added "Control.Concurrent.STM.TBQueue" (a bounded channel based on @TQueue@)<br>
> - .<br>
> - * @TChan@ has an @Eq@ instances<br>
> - .<br>
> - * Added @newBroadcastTChan@ and @newBroadcastTChanIO@<br>
> - .<br>
> - * Some performance improvements for @TChan@<br>
> - .<br>
> - * Added @cloneTChan@<br>
> -<br>
> +description:    A modular composable concurrency abstraction.<br>
>   build-type:     Simple<br>
> -cabal-version:  >=1.6<br>
> +cabal-version:  >=1.10<br>
> +tested-with:    GHC==7.6.3, GHC==7.6.2, GHC==7.6.1, GHC==7.4.2, GHC==7.4.1, GHC==7.2.2, GHC==7.2.1, GHC==7.0.4, GHC==7.0.3, GHC==7.0.2, GHC==7.0.1, GHC==6.12.3<br>
> +<br>
> +extra-source-files:<br>
> +    changelog<br>
><br>
>   source-repository head<br>
>       type:     git<br>
>       location: <a href="http://git.haskell.org/packages/stm.git" target="_blank">http://git.haskell.org/packages/stm.git</a><br>
><br>
> -flag base4<br>
> +source-repository this<br>
> +    type:     git<br>
> +    location: <a href="http://git.haskell.org/packages/stm.git" target="_blank">http://git.haskell.org/packages/stm.git</a><br>
> +    tag:      stm-2.4.2.1-release<br>
><br>
>   library<br>
> -  exposed-modules:<br>
> -    Control.Concurrent.STM<br>
> -    Control.Concurrent.STM.TArray<br>
> -    Control.Concurrent.STM.TVar<br>
> -    Control.Concurrent.STM.TChan<br>
> -    Control.Concurrent.STM.TMVar<br>
> -    Control.Concurrent.STM.TQueue<br>
> -    Control.Concurrent.STM.TBQueue<br>
> -    Control.Concurrent.STM.TSem<br>
> -    Control.Monad.STM<br>
> -  other-modules:<br>
> -    Control.Sequential.STM<br>
> -  build-depends: base < 5, array<br>
> -  if flag(base4)<br>
> -    build-depends: base >=4<br>
> -    cpp-options:   -DBASE4<br>
> -  else<br>
> -    build-depends: base <4<br>
> -  if impl(ghc >= 6.10)<br>
> -    build-depends: base >=4<br>
> +    default-language: Haskell98<br>
> +    other-extensions:<br>
> +        CPP<br>
> +        DeriveDataTypeable<br>
> +        FlexibleInstances<br>
> +        MagicHash<br>
> +        MultiParamTypeClasses<br>
> +        UnboxedTuples<br>
> +    if impl(ghc >= 7.2)<br>
> +        other-extensions: Trustworthy<br>
> +<br>
> +    build-depends:<br>
> +        base  >= 4.2 && < 4.8,<br>
> +        array >= 0.3 && < 0.6<br>
> +<br>
> +    exposed-modules:<br>
> +        Control.Concurrent.STM<br>
> +        Control.Concurrent.STM.TArray<br>
> +        Control.Concurrent.STM.TVar<br>
> +        Control.Concurrent.STM.TChan<br>
> +        Control.Concurrent.STM.TMVar<br>
> +        Control.Concurrent.STM.TQueue<br>
> +        Control.Concurrent.STM.TBQueue<br>
> +        Control.Concurrent.STM.TSem<br>
> +        Control.Monad.STM<br>
> +    other-modules:<br>
> +        Control.Sequential.STM<br>
> +<br>
> +    ghc-options: -Wall<br>
> \ No newline at end of file<br>
><br>
> _______________________________________________<br>
> ghc-commits mailing list<br>
> <a href="mailto:ghc-commits-HC%2BZ4NTRIlBAfugRpC6u6w@public.gmane.org">ghc-commits-HC+Z4NTRIlBAfugRpC6u6w@public.gmane.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/ghc-commits" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-commits</a><br>
><br>
<br>_______________________________________________<br>
cabal-devel mailing list<br>
<a href="mailto:cabal-devel@haskell.org">cabal-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/cabal-devel" target="_blank">http://www.haskell.org/mailman/listinfo/cabal-devel</a><br>
<br></blockquote></div><br></div>