[commit: packages/process] master, wip/issue15: Add IsString instance for CmdSpec (6f91454)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:37:13 UTC 2015


Repository : ssh://git@git.haskell.org/process

On branches: master,wip/issue15
Link       : http://ghc.haskell.org/trac/ghc/changeset/6f9145466365ebc71b7e6a343f26b966e3c850d7/process

>---------------------------------------------------------------

commit 6f9145466365ebc71b7e6a343f26b966e3c850d7
Author: Simon Hengel <sol at typeful.net>
Date:   Sat Nov 1 10:36:16 2014 +0800

    Add IsString instance for CmdSpec


>---------------------------------------------------------------

6f9145466365ebc71b7e6a343f26b966e3c850d7
 System/Process/Internals.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index d5cc90b..3de8944 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -45,6 +45,7 @@ module System.Process.Internals (
 import Control.Concurrent
 import Control.Exception
 import Data.Bits
+import Data.String
 import Foreign.C
 import Foreign.Marshal
 import Foreign.Ptr
@@ -209,6 +210,10 @@ data CmdSpec
       --   for the Windows @SearchPath@ API.
 
 
+-- | construct a `ShellCommand` from a string literal
+instance IsString CmdSpec where
+  fromString = ShellCommand
+
 data StdStream
   = Inherit                  -- ^ Inherit Handle from parent
   | UseHandle Handle         -- ^ Use the supplied Handle



More information about the ghc-commits mailing list