avoid using split unnecessarily
I'd like to get rid of all uses of Data.String.Utils eventually..
This commit is contained in:
parent
a862e10f7c
commit
b69b764717
1 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,6 @@ import Utility.Directory
|
||||||
import System.Environment
|
import System.Environment
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
import Data.List
|
import Data.List
|
||||||
import Data.String.Utils
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Prelude
|
import Prelude
|
||||||
|
@ -54,12 +53,13 @@ toString (StringV s) = s
|
||||||
toString (BoolV b)
|
toString (BoolV b)
|
||||||
| b = "true"
|
| b = "true"
|
||||||
| otherwise = "false"
|
| otherwise = "false"
|
||||||
toString(NumericV f) = show f
|
toString (NumericV f) = show f
|
||||||
toString (ListV l)
|
toString (ListV l)
|
||||||
| null l = ""
|
| null l = ""
|
||||||
| otherwise = (intercalate ";" $ map (escapesemi . toString) l) ++ ";"
|
| otherwise = (intercalate ";" $ map (concatMap escapesemi . toString) l) ++ ";"
|
||||||
where
|
where
|
||||||
escapesemi = intercalate "\\;" . split ";"
|
escapesemi ';' = "\\;"
|
||||||
|
escapesemi c = [c]
|
||||||
|
|
||||||
genDesktopEntry :: String -> String -> Bool -> FilePath -> Maybe String -> [String] -> DesktopEntry
|
genDesktopEntry :: String -> String -> Bool -> FilePath -> Maybe String -> [String] -> DesktopEntry
|
||||||
genDesktopEntry name comment terminal program icon categories = catMaybes
|
genDesktopEntry name comment terminal program icon categories = catMaybes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue