module System.Build.Scala.Scaladoc(
Scaladoc,
debug,
nowarn,
verbose,
deprecation,
unchecked,
classpath,
sourcepath,
bootclasspath,
extdirs,
directory,
encoding,
target,
print,
optimise,
explaintypes,
uniqid,
version,
help,
(?),
access,
bottom,
charset,
doctitle,
footer,
header,
linksource,
nocomment,
stylesheetfile,
top,
windowtitle,
etc,
scaladoc,
scaladoc'
) where
import Data.Maybe
import Prelude hiding (print)
import System.FilePath
import System.Build.Args
import System.Build.CompilePaths
import System.Build.Extensions
import System.Build.OutputDirectory
import System.Build.OutputReferenceSet
import System.Build.OutputReferenceGet
import System.Build.Command
import System.Build.Scala.Target
import System.Build.Scala.Debug
import System.Build.Scala.Access
import System.Build.Scala.Scalac (kscalac, scalac')
data Scaladoc = Scaladoc {
debug :: Maybe Debug,
nowarn :: Bool,
verbose :: Bool,
deprecation :: Bool,
unchecked :: Bool,
classpath :: [FilePath],
sourcepath :: [FilePath],
bootclasspath :: [FilePath],
extdirs :: [FilePath],
directory :: Maybe FilePath,
encoding :: Maybe String,
target :: Maybe Target,
print :: Bool,
optimise :: Bool,
explaintypes :: Bool,
uniqid :: Bool,
version :: Bool,
help :: Bool,
(?) :: Maybe FilePath,
access :: Maybe Access,
bottom :: Maybe String,
charset :: Maybe String,
doctitle :: Maybe String,
footer :: Maybe String,
header :: Maybe String,
linksource :: Bool,
nocomment :: Bool,
stylesheetfile :: Maybe String,
top :: Maybe String,
windowtitle :: Maybe String,
etc :: Maybe String
}
scaladoc :: Scaladoc
scaladoc = Scaladoc Nothing False False False False [] [] [] [] Nothing Nothing Nothing False False False False False False Nothing Nothing Nothing Nothing Nothing Nothing Nothing False False Nothing Nothing Nothing Nothing
scaladoc' :: Maybe Debug
-> Bool
-> Bool
-> Bool
-> Bool
-> [FilePath]
-> [FilePath]
-> [FilePath]
-> [FilePath]
-> Maybe FilePath
-> Maybe String
-> Maybe Target
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe FilePath
-> Maybe Access
-> Maybe String
-> Maybe String
-> Maybe String
-> Maybe String
-> Maybe String
-> Bool
-> Bool
-> Maybe String
-> Maybe String
-> Maybe String
-> Maybe String
-> Scaladoc
scaladoc' = Scaladoc
instance Show Scaladoc where
show (Scaladoc debug'
nowarn'
verbose'
deprecation'
unchecked'
classpath'
sourcepath'
bootclasspath'
extdirs'
directory'
encoding'
target'
print'
optimise'
explaintypes'
uniqid'
version'
help'
script'
access'
bottom'
charset'
doctitle'
footer'
header'
linksource'
nocomment'
stylesheetfile'
top'
windowtitle'
etc') = (kscalac (scalac' debug' nowarn' verbose' deprecation' unchecked' classpath' sourcepath' bootclasspath' extdirs' directory' encoding' target' print' optimise' explaintypes' uniqid' version' help' script' etc') ++ ["access" -~> access',
"bottom" ~~> bottom',
"charset" ~~> charset',
"doctitle" ~~> doctitle',
"footer" ~~> footer',
"header" ~~> header',
"linksource" ~~ linksource',
"nocomment" ~~ nocomment',
"stylesheetfile" ~~> stylesheetfile',
"top" ~~> top',
"windowtitle" ~~> windowtitle']) ^^^ " "
instance CompilePaths Scaladoc where
j =>> ps = show j ++ ' ' : space ps
instance Extensions Scaladoc where
exts _ = ["scala"]
instance OutputDirectory Scaladoc where
outdir = directory
instance OutputReferenceSet Scaladoc where
setReference p j = j { classpath = p }
instance OutputReferenceGet Scaladoc where
getReference = classpath
instance Command Scaladoc where
command _ = let envs = [
("SCALA_HOME", (</> "bin" </> "scaladoc")),
("SCALADOC", id)
]
in fromMaybe "scaladoc" `fmap` tryEnvs envs