AppleScript 0.2 → 0.2.0.1
raw patch · 4 files changed
+13/−2 lines, 4 files
Files
- AppleScript.cabal +1/−1
- Foreign/AppleScript/Error.hs +1/−0
- Foreign/AppleScript/Plain.hs +3/−0
- Foreign/AppleScript/Rich.hs +8/−1
AppleScript.cabal view
@@ -1,5 +1,5 @@ Name: AppleScript-Version: 0.2+Version: 0.2.0.1 License: BSD3 License-file: LICENSE Author: Wouter Swierstra <wouter.swierstra@gmail.com>, Reiner Pope <reiner.pope@gmail.com>
Foreign/AppleScript/Error.hs view
@@ -1,6 +1,7 @@ {-# OPTIONS_GHC -funbox-strict-fields #-} {-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} +-- | Exceptions raised when running AppleScript code module Foreign.AppleScript.Error where import System.Exit
Foreign/AppleScript/Plain.hs view
@@ -80,6 +80,9 @@ -- available on your platform. foreign import ccall "RunScript.h AppleScriptAvailable" appleScriptAvailable :: IO Bool +-- | Newtype representing AppleScript code. When possible, use the+-- 'applescript' quasiquoter or the 'IsString' instance to generate+-- values of this type. newtype AppleScript = AppleScript { unAppleScript :: Text } deriving(IsString)
Foreign/AppleScript/Rich.hs view
@@ -44,7 +44,9 @@ -- > display dialog "Hello from the other greeter!" -- > |] ----- The quasiquoter is +-- The quasiquoter is based on a fairly simple string substitution scheme, and is not+-- aware of AppleScript syntax. If syntax errors arise, use 'debugScript' to inspect+-- the generated code. module Foreign.AppleScript.Rich ( -- * Common-use functions@@ -140,6 +142,11 @@ -- > PlainCode "..." -- > ] +-- | Types which can be inserted into AppleScript using the+--+-- > $value{ <haskell code> }$+--+-- syntax. class AppleScriptValue a where -- | Serialise the given Haskell value into AppleScript code. toAppleScriptCode :: a -> Plain.AppleScript