1 {-# LANGUAGE DeriveGeneric #-}
3 module Distribution
.Simple
.Build
.PackageInfoModule
.Z
(render
, Z
(..)) where
5 import Distribution
.ZinzaPrelude
8 { zPackageName
:: String
9 , zVersionDigits
:: String
11 , zCopyright
:: String
13 , zSupportsNoRebindableSyntax
:: Bool
18 render z_root
= execWriter
$ do
19 if (zSupportsNoRebindableSyntax z_root
)
21 tell
"{-# LANGUAGE NoRebindableSyntax #-}\n"
25 tell
"{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n"
26 tell
"{-# OPTIONS_GHC -w #-}\n"
27 tell
"module PackageInfo_"
28 tell
(zPackageName z_root
)
37 tell
"import Data.Version (Version(..))\n"
38 tell
"import Prelude\n"
40 tell
"name :: String\n"
42 tell
(show $ zPackageName z_root
)
44 tell
"version :: Version\n"
45 tell
"version = Version "
46 tell
(zVersionDigits z_root
)
49 tell
"synopsis :: String\n"
51 tell
(show $ zSynopsis z_root
)
53 tell
"copyright :: String\n"
55 tell
(show $ zCopyright z_root
)
57 tell
"homepage :: String\n"
59 tell
(show $ zHomepage z_root
)