packages feed

Lastik 0.6.3 → 0.6.4

raw patch · 7 files changed

+49/−10 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ System.Build.Args: arg :: (ArgShow a) => a -> String
+ System.Build.Args: class ArgShow a
+ System.Build.Args: instance ArgShow Int
+ System.Build.Args: instance ArgShow [Char]
+ System.Build.Java.Javac: instance ArgShow Debug
+ System.Build.Java.Javac: instance ArgShow Implicit
+ System.Build.Java.Javac: instance ArgShow Proc
+ System.Build.Java.Javadoc: instance ArgShow SourceRelease
+ System.Build.Scala.Access: instance ArgShow Access
+ System.Build.Scala.Debug: instance ArgShow Debug
+ System.Build.Scala.Target: instance ArgShow Target
- System.Build.Args: (-~>) :: (Show k) => String -> Maybe k -> String
+ System.Build.Args: (-~>) :: (ArgShow k) => String -> Maybe k -> String
- System.Build.Args: (~~>) :: (Show k) => String -> Maybe k -> String
+ System.Build.Args: (~~>) :: (ArgShow k) => String -> Maybe k -> String

Files

Lastik.cabal view
@@ -1,5 +1,5 @@ Name:               Lastik-Version:            0.6.3+Version:            0.6.4 License:            BSD3 License-File:       LICENSE Author:             Tony Morris <code@tmorris.net>
System/Build/Args.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE FlexibleInstances #-}+ -- | Functions for working with command line arguments and options. module System.Build.Args(                           quote,@@ -13,7 +15,8 @@                           (^^^),                           space,                           searchPath,-                          tryEnvs+                          tryEnvs,+                          ArgShow(..)                         ) where  import Control.Monad@@ -23,10 +26,19 @@ import System.Environment import System.FilePath --- | Surrounds the given string in double-quotes.+class ArgShow a where+  arg :: a -> String++instance ArgShow [Char] where+  arg = id++instance ArgShow Int where+  arg = show++-- | Surrounds the given string in double-quotes and escapes any already there. quote :: String          -> String-quote s = '"' : s ++ "\""+quote s = '"' : (s >>= \x -> if x == '"' then "\\\"" else [x]) ++ "\""  -- | An empty list if the boolean is @False@ otherwise the given string value with @'-'@ prepended. (~~) :: String@@ -91,21 +103,21 @@ -- -- > "abc" ~~> Just "def" == "-abc \"def\"" -- > "abc" ~~> Nothing == ""-(~~>) :: (Show k) =>+(~~>) :: (ArgShow k) =>          String          -> Maybe k          -> String-(~~>) k = param k ' ' show+(~~>) k = param k ' ' arg  -- | If the given value is @Nothing@ return the empty list, otherwise prepend @'-'@ followed by the first value then @':'@ followed by surrounding the result of @show@ in double-quotes. -- -- > "abc" ~~> Just "def" == "-abc:\"def\"" -- > "abc" ~~> Nothing == ""-(-~>) :: (Show k) =>+(-~>) :: (ArgShow k) =>          String          -> Maybe k          -> String-(-~>) k = param k ':' show+(-~>) k = param k ':' arg  -- | Removes all empty lists from the first argument the intercalates the second argument. --@@ -134,8 +146,8 @@            -> IO (Maybe a) tryEnvs es = do e <- getEnvironment                 let k [] = Nothing-                    k ((a, b):t) = fmap b (a `M.lookup` M.fromList e) `mplus` k t   -                return (k es)    +                    k ((a, b):t) = fmap b (a `M.lookup` M.fromList e) `mplus` k t+                return (k es)   -- not exported
System/Build/Java/Javac.hs view
@@ -68,6 +68,9 @@   show None = "none"   show All = "all" +instance ArgShow Debug where+  arg = show+ -- | Control whether annotation processing and/or compilation is done. newtype Proc = Proc Bool deriving Eq @@ -88,6 +91,9 @@   show (Proc False) = "none"   show (Proc True) = "only" +instance ArgShow Proc where+  arg = show+ -- | Specify whether or not to generate class files for implicitly referenced files. newtype Implicit = Implicit Bool deriving Eq @@ -107,6 +113,9 @@ instance Show Implicit where   show (Implicit False) = "none"   show (Implicit True) = "class"++instance ArgShow Implicit where+  arg = show  -- | Javac is the compiler for Java source files. data Javac = Javac {
System/Build/Java/Javadoc.hs view
@@ -90,6 +90,9 @@   show S14 = "1.4"   show S13 = "1.3" +instance ArgShow SourceRelease where+  arg = show+ -- | Javadoc is the compiler for Java API documentation. data Javadoc = Javadoc {   overview :: Maybe FilePath,        -- ^ @-overview@
System/Build/Scala/Access.hs view
@@ -3,6 +3,8 @@                                   Access(..)                                 ) where +import System.Build.Args+ -- | Show only public, protected/public (default) or all classes and members (public,protected,private) data Access = Public      -- ^ @public@               | Protected -- ^ @protected@@@ -13,3 +15,6 @@   show Public = "public"   show Protected = "protected"   show Private = "private"++instance ArgShow Access where+  arg = show
System/Build/Scala/Debug.hs view
@@ -3,6 +3,8 @@                                  Debug(..)                                ) where +import System.Build.Args+ -- | Specify level of generated debugging info (none,source,line,vars,notailcalls) data Debug = None          -- ^ @none@              | Source      -- ^ @source@@@ -17,3 +19,6 @@   show Line = "line"   show Vars = "vars"   show NoTailCalls = "notailcalls"++instance ArgShow Debug where+  arg = show
System/Build/Scala/Target.hs view
@@ -3,6 +3,8 @@                                   Target(..)                                 ) where +import System.Build.Args+ -- | Specify for which target object files should be built (jvm-1.5,jvm-1.4,msil) data Target = JVM15   -- ^ @jvm-1.5@               | JVM14 -- ^ @jvm-1.4@@@ -13,3 +15,6 @@   show JVM15 = "jvm-1.5"   show JVM14 = "jvm-1.4"   show MSIL = "msil"++instance ArgShow Target where+  arg = show