{-# LANGUAGE DeriveGeneric #-} module Distribution.Simple.Build.PackageInfoModule.Z (render, Z (..)) where import Distribution.ZinzaPrelude data Z = Z { Z -> String zPackageName :: String, Z -> String zVersionDigits :: String, Z -> String zSynopsis :: String, Z -> String zCopyright :: String, Z -> String zHomepage :: String, Z -> Bool zSupportsNoRebindableSyntax :: Bool } deriving (forall x. Rep Z x -> Z forall x. Z -> Rep Z x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep Z x -> Z $cfrom :: forall x. Z -> Rep Z x Generic) render :: Z -> String render :: Z -> String render Z z_root = forall a. Writer a -> String execWriter forall a b. (a -> b) -> a -> b $ do if (Z -> Bool zSupportsNoRebindableSyntax Z z_root) then do String -> Writer () tell String "{-# LANGUAGE NoRebindableSyntax #-}\n" forall (m :: * -> *) a. Monad m => a -> m a return () else do forall (m :: * -> *) a. Monad m => a -> m a return () String -> Writer () tell String "{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n" String -> Writer () tell String "{-# OPTIONS_GHC -w #-}\n" String -> Writer () tell String "module PackageInfo_" String -> Writer () tell (Z -> String zPackageName Z z_root) String -> Writer () tell String " (\n" String -> Writer () tell String " name,\n" String -> Writer () tell String " version,\n" String -> Writer () tell String " synopsis,\n" String -> Writer () tell String " copyright,\n" String -> Writer () tell String " homepage,\n" String -> Writer () tell String " ) where\n" String -> Writer () tell String "\n" String -> Writer () tell String "import Data.Version (Version(..))\n" String -> Writer () tell String "import Prelude\n" String -> Writer () tell String "\n" String -> Writer () tell String "name :: String\n" String -> Writer () tell String "name = " String -> Writer () tell (forall a. Show a => a -> String show forall a b. (a -> b) -> a -> b $ Z -> String zPackageName Z z_root) String -> Writer () tell String "\n" String -> Writer () tell String "version :: Version\n" String -> Writer () tell String "version = Version " String -> Writer () tell (Z -> String zVersionDigits Z z_root) String -> Writer () tell String " []\n" String -> Writer () tell String "\n" String -> Writer () tell String "synopsis :: String\n" String -> Writer () tell String "synopsis = " String -> Writer () tell (forall a. Show a => a -> String show forall a b. (a -> b) -> a -> b $ Z -> String zSynopsis Z z_root) String -> Writer () tell String "\n" String -> Writer () tell String "copyright :: String\n" String -> Writer () tell String "copyright = " String -> Writer () tell (forall a. Show a => a -> String show forall a b. (a -> b) -> a -> b $ Z -> String zCopyright Z z_root) String -> Writer () tell String "\n" String -> Writer () tell String "homepage :: String\n" String -> Writer () tell String "homepage = " String -> Writer () tell (forall a. Show a => a -> String show forall a b. (a -> b) -> a -> b $ Z -> String zHomepage Z z_root) String -> Writer () tell String "\n"