optimise literalOsPath
Taking a ShortByteString and using OverloadedStrings should avoid it being converted from a String. The reason there is no IsString instance for OsPath is presumably the bad behavior of IsString for ByteString on unicode btw. But literalOsPath won't be used with unicode in git-annex. Sponsored-by: unqueued
This commit is contained in:
parent
8bafe05500
commit
98a0a9ddff
10 changed files with 23 additions and 7 deletions
|
@ -5,6 +5,7 @@
|
|||
- License: BSD-2-clause
|
||||
-}
|
||||
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# OPTIONS_GHC -fno-warn-tabs #-}
|
||||
|
||||
module Utility.OSX (
|
||||
|
@ -18,7 +19,9 @@ import Common
|
|||
import Utility.UserInfo
|
||||
|
||||
autoStartBase :: String -> OsPath
|
||||
autoStartBase label = literalOsPath "Library" </> literalOsPath "LaunchAgents" </> literalOsPath (label ++ ".plist")
|
||||
autoStartBase label = literalOsPath "Library"
|
||||
</> literalOsPath "LaunchAgents"
|
||||
</> toOsPath label <> literalOsPath ".plist"
|
||||
|
||||
systemAutoStart :: String -> OsPath
|
||||
systemAutoStart label = literalOsPath "/" </> autoStartBase label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue