We usually just paste the interdiff in a response to the original email and
don't change the subject/commit message.


On Thu, Sep 26, 2013 at 3:32 PM, Jose A. Lopes <[email protected]> wrote:

> Improve message, for example,
>
>   # Generated automatically from Haskell constant 'htoolsProgs' in file
> 'src/Ganeti/HsConstants.hs'
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  src/Ganeti/Hs2Py/GenConstants.hs | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/src/Ganeti/Hs2Py/GenConstants.hs
> b/src/Ganeti/Hs2Py/GenConstants.hs
> index 38db1e5..7af3e66 100644
> --- a/src/Ganeti/Hs2Py/GenConstants.hs
> +++ b/src/Ganeti/Hs2Py/GenConstants.hs
> @@ -29,14 +29,24 @@ import Language.Haskell.TH
>
>  import Ganeti.THH
>
> +fileFromModule :: Maybe String -> String
> +fileFromModule Nothing = ""
> +fileFromModule (Just name) = "src/" ++ map slashToDot name ++ ".hs"
> +  where slashToDot '.' = '/'
>

Shouldn't that be called dotToSlash?


> +        slashToDot c = c
> +
> +comment :: Name -> String
> +comment name =
> +  "# Generated automatically from Haskell constant '" ++ nameBase name ++
> +  "' in file '" ++ fileFromModule (nameModule name) ++ "'"
> +
>  genList :: Name -> [Name] -> Q [Dec]
>  genList name consNames = do
>    let cons = listE $ map (\n -> tupE [mkString n, mkPyValueEx n])
> consNames
>    sig <- sigD name [t| [(String, String)] |]
>    fun <- funD name [clause [] (normalB cons) []]
>    return [sig, fun]
> -  where comm n = "# Generated automatically from Haskell constant " ++
> show n
> -        mkString n = stringE (comm n ++ "\n" ++ deCamelCase (nameBase n))
> +  where mkString n = stringE (comment n ++ "\n" ++ deCamelCase (nameBase
> n))
>          mkPyValueEx n = [| showValue $(varE n) |]
>
>  genPyConstants :: String -> [Name] -> Q [Dec]
> --
> 1.8.4
>
>
Rest LGTM, thanks,
Thomas


-- 
Thomas Thrainer | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to