From 17617d04cefcce357616144bc7c60d972e5d8ae0 Mon Sep 17 00:00:00 2001 From: foo Date: Sun, 22 Sep 2013 05:27:15 +0000 Subject: refresh haskell package patches for new android build Android build is now almost entirely automated, except for the installation of cross-built libs needed for XMPP. Haskell packages updated to current newest versions. Am not currently pinning the versions, as that didn't work out last time I tried it (must have missed some pins before). --- doc/install/Android.mdwn | 7 +- .../DAV_0.3-0001-build-without-TH.patch | 306 ---- .../haskell-patches/DAV_build-without-TH.patch | 377 +++++ .../HTTP_4000.2.8-0001-build-with-base-4.8.patch | 24 +- ...formers_hack-to-get-to-build-with-new-ghc.patch | 56 + .../SafeSemaphore_fix-build-with-new-base.patch | 36 + .../bloomfilter_fix-build-with-newer-base.patch | 26 + .../haskell-patches/comonad_cross-build.patch | 25 + .../haskell-patches/entropy_cross-build.patch | 25 + .../hamlet_1.1.6.1_0001-remove-TH.patch | 294 ---- .../hamlet_export-TH-splice-stuff.patch | 28 + .../lens_3.8.5-0001-build-without-TH.patch | 293 ---- .../lens_various-hacking-to-cross-build.patch | 385 +++++ ...ed-base_0.2.0.2_0001-hacked-for-newer-ghc.patch | 163 -- .../haskell-patches/lifted-base_crossbuild.patch | 25 + .../persistent-template_stub-out.patch | 25 + .../persistent_1.1.5.1_0001-disable-TH.patch | 73 +- .../primitive_fix-build-with-new-ghc.patch | 96 ++ .../process_fix-build-with-new-ghc.patch | 24 + .../shakespeare-css_1.0.2_0001-remove-TH.patch | 164 +- .../shakespeare-js_1.1.2_0001-remove-TH.patch | 308 ---- .../shakespeare-js_TH-exports.patch | 25 + ...0.3_0001-export-symbol-used-by-TH-splices.patch | 143 +- .../shakespeare_1.0.3_0001-remove-TH.patch | 208 --- .../skein_hardcode_little-endian.patch | 24 + .../socks_0.4.2_0001-remove-IPv6-stuff.patch | 152 +- ...ordered-containers_fix-build-with-new-ghc.patch | 32 + ...imisation-that-breaks-when-cross-compilin.patch | 25 - .../vector_hack-to-build-with-new-ghc.patch | 130 ++ .../yesod-auth_don-t-really-build.patch | 34 + .../yesod-core_1.1.8_0001-remove-TH.patch | 476 ------ ...8_0002-replaced-TH-in-Yesod.Internal.Core.patch | 267 --- ...od-core_1.1.8_0003-exports-for-TH-splices.patch | 26 - .../haskell-patches/yesod-core_expand_TH.patch | 427 +++++ ...orm_1.2.1.1-0001-prepare-for-Evil-Splicer.patch | 83 - .../yesod-form_1.2.1.1-0002-expand-TH.patch | 1606 ------------------ .../haskell-patches/yesod-form_spliced-TH.patch | 1746 ++++++++++++++++++++ .../yesod-persistent_1.1.0.1_0001-avoid-TH.patch | 41 - .../yesod-persistent_do-not-really-build.patch | 26 + ..._1.1.8_0001-hacked-up-to-build-on-Android.patch | 157 -- .../yesod_hacked-up-for-Android.patch | 74 + ...lib_0.5.4.0_0001-hack-to-build-on-Android.patch | 13 - standalone/android/install-haskell-packages | 254 +-- 43 files changed, 3882 insertions(+), 4847 deletions(-) delete mode 100644 standalone/android/haskell-patches/DAV_0.3-0001-build-without-TH.patch create mode 100644 standalone/android/haskell-patches/DAV_build-without-TH.patch create mode 100644 standalone/android/haskell-patches/MonadCatchIO-transformers_hack-to-get-to-build-with-new-ghc.patch create mode 100644 standalone/android/haskell-patches/SafeSemaphore_fix-build-with-new-base.patch create mode 100644 standalone/android/haskell-patches/bloomfilter_fix-build-with-newer-base.patch create mode 100644 standalone/android/haskell-patches/comonad_cross-build.patch create mode 100644 standalone/android/haskell-patches/entropy_cross-build.patch delete mode 100644 standalone/android/haskell-patches/hamlet_1.1.6.1_0001-remove-TH.patch create mode 100644 standalone/android/haskell-patches/hamlet_export-TH-splice-stuff.patch delete mode 100644 standalone/android/haskell-patches/lens_3.8.5-0001-build-without-TH.patch create mode 100644 standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch delete mode 100644 standalone/android/haskell-patches/lifted-base_0.2.0.2_0001-hacked-for-newer-ghc.patch create mode 100644 standalone/android/haskell-patches/lifted-base_crossbuild.patch create mode 100644 standalone/android/haskell-patches/persistent-template_stub-out.patch create mode 100644 standalone/android/haskell-patches/primitive_fix-build-with-new-ghc.patch create mode 100644 standalone/android/haskell-patches/process_fix-build-with-new-ghc.patch delete mode 100644 standalone/android/haskell-patches/shakespeare-js_1.1.2_0001-remove-TH.patch create mode 100644 standalone/android/haskell-patches/shakespeare-js_TH-exports.patch delete mode 100644 standalone/android/haskell-patches/shakespeare_1.0.3_0001-remove-TH.patch create mode 100644 standalone/android/haskell-patches/skein_hardcode_little-endian.patch create mode 100644 standalone/android/haskell-patches/unordered-containers_fix-build-with-new-ghc.patch delete mode 100644 standalone/android/haskell-patches/vector_0.10.0.1_0001-disable-optimisation-that-breaks-when-cross-compilin.patch create mode 100644 standalone/android/haskell-patches/vector_hack-to-build-with-new-ghc.patch create mode 100644 standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch delete mode 100644 standalone/android/haskell-patches/yesod-core_1.1.8_0001-remove-TH.patch delete mode 100644 standalone/android/haskell-patches/yesod-core_1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch delete mode 100644 standalone/android/haskell-patches/yesod-core_1.1.8_0003-exports-for-TH-splices.patch create mode 100644 standalone/android/haskell-patches/yesod-core_expand_TH.patch delete mode 100644 standalone/android/haskell-patches/yesod-form_1.2.1.1-0001-prepare-for-Evil-Splicer.patch delete mode 100644 standalone/android/haskell-patches/yesod-form_1.2.1.1-0002-expand-TH.patch create mode 100644 standalone/android/haskell-patches/yesod-form_spliced-TH.patch delete mode 100644 standalone/android/haskell-patches/yesod-persistent_1.1.0.1_0001-avoid-TH.patch create mode 100644 standalone/android/haskell-patches/yesod-persistent_do-not-really-build.patch delete mode 100644 standalone/android/haskell-patches/yesod_1.1.8_0001-hacked-up-to-build-on-Android.patch create mode 100644 standalone/android/haskell-patches/yesod_hacked-up-for-Android.patch diff --git a/doc/install/Android.mdwn b/doc/install/Android.mdwn index 6b2cb3a53..da5f6a645 100644 --- a/doc/install/Android.mdwn +++ b/doc/install/Android.mdwn @@ -22,11 +22,14 @@ of Bath CS department. git-annex can be built for Android, with `make android`. It's not an easy process: -* First, install . +* First, install . + The easiest way is to follow the instructions at the end of its README.md + to install in a Debian stable chroot. +* In git-annex's `standalone/android/` directory, run + `./install-haskell-packages native && ./install-haskell-packages cross` * You will need to have the Android SDK and NDK installed; see `standalone/android/Makefile` to configure the paths to them. You'll also need ant, and the JDK. -* In `standalone/android/`, run `install-haskell-packages native` * You also need to install git and all the utilities listed on [[fromscratch]], on the system doing the building. * Then to build the full Android app bundle, use `make androidapp` diff --git a/standalone/android/haskell-patches/DAV_0.3-0001-build-without-TH.patch b/standalone/android/haskell-patches/DAV_0.3-0001-build-without-TH.patch deleted file mode 100644 index 3fbf764c2..000000000 --- a/standalone/android/haskell-patches/DAV_0.3-0001-build-without-TH.patch +++ /dev/null @@ -1,306 +0,0 @@ -From d195f807dac2351d29aeff00d2aee3e151eb82e3 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 18 Apr 2013 19:37:28 -0400 -Subject: [PATCH] build without TH - -Used the EvilSplicer to expand the TH - -Left off CmdArgs to save time. ---- - DAV.cabal | 20 +---- - Network/Protocol/HTTP/DAV.hs | 53 ++++++++++--- - Network/Protocol/HTTP/DAV/TH.hs | 167 ++++++++++++++++++++++++++++++++++++++- - 3 files changed, 207 insertions(+), 33 deletions(-) - -diff --git a/DAV.cabal b/DAV.cabal -index 774d4e5..8b85133 100644 ---- a/DAV.cabal -+++ b/DAV.cabal -@@ -38,25 +38,7 @@ library - , transformers >= 0.3 - , xml-conduit >= 1.0 && <= 1.1 - , xml-hamlet >= 0.4 && <= 0.5 --executable hdav -- main-is: hdav.hs -- ghc-options: -Wall -- build-depends: base >= 4.5 && <= 5 -- , bytestring -- , bytestring -- , case-insensitive >= 0.4 -- , cmdargs >= 0.9 -- , containers -- , http-conduit >= 1.4 -- , http-types >= 0.7 -- , lens >= 3.0 -- , lifted-base >= 0.1 -- , mtl >= 2.1 -- , network >= 2.3 -- , resourcet >= 0.3 -- , transformers >= 0.3 -- , xml-conduit >= 1.0 && <= 1.1 -- , xml-hamlet >= 0.4 && <= 0.5 -+ , text - - source-repository head - type: git -diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs -index 02e5d15..c0be362 100644 ---- a/Network/Protocol/HTTP/DAV.hs -+++ b/Network/Protocol/HTTP/DAV.hs -@@ -52,7 +52,8 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho - - import qualified Text.XML as XML - import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName) --import Text.Hamlet.XML (xml) -+import Text.Hamlet.XML -+import qualified Data.Text - - import Data.CaseInsensitive (mk) - -@@ -246,18 +247,48 @@ makeCollection url username password = withDS url username password $ - propname :: XML.Document - propname = XML.Document (XML.Prologue [] Nothing []) root [] - where -- root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml| -- --|] -+ root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) $ concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:allprop") Nothing Nothing) -+ Map.empty -+ (concat []))]] -+ - - locky :: XML.Document - locky = XML.Document (XML.Prologue [] Nothing []) root [] - where -- root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml| -- -- -- -- --Haskell DAV user --|] -+ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:lockscope") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:exclusive") Nothing Nothing) -+ Map.empty -+ (concat []))]]))], -+ [XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:locktype") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name (Data.Text.pack "D:write") Nothing Nothing) -+ Map.empty -+ (concat []))]]))], -+ [XML.NodeElement -+ (XML.Element -+ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeContent -+ (Data.Text.pack "Haskell DAV user")]]))]] -+ - -diff --git a/Network/Protocol/HTTP/DAV/TH.hs b/Network/Protocol/HTTP/DAV/TH.hs -index 036a2bc..4d3c0f4 100644 ---- a/Network/Protocol/HTTP/DAV/TH.hs -+++ b/Network/Protocol/HTTP/DAV/TH.hs -@@ -16,11 +16,13 @@ - -- You should have received a copy of the GNU General Public License - -- along with this program. If not, see . - --{-# LANGUAGE TemplateHaskell #-} -+{-# LANGUAGE RankNTypes #-} - - module Network.Protocol.HTTP.DAV.TH where - --import Control.Lens (makeLenses) -+import Control.Lens -+import qualified Control.Lens.Type -+import qualified Data.Functor - import qualified Data.ByteString as B - import Network.HTTP.Conduit (Manager, Request) - -@@ -33,4 +35,163 @@ data DAVContext a = DAVContext { - , _basicusername :: B.ByteString - , _basicpassword :: B.ByteString - } --makeLenses ''DAVContext -+allowedMethods :: -+ forall a_a4Oo. -+ Control.Lens.Type.Lens' (DAVContext a_a4Oo) [B.ByteString] -+allowedMethods -+ _f_a5tt -+ (DAVContext __allowedMethods'_a5tu -+ __baseRequest_a5tw -+ __complianceClasses_a5tx -+ __httpManager_a5ty -+ __lockToken_a5tz -+ __basicusername_a5tA -+ __basicpassword_a5tB) -+ = ((\ __allowedMethods_a5tv -+ -> DAVContext -+ __allowedMethods_a5tv -+ __baseRequest_a5tw -+ __complianceClasses_a5tx -+ __httpManager_a5ty -+ __lockToken_a5tz -+ __basicusername_a5tA -+ __basicpassword_a5tB) -+ Data.Functor.<$> (_f_a5tt __allowedMethods'_a5tu)) -+{-# INLINE allowedMethods #-} -+baseRequest :: -+ forall a_a4Oo a_a5tC. -+ Control.Lens.Type.Lens (DAVContext a_a4Oo) (DAVContext a_a5tC) (Request a_a4Oo) (Request a_a5tC) -+baseRequest -+ _f_a5tD -+ (DAVContext __allowedMethods_a5tE -+ __baseRequest'_a5tF -+ __complianceClasses_a5tH -+ __httpManager_a5tI -+ __lockToken_a5tJ -+ __basicusername_a5tK -+ __basicpassword_a5tL) -+ = ((\ __baseRequest_a5tG -+ -> DAVContext -+ __allowedMethods_a5tE -+ __baseRequest_a5tG -+ __complianceClasses_a5tH -+ __httpManager_a5tI -+ __lockToken_a5tJ -+ __basicusername_a5tK -+ __basicpassword_a5tL) -+ Data.Functor.<$> (_f_a5tD __baseRequest'_a5tF)) -+{-# INLINE baseRequest #-} -+basicpassword :: -+ forall a_a4Oo. -+ Control.Lens.Type.Lens' (DAVContext a_a4Oo) B.ByteString -+basicpassword -+ _f_a5tM -+ (DAVContext __allowedMethods_a5tN -+ __baseRequest_a5tO -+ __complianceClasses_a5tP -+ __httpManager_a5tQ -+ __lockToken_a5tR -+ __basicusername_a5tS -+ __basicpassword'_a5tT) -+ = ((\ __basicpassword_a5tU -+ -> DAVContext -+ __allowedMethods_a5tN -+ __baseRequest_a5tO -+ __complianceClasses_a5tP -+ __httpManager_a5tQ -+ __lockToken_a5tR -+ __basicusername_a5tS -+ __basicpassword_a5tU) -+ Data.Functor.<$> (_f_a5tM __basicpassword'_a5tT)) -+{-# INLINE basicpassword #-} -+basicusername :: -+ forall a_a4Oo. -+ Control.Lens.Type.Lens' (DAVContext a_a4Oo) B.ByteString -+basicusername -+ _f_a5tV -+ (DAVContext __allowedMethods_a5tW -+ __baseRequest_a5tX -+ __complianceClasses_a5tY -+ __httpManager_a5tZ -+ __lockToken_a5u0 -+ __basicusername'_a5u1 -+ __basicpassword_a5u3) -+ = ((\ __basicusername_a5u2 -+ -> DAVContext -+ __allowedMethods_a5tW -+ __baseRequest_a5tX -+ __complianceClasses_a5tY -+ __httpManager_a5tZ -+ __lockToken_a5u0 -+ __basicusername_a5u2 -+ __basicpassword_a5u3) -+ Data.Functor.<$> (_f_a5tV __basicusername'_a5u1)) -+{-# INLINE basicusername #-} -+complianceClasses :: -+ forall a_a4Oo. -+ Control.Lens.Type.Lens' (DAVContext a_a4Oo) [B.ByteString] -+complianceClasses -+ _f_a5u4 -+ (DAVContext __allowedMethods_a5u5 -+ __baseRequest_a5u6 -+ __complianceClasses'_a5u7 -+ __httpManager_a5u9 -+ __lockToken_a5ua -+ __basicusername_a5ub -+ __basicpassword_a5uc) -+ = ((\ __complianceClasses_a5u8 -+ -> DAVContext -+ __allowedMethods_a5u5 -+ __baseRequest_a5u6 -+ __complianceClasses_a5u8 -+ __httpManager_a5u9 -+ __lockToken_a5ua -+ __basicusername_a5ub -+ __basicpassword_a5uc) -+ Data.Functor.<$> (_f_a5u4 __complianceClasses'_a5u7)) -+{-# INLINE complianceClasses #-} -+httpManager :: -+ forall a_a4Oo. Control.Lens.Type.Lens' (DAVContext a_a4Oo) Manager -+httpManager -+ _f_a5ud -+ (DAVContext __allowedMethods_a5ue -+ __baseRequest_a5uf -+ __complianceClasses_a5ug -+ __httpManager'_a5uh -+ __lockToken_a5uj -+ __basicusername_a5uk -+ __basicpassword_a5ul) -+ = ((\ __httpManager_a5ui -+ -> DAVContext -+ __allowedMethods_a5ue -+ __baseRequest_a5uf -+ __complianceClasses_a5ug -+ __httpManager_a5ui -+ __lockToken_a5uj -+ __basicusername_a5uk -+ __basicpassword_a5ul) -+ Data.Functor.<$> (_f_a5ud __httpManager'_a5uh)) -+{-# INLINE httpManager #-} -+lockToken :: -+ forall a_a4Oo. -+ Control.Lens.Type.Lens' (DAVContext a_a4Oo) (Maybe B.ByteString) -+lockToken -+ _f_a5um -+ (DAVContext __allowedMethods_a5un -+ __baseRequest_a5uo -+ __complianceClasses_a5up -+ __httpManager_a5uq -+ __lockToken'_a5ur -+ __basicusername_a5ut -+ __basicpassword_a5uu) -+ = ((\ __lockToken_a5us -+ -> DAVContext -+ __allowedMethods_a5un -+ __baseRequest_a5uo -+ __complianceClasses_a5up -+ __httpManager_a5uq -+ __lockToken_a5us -+ __basicusername_a5ut -+ __basicpassword_a5uu) -+ Data.Functor.<$> (_f_a5um __lockToken'_a5ur)) -+{-# INLINE lockToken #-} --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/DAV_build-without-TH.patch b/standalone/android/haskell-patches/DAV_build-without-TH.patch new file mode 100644 index 000000000..b871fa9ef --- /dev/null +++ b/standalone/android/haskell-patches/DAV_build-without-TH.patch @@ -0,0 +1,377 @@ +From 2b5fc33607720d0cccd7d8f9cb7232042ead73e6 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 00:36:56 +0000 +Subject: [PATCH] expand TH + +used the EvilSplicer ++ manual fix ups +--- + DAV.cabal | 20 +-- + Network/Protocol/HTTP/DAV.hs | 73 ++++++----- + Network/Protocol/HTTP/DAV/TH.hs | 196 +++++++++++++++++++++++++++- + dist/build/HSDAV-0.4.1.o | Bin 140080 -> 0 bytes + dist/build/Network/Protocol/HTTP/DAV.hi | Bin 34549 -> 57657 bytes + dist/build/Network/Protocol/HTTP/DAV.o | Bin 160248 -> 201932 bytes + dist/build/Network/Protocol/HTTP/DAV/TH.hi | Bin 17056 -> 18733 bytes + dist/build/Network/Protocol/HTTP/DAV/TH.o | Bin 19672 -> 28120 bytes + dist/build/autogen/Paths_DAV.hs | 18 ++- + dist/build/autogen/cabal_macros.h | 45 +++---- + dist/build/libHSDAV-0.4.1.a | Bin 200082 -> 260188 bytes + dist/package.conf.inplace | 2 - + dist/setup-config | 2 - + 13 files changed, 266 insertions(+), 90 deletions(-) + delete mode 100644 dist/build/HSDAV-0.4.1.o + delete mode 100644 dist/package.conf.inplace + delete mode 100644 dist/setup-config + +diff --git a/DAV.cabal b/DAV.cabal +index 06b3a8b..90368c6 100644 +--- a/DAV.cabal ++++ b/DAV.cabal +@@ -38,25 +38,7 @@ library + , transformers >= 0.3 + , xml-conduit >= 1.0 && <= 1.2 + , xml-hamlet >= 0.4 && <= 0.5 +-executable hdav +- main-is: hdav.hs +- ghc-options: -Wall +- build-depends: base >= 4.5 && <= 5 +- , bytestring +- , bytestring +- , case-insensitive >= 0.4 +- , containers +- , http-conduit >= 1.9.0 +- , http-types >= 0.7 +- , lens >= 3.0 +- , lifted-base >= 0.1 +- , mtl >= 2.1 +- , network >= 2.3 +- , optparse-applicative +- , resourcet >= 0.3 +- , transformers >= 0.3 +- , xml-conduit >= 1.0 && <= 1.2 +- , xml-hamlet >= 0.4 && <= 0.5 ++ , text + + source-repository head + type: git +diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs +index 8ffc270..d064a8f 100644 +--- a/Network/Protocol/HTTP/DAV.hs ++++ b/Network/Protocol/HTTP/DAV.hs +@@ -28,12 +28,12 @@ module Network.Protocol.HTTP.DAV ( + , deleteContent + , moveContent + , makeCollection +- , caldavReport + , module Network.Protocol.HTTP.DAV.TH + ) where + + import Network.Protocol.HTTP.DAV.TH + ++import qualified Data.Text + import Control.Applicative (liftA2) + import Control.Exception.Lifted (catchJust, finally, bracketOnError) + import Control.Lens ((.~), (^.)) +@@ -200,11 +200,6 @@ props2patch = XML.renderLBS XML.def . patch . props . fromDocument + , "{DAV:}supportedlock" + ] + +-caldavReportM :: MonadResourceBase m => DAVState m XML.Document +-caldavReportM = do +- let ahs = [(hContentType, "application/xml; charset=\"utf-8\"")] +- calrresp <- davRequest "REPORT" ahs (xmlBody calendarquery) +- return $ (XML.parseLBS_ def . responseBody) calrresp + + getProps :: String -> B.ByteString -> B.ByteString -> Maybe Depth -> IO XML.Document + getProps url username password md = withDS url username password md getPropsM +@@ -246,9 +241,6 @@ moveContent :: String -> B.ByteString -> B.ByteString -> B.ByteString -> IO () + moveContent url newurl username password = withDS url username password Nothing $ + moveContentM newurl + +-caldavReport :: String -> B.ByteString -> B.ByteString -> IO XML.Document +-caldavReport url username password = withDS url username password (Just Depth1) $ caldavReportM +- + -- | Creates a WebDAV collection, which is similar to a directory. + -- + -- Returns False if the collection could not be made due to an intermediate +@@ -264,28 +256,45 @@ makeCollection url username password = withDS url username password Nothing $ + propname :: XML.Document + propname = XML.Document (XML.Prologue [] Nothing []) root [] + where +- root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml| +- +-|] +- ++ root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) $ concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:allprop") Nothing Nothing) ++ Map.empty ++ (concat []))]] + locky :: XML.Document + locky = XML.Document (XML.Prologue [] Nothing []) root [] +- where +- root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml| +- +- +- +- +-Haskell DAV user +-|] +- +-calendarquery :: XML.Document +-calendarquery = XML.Document (XML.Prologue [] Nothing []) root [] +- where +- root = XML.Element "C:calendar-query" (Map.fromList [("xmlns:D", "DAV:"),("xmlns:C", "urn:ietf:params:xml:ns:caldav")]) [xml| +- +- +- +- +- +-|] ++ where ++ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:lockscope") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:exclusive") Nothing Nothing) ++ Map.empty ++ (concat []))]]))], ++ [XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:locktype") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name (Data.Text.pack "D:write") Nothing Nothing) ++ Map.empty ++ (concat []))]]))], ++ [XML.NodeElement ++ (XML.Element ++ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeContent ++ (Data.Text.pack "Haskell DAV user")]]))]] ++ +diff --git a/Network/Protocol/HTTP/DAV/TH.hs b/Network/Protocol/HTTP/DAV/TH.hs +index 9fb3495..18b8df7 100644 +--- a/Network/Protocol/HTTP/DAV/TH.hs ++++ b/Network/Protocol/HTTP/DAV/TH.hs +@@ -20,7 +20,8 @@ + + module Network.Protocol.HTTP.DAV.TH where + +-import Control.Lens (makeLenses) ++import qualified Control.Lens.Type ++import qualified Data.Functor + import qualified Data.ByteString as B + import Network.HTTP.Conduit (Manager, Request) + +@@ -46,4 +47,195 @@ data DAVContext a = DAVContext { + , _basicpassword :: B.ByteString + , _depth :: Maybe Depth + } +-makeLenses ''DAVContext ++allowedMethods :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) [B.ByteString] ++allowedMethods ++ _f_a5GM ++ (DAVContext __allowedMethods'_a5GN ++ __baseRequest_a5GP ++ __complianceClasses_a5GQ ++ __httpManager_a5GR ++ __lockToken_a5GS ++ __basicusername_a5GT ++ __basicpassword_a5GU ++ __depth_a5GV) ++ = ((\ __allowedMethods_a5GO ++ -> DAVContext ++ __allowedMethods_a5GO ++ __baseRequest_a5GP ++ __complianceClasses_a5GQ ++ __httpManager_a5GR ++ __lockToken_a5GS ++ __basicusername_a5GT ++ __basicpassword_a5GU ++ __depth_a5GV) ++ Data.Functor.<$> (_f_a5GM __allowedMethods'_a5GN)) ++{-# INLINE allowedMethods #-} ++baseRequest :: ++ Control.Lens.Type.Lens (DAVContext a_a4I4) (DAVContext a_a5GW) (Request a_a4I4) (Request a_a5GW) ++baseRequest ++ _f_a5GX ++ (DAVContext __allowedMethods_a5GY ++ __baseRequest'_a5GZ ++ __complianceClasses_a5H1 ++ __httpManager_a5H2 ++ __lockToken_a5H3 ++ __basicusername_a5H4 ++ __basicpassword_a5H5 ++ __depth_a5H6) ++ = ((\ __baseRequest_a5H0 ++ -> DAVContext ++ __allowedMethods_a5GY ++ __baseRequest_a5H0 ++ __complianceClasses_a5H1 ++ __httpManager_a5H2 ++ __lockToken_a5H3 ++ __basicusername_a5H4 ++ __basicpassword_a5H5 ++ __depth_a5H6) ++ Data.Functor.<$> (_f_a5GX __baseRequest'_a5GZ)) ++{-# INLINE baseRequest #-} ++basicpassword :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) B.ByteString ++basicpassword ++ _f_a5H7 ++ (DAVContext __allowedMethods_a5H8 ++ __baseRequest_a5H9 ++ __complianceClasses_a5Ha ++ __httpManager_a5Hb ++ __lockToken_a5Hc ++ __basicusername_a5Hd ++ __basicpassword'_a5He ++ __depth_a5Hg) ++ = ((\ __basicpassword_a5Hf ++ -> DAVContext ++ __allowedMethods_a5H8 ++ __baseRequest_a5H9 ++ __complianceClasses_a5Ha ++ __httpManager_a5Hb ++ __lockToken_a5Hc ++ __basicusername_a5Hd ++ __basicpassword_a5Hf ++ __depth_a5Hg) ++ Data.Functor.<$> (_f_a5H7 __basicpassword'_a5He)) ++{-# INLINE basicpassword #-} ++basicusername :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) B.ByteString ++basicusername ++ _f_a5Hh ++ (DAVContext __allowedMethods_a5Hi ++ __baseRequest_a5Hj ++ __complianceClasses_a5Hk ++ __httpManager_a5Hl ++ __lockToken_a5Hm ++ __basicusername'_a5Hn ++ __basicpassword_a5Hp ++ __depth_a5Hq) ++ = ((\ __basicusername_a5Ho ++ -> DAVContext ++ __allowedMethods_a5Hi ++ __baseRequest_a5Hj ++ __complianceClasses_a5Hk ++ __httpManager_a5Hl ++ __lockToken_a5Hm ++ __basicusername_a5Ho ++ __basicpassword_a5Hp ++ __depth_a5Hq) ++ Data.Functor.<$> (_f_a5Hh __basicusername'_a5Hn)) ++{-# INLINE basicusername #-} ++complianceClasses :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) [B.ByteString] ++complianceClasses ++ _f_a5Hr ++ (DAVContext __allowedMethods_a5Hs ++ __baseRequest_a5Ht ++ __complianceClasses'_a5Hu ++ __httpManager_a5Hw ++ __lockToken_a5Hx ++ __basicusername_a5Hy ++ __basicpassword_a5Hz ++ __depth_a5HA) ++ = ((\ __complianceClasses_a5Hv ++ -> DAVContext ++ __allowedMethods_a5Hs ++ __baseRequest_a5Ht ++ __complianceClasses_a5Hv ++ __httpManager_a5Hw ++ __lockToken_a5Hx ++ __basicusername_a5Hy ++ __basicpassword_a5Hz ++ __depth_a5HA) ++ Data.Functor.<$> (_f_a5Hr __complianceClasses'_a5Hu)) ++{-# INLINE complianceClasses #-} ++depth :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) (Maybe Depth) ++depth ++ _f_a5HB ++ (DAVContext __allowedMethods_a5HC ++ __baseRequest_a5HD ++ __complianceClasses_a5HE ++ __httpManager_a5HF ++ __lockToken_a5HG ++ __basicusername_a5HH ++ __basicpassword_a5HI ++ __depth'_a5HJ) ++ = ((\ __depth_a5HK ++ -> DAVContext ++ __allowedMethods_a5HC ++ __baseRequest_a5HD ++ __complianceClasses_a5HE ++ __httpManager_a5HF ++ __lockToken_a5HG ++ __basicusername_a5HH ++ __basicpassword_a5HI ++ __depth_a5HK) ++ Data.Functor.<$> (_f_a5HB __depth'_a5HJ)) ++{-# INLINE depth #-} ++httpManager :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) Manager ++httpManager ++ _f_a5HL ++ (DAVContext __allowedMethods_a5HM ++ __baseRequest_a5HN ++ __complianceClasses_a5HO ++ __httpManager'_a5HP ++ __lockToken_a5HR ++ __basicusername_a5HS ++ __basicpassword_a5HT ++ __depth_a5HU) ++ = ((\ __httpManager_a5HQ ++ -> DAVContext ++ __allowedMethods_a5HM ++ __baseRequest_a5HN ++ __complianceClasses_a5HO ++ __httpManager_a5HQ ++ __lockToken_a5HR ++ __basicusername_a5HS ++ __basicpassword_a5HT ++ __depth_a5HU) ++ Data.Functor.<$> (_f_a5HL __httpManager'_a5HP)) ++{-# INLINE httpManager #-} ++lockToken :: ++ Control.Lens.Type.Lens' (DAVContext a_a4I4) (Maybe B.ByteString) ++lockToken ++ _f_a5HV ++ (DAVContext __allowedMethods_a5HW ++ __baseRequest_a5HX ++ __complianceClasses_a5HY ++ __httpManager_a5HZ ++ __lockToken'_a5I0 ++ __basicusername_a5I2 ++ __basicpassword_a5I3 ++ __depth_a5I4) ++ = ((\ __lockToken_a5I1 ++ -> DAVContext ++ __allowedMethods_a5HW ++ __baseRequest_a5HX ++ __complianceClasses_a5HY ++ __httpManager_a5HZ ++ __lockToken_a5I1 ++ __basicusername_a5I2 ++ __basicpassword_a5I3 ++ __depth_a5I4) ++ Data.Functor.<$> (_f_a5HV __lockToken'_a5I0)) ++{-# INLINE lockToken #-} diff --git a/standalone/android/haskell-patches/HTTP_4000.2.8-0001-build-with-base-4.8.patch b/standalone/android/haskell-patches/HTTP_4000.2.8-0001-build-with-base-4.8.patch index 3114653f2..dfcdc387f 100644 --- a/standalone/android/haskell-patches/HTTP_4000.2.8-0001-build-with-base-4.8.patch +++ b/standalone/android/haskell-patches/HTTP_4000.2.8-0001-build-with-base-4.8.patch @@ -1,31 +1,25 @@ -From 32d0741c64e6bd280e46f7c452db9462fbac05f9 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Tue, 7 May 2013 18:21:04 -0400 -Subject: [PATCH] fix build +From 5c57c4ae7dac0c1aa940005f5ea55fdcd4fcd1f5 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 22:46:42 +0000 +Subject: [PATCH] fix build with new base --- - HTTP.cabal | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + HTTP.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTTP.cabal b/HTTP.cabal -index 76cb5d6..edddf26 100644 +index 76cb5d6..bb38f24 100644 --- a/HTTP.cabal +++ b/HTTP.cabal -@@ -85,12 +85,12 @@ Library +@@ -85,7 +85,7 @@ Library Network.HTTP.Utils Paths_HTTP GHC-options: -fwarn-missing-signatures -Wall - Build-depends: base >= 2 && < 4.7, network < 2.5, parsec -+ Build-depends: base >= 2 && < 4.8, network < 2.5, parsec ++ Build-depends: base >= 2 && < 4.9, network < 2.5, parsec Extensions: FlexibleInstances if flag(old-base) Build-depends: base < 3 - else -- Build-depends: base >= 3, array, old-time, bytestring -+ Build-depends: base >= 3, array, old-time, bytestring (>= 0.10.3.0) - - if flag(mtl1) - Build-depends: mtl >= 1.1 && < 1.2 -- 1.7.10.4 diff --git a/standalone/android/haskell-patches/MonadCatchIO-transformers_hack-to-get-to-build-with-new-ghc.patch b/standalone/android/haskell-patches/MonadCatchIO-transformers_hack-to-get-to-build-with-new-ghc.patch new file mode 100644 index 000000000..9881d35d6 --- /dev/null +++ b/standalone/android/haskell-patches/MonadCatchIO-transformers_hack-to-get-to-build-with-new-ghc.patch @@ -0,0 +1,56 @@ +From 083c9d135ec68316db173235994c63603ad76444 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:01:35 +0000 +Subject: [PATCH] hack to get to build with new ghc + +Copied the old implemenations of block and unblock from old Control.Exception +since these deprecated functions have now been removed. +--- + MonadCatchIO-transformers.cabal | 2 +- + src/Control/Monad/CatchIO.hs | 13 +++++++++++-- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/MonadCatchIO-transformers.cabal b/MonadCatchIO-transformers.cabal +index fe6674d..b9f559f 100644 +--- a/MonadCatchIO-transformers.cabal ++++ b/MonadCatchIO-transformers.cabal +@@ -26,4 +26,4 @@ Library + Exposed-Modules: + Control.Monad.CatchIO + Hs-Source-Dirs: src +- Ghc-options: -Wall ++ Ghc-options: -Wall -fglasgow-exts +diff --git a/src/Control/Monad/CatchIO.hs b/src/Control/Monad/CatchIO.hs +index 62afb83..853996b 100644 +--- a/src/Control/Monad/CatchIO.hs ++++ b/src/Control/Monad/CatchIO.hs +@@ -19,6 +19,9 @@ where + import Prelude hiding ( catch ) + import Control.Applicative ((<$>)) + import qualified Control.Exception.Extensible as E ++import qualified Control.Exception.Base as E ++import GHC.Base (maskAsyncExceptions#) ++import GHC.IO (unsafeUnmask, IO(..)) + + import Control.Monad.IO.Class (MonadIO,liftIO) + +@@ -51,8 +54,14 @@ class MonadIO m => MonadCatchIO m where + + instance MonadCatchIO IO where + catch = E.catch +- block = E.block +- unblock = E.unblock ++ block = oldblock ++ unblock = oldunblock ++ ++oldblock :: IO a -> IO a ++oldblock (IO io) = IO $ maskAsyncExceptions# io ++ ++oldunblock :: IO a -> IO a ++oldunblock = unsafeUnmask + + -- | Warning: this instance is somewhat contentious. + -- +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/SafeSemaphore_fix-build-with-new-base.patch b/standalone/android/haskell-patches/SafeSemaphore_fix-build-with-new-base.patch new file mode 100644 index 000000000..a79ca519a --- /dev/null +++ b/standalone/android/haskell-patches/SafeSemaphore_fix-build-with-new-base.patch @@ -0,0 +1,36 @@ +From 010db89634eb0f64e7961581e65da3acbb2b9f3d Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 22:05:41 +0000 +Subject: [PATCH] fix build with new base + +--- + src/Control/Concurrent/MSampleVar.hs | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/Control/Concurrent/MSampleVar.hs b/src/Control/Concurrent/MSampleVar.hs +index d029c64..16ad6c5 100644 +--- a/src/Control/Concurrent/MSampleVar.hs ++++ b/src/Control/Concurrent/MSampleVar.hs +@@ -30,7 +30,7 @@ module Control.Concurrent.MSampleVar + import Control.Monad(void,join) + import Control.Concurrent.MVar(MVar,newMVar,newEmptyMVar,tryTakeMVar,takeMVar,putMVar,withMVar,isEmptyMVar) + import Control.Exception(mask_) +-import Data.Typeable(Typeable1(typeOf1),mkTyCon,mkTyConApp) ++import Data.Typeable(mkTyConApp) + + -- | + -- Sample variables are slightly different from a normal 'MVar': +@@ -62,10 +62,6 @@ data MSampleVar a = MSampleVar { readQueue :: MVar () + , lockedStore :: MVar (MVar a) } + deriving (Eq) + +-instance Typeable1 MSampleVar where +- typeOf1 _ = mkTyConApp tc [] +- where tc = mkTyCon "MSampleVar" +- + + -- | 'newEmptySV' allocates a new MSampleVar in an empty state. No futher + -- allocation is done when using the 'MSampleVar'. +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/bloomfilter_fix-build-with-newer-base.patch b/standalone/android/haskell-patches/bloomfilter_fix-build-with-newer-base.patch new file mode 100644 index 000000000..d2f783a7f --- /dev/null +++ b/standalone/android/haskell-patches/bloomfilter_fix-build-with-newer-base.patch @@ -0,0 +1,26 @@ +From 09bcaf4f203c39c967a6951d56fd015347bb5dae Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 21:57:21 +0000 +Subject: [PATCH] fix build with newer base + +--- + Data/BloomFilter/Array.hs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Data/BloomFilter/Array.hs b/Data/BloomFilter/Array.hs +index e085bbe..d94757a 100644 +--- a/Data/BloomFilter/Array.hs ++++ b/Data/BloomFilter/Array.hs +@@ -3,7 +3,8 @@ + + module Data.BloomFilter.Array (newArray) where + +-import Control.Monad.ST (ST, unsafeIOToST) ++import Control.Monad.ST (ST) ++import Control.Monad.ST.Unsafe (unsafeIOToST) + import Data.Array.Base (MArray, STUArray(..), unsafeNewArray_) + #if __GLASGOW_HASKELL__ >= 704 + import Foreign.C.Types (CInt(..), CSize(..)) +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/comonad_cross-build.patch b/standalone/android/haskell-patches/comonad_cross-build.patch new file mode 100644 index 000000000..e0317926f --- /dev/null +++ b/standalone/android/haskell-patches/comonad_cross-build.patch @@ -0,0 +1,25 @@ +From 2cb43c46d345341d1aa77c4b2a88514c056d3122 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 22:25:18 +0000 +Subject: [PATCH] cross build + +--- + comonad.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/comonad.cabal b/comonad.cabal +index e01f1a7..e807e05 100644 +--- a/comonad.cabal ++++ b/comonad.cabal +@@ -13,7 +13,7 @@ copyright: Copyright (C) 2008-2013 Edward A. Kmett, + Copyright (C) 2004-2008 Dave Menendez + synopsis: Haskell 98 compatible comonads + description: Haskell 98 compatible comonads +-build-type: Custom ++build-type: Simple + extra-source-files: + .gitignore + .travis.yml +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/entropy_cross-build.patch b/standalone/android/haskell-patches/entropy_cross-build.patch new file mode 100644 index 000000000..d09cd13ec --- /dev/null +++ b/standalone/android/haskell-patches/entropy_cross-build.patch @@ -0,0 +1,25 @@ +From 35c6718205e9d7f5e5fc44578ea6a9971beac151 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:32:18 +0000 +Subject: [PATCH] cross build + +--- + entropy.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/entropy.cabal b/entropy.cabal +index 45e4705..17553d8 100644 +--- a/entropy.cabal ++++ b/entropy.cabal +@@ -14,7 +14,7 @@ category: Data, Cryptography + homepage: https://github.com/TomMD/entropy + bug-reports: https://github.com/TomMD/entropy/issues + stability: stable +-build-type: Custom ++build-type: Simple + cabal-version: >= 1.6 + tested-with: GHC == 6.12.1 + data-files: +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/hamlet_1.1.6.1_0001-remove-TH.patch b/standalone/android/haskell-patches/hamlet_1.1.6.1_0001-remove-TH.patch deleted file mode 100644 index 1c511a132..000000000 --- a/standalone/android/haskell-patches/hamlet_1.1.6.1_0001-remove-TH.patch +++ /dev/null @@ -1,294 +0,0 @@ -From b2c677ed39f1aca3a1111691ba51b26f7fd414a4 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Wed, 8 May 2013 01:50:58 -0400 -Subject: [PATCH] remove TH - ---- - Text/Hamlet.hs | 219 ++------------------------------------------------------ - hamlet.cabal | 2 +- - 2 files changed, 7 insertions(+), 214 deletions(-) - -diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs -index 4ac870a..63b8555 100644 ---- a/Text/Hamlet.hs -+++ b/Text/Hamlet.hs -@@ -11,35 +11,26 @@ - module Text.Hamlet - ( -- * Plain HTML - Html -- , shamlet -- , shamletFile -- , xshamlet -- , xshamletFile - -- * Hamlet - , HtmlUrl -- , hamlet -- , hamletFile -- , xhamlet -- , xhamletFile - -- * I18N Hamlet - , HtmlUrlI18n -- , ihamlet -- , ihamletFile - -- * Type classes - , ToAttributes (..) - -- * Internal, for making more - , HamletSettings (..) - , NewlineStyle (..) -- , hamletWithSettings -- , hamletFileWithSettings - , defaultHamletSettings - , xhtmlHamletSettings - , Env (..) - , HamletRules (..) -- , hamletRules -- , ihamletRules -- , htmlRules - , CloseStyle (..) -+ , condH -+ , maybeH -+ -+ -- referred to in TH splices -+ , attrsToHtml -+ , asHtmlUrl - ) where - - import Text.Shakespeare.Base -@@ -90,14 +81,6 @@ type HtmlUrl url = Render url -> Html - -- | A function generating an 'Html' given a message translator and a URL rendering function. - type HtmlUrlI18n msg url = Translate msg -> Render url -> Html - --docsToExp :: Env -> HamletRules -> Scope -> [Doc] -> Q Exp --docsToExp env hr scope docs = do -- exps <- mapM (docToExp env hr scope) docs -- case exps of -- [] -> [|return ()|] -- [x] -> return x -- _ -> return $ DoE $ map NoBindS exps -- - unIdent :: Ident -> String - unIdent (Ident s) = s - -@@ -159,169 +142,9 @@ recordToFieldNames conStr = do - [fields] <- return [fields | RecC name fields <- cons, name == conName] - return [fieldName | (fieldName, _, _) <- fields] - --docToExp :: Env -> HamletRules -> Scope -> Doc -> Q Exp --docToExp env hr scope (DocForall list idents inside) = do -- let list' = derefToExp scope list -- (pat, extraScope) <- bindingPattern idents -- let scope' = extraScope ++ scope -- mh <- [|F.mapM_|] -- inside' <- docsToExp env hr scope' inside -- let lam = LamE [pat] inside' -- return $ mh `AppE` lam `AppE` list' --docToExp env hr scope (DocWith [] inside) = do -- inside' <- docsToExp env hr scope inside -- return $ inside' --docToExp env hr scope (DocWith ((deref, idents):dis) inside) = do -- let deref' = derefToExp scope deref -- (pat, extraScope) <- bindingPattern idents -- let scope' = extraScope ++ scope -- inside' <- docToExp env hr scope' (DocWith dis inside) -- let lam = LamE [pat] inside' -- return $ lam `AppE` deref' --docToExp env hr scope (DocMaybe val idents inside mno) = do -- let val' = derefToExp scope val -- (pat, extraScope) <- bindingPattern idents -- let scope' = extraScope ++ scope -- inside' <- docsToExp env hr scope' inside -- let inside'' = LamE [pat] inside' -- ninside' <- case mno of -- Nothing -> [|Nothing|] -- Just no -> do -- no' <- docsToExp env hr scope no -- j <- [|Just|] -- return $ j `AppE` no' -- mh <- [|maybeH|] -- return $ mh `AppE` val' `AppE` inside'' `AppE` ninside' --docToExp env hr scope (DocCond conds final) = do -- conds' <- mapM go conds -- final' <- case final of -- Nothing -> [|Nothing|] -- Just f -> do -- f' <- docsToExp env hr scope f -- j <- [|Just|] -- return $ j `AppE` f' -- ch <- [|condH|] -- return $ ch `AppE` ListE conds' `AppE` final' -- where -- go :: (Deref, [Doc]) -> Q Exp -- go (d, docs) = do -- let d' = derefToExp scope d -- docs' <- docsToExp env hr scope docs -- return $ TupE [d', docs'] --docToExp env hr scope (DocCase deref cases) = do -- let exp_ = derefToExp scope deref -- matches <- mapM toMatch cases -- return $ CaseE exp_ matches -- where -- readMay s = -- case reads s of -- (x, ""):_ -> Just x -- _ -> Nothing -- toMatch (idents, inside) = do -- let pat = case map unIdent idents of -- ["_"] -> WildP -- [str] -- | Just i <- readMay str -> LitP $ IntegerL i -- strs -> let (constr:fields) = map mkName strs -- in ConP constr (map VarP fields) -- insideExp <- docsToExp env hr scope inside -- return $ Match pat (NormalB insideExp) [] --docToExp env hr v (DocContent c) = contentToExp env hr v c -- --contentToExp :: Env -> HamletRules -> Scope -> Content -> Q Exp --contentToExp _ hr _ (ContentRaw s) = do -- os <- [|preEscapedText . pack|] -- let s' = LitE $ StringL s -- return $ hrFromHtml hr `AppE` (os `AppE` s') --contentToExp _ hr scope (ContentVar d) = do -- str <- [|toHtml|] -- return $ hrFromHtml hr `AppE` (str `AppE` derefToExp scope d) --contentToExp env hr scope (ContentUrl hasParams d) = -- case urlRender env of -- Nothing -> error "URL interpolation used, but no URL renderer provided" -- Just wrender -> wrender $ \render -> do -- let render' = return render -- ou <- if hasParams -- then [|\(u, p) -> $(render') u p|] -- else [|\u -> $(render') u []|] -- let d' = derefToExp scope d -- pet <- [|toHtml|] -- return $ hrFromHtml hr `AppE` (pet `AppE` (ou `AppE` d')) --contentToExp env hr scope (ContentEmbed d) = hrEmbed hr env $ derefToExp scope d --contentToExp env hr scope (ContentMsg d) = -- case msgRender env of -- Nothing -> error "Message interpolation used, but no message renderer provided" -- Just wrender -> wrender $ \render -> -- return $ hrFromHtml hr `AppE` (render `AppE` derefToExp scope d) --contentToExp _ hr scope (ContentAttrs d) = do -- html <- [|attrsToHtml . toAttributes|] -- return $ hrFromHtml hr `AppE` (html `AppE` derefToExp scope d) -- --shamlet :: QuasiQuoter --shamlet = hamletWithSettings htmlRules defaultHamletSettings -- --xshamlet :: QuasiQuoter --xshamlet = hamletWithSettings htmlRules xhtmlHamletSettings -- --htmlRules :: Q HamletRules --htmlRules = do -- i <- [|id|] -- return $ HamletRules i ($ (Env Nothing Nothing)) (\_ b -> return b) -- --hamlet :: QuasiQuoter --hamlet = hamletWithSettings hamletRules defaultHamletSettings -- --xhamlet :: QuasiQuoter --xhamlet = hamletWithSettings hamletRules xhtmlHamletSettings -- - asHtmlUrl :: HtmlUrl url -> HtmlUrl url - asHtmlUrl = id - --hamletRules :: Q HamletRules --hamletRules = do -- i <- [|id|] -- let ur f = do -- r <- newName "_render" -- let env = Env -- { urlRender = Just ($ (VarE r)) -- , msgRender = Nothing -- } -- h <- f env -- return $ LamE [VarP r] h -- return $ HamletRules i ur em -- where -- em (Env (Just urender) Nothing) e = do -- asHtmlUrl' <- [|asHtmlUrl|] -- urender $ \ur' -> return ((asHtmlUrl' `AppE` e) `AppE` ur') -- em _ _ = error "bad Env" -- --ihamlet :: QuasiQuoter --ihamlet = hamletWithSettings ihamletRules defaultHamletSettings -- --ihamletRules :: Q HamletRules --ihamletRules = do -- i <- [|id|] -- let ur f = do -- u <- newName "_urender" -- m <- newName "_mrender" -- let env = Env -- { urlRender = Just ($ (VarE u)) -- , msgRender = Just ($ (VarE m)) -- } -- h <- f env -- return $ LamE [VarP m, VarP u] h -- return $ HamletRules i ur em -- where -- em (Env (Just urender) (Just mrender)) e = -- urender $ \ur' -> mrender $ \mr -> return (e `AppE` mr `AppE` ur') -- em _ _ = error "bad Env" -- --hamletWithSettings :: Q HamletRules -> HamletSettings -> QuasiQuoter --hamletWithSettings hr set = -- QuasiQuoter -- { quoteExp = hamletFromString hr set -- } -- - data HamletRules = HamletRules - { hrFromHtml :: Exp - , hrWithEnv :: (Env -> Q Exp) -> Q Exp -@@ -333,36 +156,6 @@ data Env = Env - , msgRender :: Maybe ((Exp -> Q Exp) -> Q Exp) - } - --hamletFromString :: Q HamletRules -> HamletSettings -> String -> Q Exp --hamletFromString qhr set s = do -- hr <- qhr -- case parseDoc set s of -- Error s' -> error s' -- Ok (_mnl, d) -> hrWithEnv hr $ \env -> docsToExp env hr [] d -- --hamletFileWithSettings :: Q HamletRules -> HamletSettings -> FilePath -> Q Exp --hamletFileWithSettings qhr set fp = do --#ifdef GHC_7_4 -- qAddDependentFile fp --#endif -- contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp -- hamletFromString qhr set contents -- --hamletFile :: FilePath -> Q Exp --hamletFile = hamletFileWithSettings hamletRules defaultHamletSettings -- --xhamletFile :: FilePath -> Q Exp --xhamletFile = hamletFileWithSettings hamletRules xhtmlHamletSettings -- --shamletFile :: FilePath -> Q Exp --shamletFile = hamletFileWithSettings htmlRules defaultHamletSettings -- --xshamletFile :: FilePath -> Q Exp --xshamletFile = hamletFileWithSettings htmlRules xhtmlHamletSettings -- --ihamletFile :: FilePath -> Q Exp --ihamletFile = hamletFileWithSettings ihamletRules defaultHamletSettings -- - varName :: Scope -> String -> Exp - varName _ "" = error "Illegal empty varName" - varName scope v@(_:_) = fromMaybe (strToExp v) $ lookup (Ident v) scope -diff --git a/hamlet.cabal b/hamlet.cabal -index 73fa6a8..4348508 100644 ---- a/hamlet.cabal -+++ b/hamlet.cabal -@@ -50,7 +50,7 @@ library - , text >= 0.7 && < 0.12 - , containers >= 0.2 - , blaze-builder >= 0.2 && < 0.4 -- , process >= 1.0 && < 1.2 -+ , process >= 1.0 && < 1.3 - , blaze-html >= 0.5 && < 0.6 - , blaze-markup >= 0.5.1 && < 0.6 - --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/hamlet_export-TH-splice-stuff.patch b/standalone/android/haskell-patches/hamlet_export-TH-splice-stuff.patch new file mode 100644 index 000000000..a446fa18f --- /dev/null +++ b/standalone/android/haskell-patches/hamlet_export-TH-splice-stuff.patch @@ -0,0 +1,28 @@ +From 9819f4b387679c889f1259f9fd969513aa2efcf2 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 03:51:06 +0000 +Subject: [PATCH] export TH splice stuff + +--- + Text/Hamlet.hs | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs +index 6568d6c..687dec4 100644 +--- a/Text/Hamlet.hs ++++ b/Text/Hamlet.hs +@@ -40,6 +40,11 @@ module Text.Hamlet + , ihamletRules + , htmlRules + , CloseStyle (..) ++ -- referred to by TH splices ++ , asHtmlUrl ++ , maybeH ++ , condH ++ , attrsToHtml + ) where + + import Text.Shakespeare.Base +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/lens_3.8.5-0001-build-without-TH.patch b/standalone/android/haskell-patches/lens_3.8.5-0001-build-without-TH.patch deleted file mode 100644 index 62efccc32..000000000 --- a/standalone/android/haskell-patches/lens_3.8.5-0001-build-without-TH.patch +++ /dev/null @@ -1,293 +0,0 @@ -From bbb49942123f06a36b170966e445692297f71d26 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 18 Apr 2013 19:14:30 -0400 -Subject: [PATCH] build without TH - ---- - lens.cabal | 13 +------------ - src/Control/Exception/Lens.hs | 2 +- - src/Control/Lens.hs | 6 +++--- - src/Control/Lens/Equality.hs | 4 ++-- - src/Control/Lens/Fold.hs | 6 +++--- - src/Control/Lens/Internal.hs | 2 +- - src/Control/Lens/Internal/Zipper.hs | 2 +- - src/Control/Lens/Iso.hs | 2 -- - src/Control/Lens/Lens.hs | 2 +- - src/Control/Lens/Operators.hs | 2 +- - src/Control/Lens/Plated.hs | 2 +- - src/Control/Lens/Setter.hs | 2 -- - src/Control/Lens/TH.hs | 2 +- - src/Data/Data/Lens.hs | 6 +++--- - 14 files changed, 19 insertions(+), 34 deletions(-) - -diff --git a/lens.cabal b/lens.cabal -index a06b3ce..a654b3d 100644 ---- a/lens.cabal -+++ b/lens.cabal -@@ -10,7 +10,7 @@ stability: provisional - homepage: http://github.com/ekmett/lens/ - bug-reports: http://github.com/ekmett/lens/issues - copyright: Copyright (C) 2012-2013 Edward A. Kmett --build-type: Custom -+build-type: Simple - tested-with: GHC == 7.0.4, GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.1, GHC == 7.7.20121213, GHC == 7.7.20130117 - synopsis: Lenses, Folds and Traversals - description: -@@ -171,7 +171,6 @@ library - containers >= 0.4.0 && < 0.6, - distributive >= 0.3 && < 1, - filepath >= 1.2.0.0 && < 1.4, -- generic-deriving == 1.4.*, - ghc-prim, - hashable >= 1.1.2.3 && < 1.3, - MonadCatchIO-transformers >= 0.3 && < 0.4, -@@ -233,14 +232,12 @@ library - Control.Lens.Review - Control.Lens.Setter - Control.Lens.Simple -- Control.Lens.TH - Control.Lens.Traversal - Control.Lens.Tuple - Control.Lens.Type - Control.Lens.Wrapped - Control.Lens.Zipper - Control.Lens.Zoom -- Control.Monad.Error.Lens - Control.Parallel.Strategies.Lens - Control.Seq.Lens - Data.Array.Lens -@@ -264,12 +261,8 @@ library - Data.Typeable.Lens - Data.Vector.Lens - Data.Vector.Generic.Lens -- Generics.Deriving.Lens -- GHC.Generics.Lens - System.Exit.Lens - System.FilePath.Lens -- System.IO.Error.Lens -- Language.Haskell.TH.Lens - Numeric.Lens - - if flag(safe) -@@ -368,7 +361,6 @@ test-suite doctests - deepseq, - doctest >= 0.9.1, - filepath, -- generic-deriving, - mtl, - nats, - parallel, -@@ -394,7 +386,6 @@ benchmark plated - comonad, - criterion, - deepseq, -- generic-deriving, - lens, - transformers - -@@ -429,7 +420,6 @@ benchmark unsafe - comonads-fd, - criterion, - deepseq, -- generic-deriving, - lens, - transformers - -@@ -446,6 +436,5 @@ benchmark zipper - comonads-fd, - criterion, - deepseq, -- generic-deriving, - lens, - transformers -diff --git a/src/Control/Exception/Lens.hs b/src/Control/Exception/Lens.hs -index 5c26d4e..9909132 100644 ---- a/src/Control/Exception/Lens.hs -+++ b/src/Control/Exception/Lens.hs -@@ -112,7 +112,7 @@ import Prelude - , Maybe(..), Either(..), Functor(..), String, IO - ) - --{-# ANN module "HLint: ignore Use Control.Exception.catch" #-} -+ - - -- $setup - -- >>> :set -XNoOverloadedStrings -diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs -index 8481e44..74700ae 100644 ---- a/src/Control/Lens.hs -+++ b/src/Control/Lens.hs -@@ -59,7 +59,7 @@ module Control.Lens - , module Control.Lens.Review - , module Control.Lens.Setter - , module Control.Lens.Simple --#ifndef DISABLE_TEMPLATE_HASKELL -+#if 0 - , module Control.Lens.TH - #endif - , module Control.Lens.Traversal -@@ -89,7 +89,7 @@ import Control.Lens.Reified - import Control.Lens.Review - import Control.Lens.Setter - import Control.Lens.Simple --#ifndef DISABLE_TEMPLATE_HASKELL -+#if 0 - import Control.Lens.TH - #endif - import Control.Lens.Traversal -@@ -99,4 +99,4 @@ import Control.Lens.Wrapped - import Control.Lens.Zipper - import Control.Lens.Zoom - --{-# ANN module "HLint: ignore Use import/export shortcut" #-} -+ -diff --git a/src/Control/Lens/Equality.hs b/src/Control/Lens/Equality.hs -index 982c2d7..3a3fe1a 100644 ---- a/src/Control/Lens/Equality.hs -+++ b/src/Control/Lens/Equality.hs -@@ -28,8 +28,8 @@ module Control.Lens.Equality - import Control.Lens.Internal.Setter - import Control.Lens.Type - --{-# ANN module "HLint: ignore Use id" #-} --{-# ANN module "HLint: ignore Eta reduce" #-} -+ -+ - - -- $setup - -- >>> import Control.Lens -diff --git a/src/Control/Lens/Fold.hs b/src/Control/Lens/Fold.hs -index ae5100d..467eb37 100644 ---- a/src/Control/Lens/Fold.hs -+++ b/src/Control/Lens/Fold.hs -@@ -161,9 +161,9 @@ import Data.Traversable - -- >>> let g :: Expr -> Expr; g = Debug.SimpleReflect.Vars.g - -- >>> let timingOut :: NFData a => a -> IO a; timingOut = fmap (fromMaybe (error "timeout")) . timeout (5*10^6) . evaluate . force - --{-# ANN module "HLint: ignore Eta reduce" #-} --{-# ANN module "HLint: ignore Use camelCase" #-} --{-# ANN module "HLint: ignore Use curry" #-} -+ -+ -+ - - infixl 8 ^.., ^?, ^?!, ^@.., ^@?, ^@?! - -diff --git a/src/Control/Lens/Internal.hs b/src/Control/Lens/Internal.hs -index 295662e..539642d 100644 ---- a/src/Control/Lens/Internal.hs -+++ b/src/Control/Lens/Internal.hs -@@ -43,4 +43,4 @@ import Control.Lens.Internal.Review - import Control.Lens.Internal.Setter - import Control.Lens.Internal.Zoom - --{-# ANN module "HLint: ignore Use import/export shortcut" #-} -+ -diff --git a/src/Control/Lens/Internal/Zipper.hs b/src/Control/Lens/Internal/Zipper.hs -index 95875b7..76060be 100644 ---- a/src/Control/Lens/Internal/Zipper.hs -+++ b/src/Control/Lens/Internal/Zipper.hs -@@ -53,7 +53,7 @@ import Data.Profunctor.Unsafe - -- >>> import Control.Lens - -- >>> import Data.Char - --{-# ANN module "HLint: ignore Use foldl" #-} -+ - - ------------------------------------------------------------------------------ - -- * Jacket -diff --git a/src/Control/Lens/Iso.hs b/src/Control/Lens/Iso.hs -index 62d40ef..235511a 100644 ---- a/src/Control/Lens/Iso.hs -+++ b/src/Control/Lens/Iso.hs -@@ -70,8 +70,6 @@ import Data.Profunctor.Unsafe - import Unsafe.Coerce - #endif - --{-# ANN module "HLint: ignore Use on" #-} -- - -- $setup - -- >>> :set -XNoOverloadedStrings - -- >>> import Control.Lens -diff --git a/src/Control/Lens/Lens.hs b/src/Control/Lens/Lens.hs -index ff2a45f..5401ec4 100644 ---- a/src/Control/Lens/Lens.hs -+++ b/src/Control/Lens/Lens.hs -@@ -120,7 +120,7 @@ import Data.Profunctor - import Data.Profunctor.Rep - import Data.Profunctor.Unsafe - --{-# ANN module "HLint: ignore Use ***" #-} -+ - - -- $setup - -- >>> :set -XNoOverloadedStrings -diff --git a/src/Control/Lens/Operators.hs b/src/Control/Lens/Operators.hs -index d88cb49..fa7b37e 100644 ---- a/src/Control/Lens/Operators.hs -+++ b/src/Control/Lens/Operators.hs -@@ -107,4 +107,4 @@ import Control.Lens.Review - import Control.Lens.Setter - import Control.Lens.Zipper - --{-# ANN module "HLint: ignore Use import/export shortcut" #-} -+ -diff --git a/src/Control/Lens/Plated.hs b/src/Control/Lens/Plated.hs -index 07d9212..27070c0 100644 ---- a/src/Control/Lens/Plated.hs -+++ b/src/Control/Lens/Plated.hs -@@ -95,7 +95,7 @@ import Data.Data.Lens - import Data.Monoid - import Data.Tree - --{-# ANN module "HLint: ignore Reduce duplication" #-} -+ - - -- | A 'Plated' type is one where we know how to extract its immediate self-similar children. - -- -diff --git a/src/Control/Lens/Setter.hs b/src/Control/Lens/Setter.hs -index 2acbfa6..4a12c6b 100644 ---- a/src/Control/Lens/Setter.hs -+++ b/src/Control/Lens/Setter.hs -@@ -87,8 +87,6 @@ import Data.Profunctor - import Data.Profunctor.Rep - import Data.Profunctor.Unsafe - --{-# ANN module "HLint: ignore Avoid lambda" #-} -- - -- $setup - -- >>> import Control.Lens - -- >>> import Control.Monad.State -diff --git a/src/Control/Lens/TH.hs b/src/Control/Lens/TH.hs -index fbf4adb..ee723d7 100644 ---- a/src/Control/Lens/TH.hs -+++ b/src/Control/Lens/TH.hs -@@ -87,7 +87,7 @@ import Language.Haskell.TH - import Language.Haskell.TH.Syntax - import Language.Haskell.TH.Lens - --{-# ANN module "HLint: ignore Use foldl" #-} -+ - - -- | Flags for 'Lens' construction - data LensFlag -diff --git a/src/Data/Data/Lens.hs b/src/Data/Data/Lens.hs -index cf1e7c9..b39dacf 100644 ---- a/src/Data/Data/Lens.hs -+++ b/src/Data/Data/Lens.hs -@@ -65,9 +65,9 @@ import Data.Monoid - import GHC.Exts (realWorld#) - #endif - --{-# ANN module "HLint: ignore Eta reduce" #-} --{-# ANN module "HLint: ignore Use foldl" #-} --{-# ANN module "HLint: ignore Reduce duplication" #-} -+ -+ -+ - - -- $setup - -- >>> :set -XNoOverloadedStrings --- -1.8.2.rc3 - diff --git a/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch b/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch new file mode 100644 index 000000000..734da8708 --- /dev/null +++ b/standalone/android/haskell-patches/lens_various-hacking-to-cross-build.patch @@ -0,0 +1,385 @@ +From 3141355f14d6acb9382bebcf8723c411be5aa62f Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 00:31:39 +0000 +Subject: [PATCH] various hacking to cross build + +--- + lens.cabal | 12 +----------- + src/Control/Exception/Lens.hs | 2 +- + src/Control/Lens.hs | 6 +++--- + src/Control/Lens/Equality.hs | 4 ++-- + src/Control/Lens/Fold.hs | 6 +++--- + src/Control/Lens/Internal.hs | 2 +- + src/Control/Lens/Internal/Exception.hs | 26 +------------------------- + src/Control/Lens/Internal/Instances.hs | 14 -------------- + src/Control/Lens/Internal/Zipper.hs | 2 +- + src/Control/Lens/Iso.hs | 2 -- + src/Control/Lens/Lens.hs | 2 +- + src/Control/Lens/Operators.hs | 2 +- + src/Control/Lens/Plated.hs | 2 +- + src/Control/Lens/Prism.hs | 2 -- + src/Control/Lens/Setter.hs | 2 -- + src/Control/Lens/TH.hs | 2 +- + src/Data/Data/Lens.hs | 6 +++--- + 17 files changed, 20 insertions(+), 74 deletions(-) + +diff --git a/lens.cabal b/lens.cabal +index 2a94e1e..1f9a4b7 100644 +--- a/lens.cabal ++++ b/lens.cabal +@@ -10,7 +10,7 @@ stability: provisional + homepage: http://github.com/ekmett/lens/ + bug-reports: http://github.com/ekmett/lens/issues + copyright: Copyright (C) 2012-2013 Edward A. Kmett +-build-type: Custom ++build-type: Simple + tested-with: GHC == 7.0.4, GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.1, GHC == 7.7.20121213, GHC == 7.7.20130117 + synopsis: Lenses, Folds and Traversals + description: +@@ -238,14 +238,12 @@ library + Control.Lens.Review + Control.Lens.Setter + Control.Lens.Simple +- Control.Lens.TH + Control.Lens.Traversal + Control.Lens.Tuple + Control.Lens.Type + Control.Lens.Wrapped + Control.Lens.Zipper + Control.Lens.Zoom +- Control.Monad.Error.Lens + Control.Parallel.Strategies.Lens + Control.Seq.Lens + Data.Array.Lens +@@ -269,12 +267,8 @@ library + Data.Typeable.Lens + Data.Vector.Lens + Data.Vector.Generic.Lens +- Generics.Deriving.Lens +- GHC.Generics.Lens + System.Exit.Lens + System.FilePath.Lens +- System.IO.Error.Lens +- Language.Haskell.TH.Lens + Numeric.Lens + + if flag(safe) +@@ -373,7 +367,6 @@ test-suite doctests + deepseq, + doctest >= 0.9.1, + filepath, +- generic-deriving, + mtl, + nats, + parallel, +@@ -399,7 +392,6 @@ benchmark plated + comonad, + criterion, + deepseq, +- generic-deriving, + lens, + transformers + +@@ -434,7 +426,6 @@ benchmark unsafe + comonads-fd, + criterion, + deepseq, +- generic-deriving, + lens, + transformers + +@@ -451,6 +442,5 @@ benchmark zipper + comonads-fd, + criterion, + deepseq, +- generic-deriving, + lens, + transformers +diff --git a/src/Control/Exception/Lens.hs b/src/Control/Exception/Lens.hs +index 4bc3926..28f55be 100644 +--- a/src/Control/Exception/Lens.hs ++++ b/src/Control/Exception/Lens.hs +@@ -112,7 +112,7 @@ import Prelude + , Maybe(..), Either(..), Functor(..), String, IO + ) + +-{-# ANN module "HLint: ignore Use Control.Exception.catch" #-} ++ + + -- $setup + -- >>> :set -XNoOverloadedStrings +diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs +index 242c3c1..2ab9cdb 100644 +--- a/src/Control/Lens.hs ++++ b/src/Control/Lens.hs +@@ -59,7 +59,7 @@ module Control.Lens + , module Control.Lens.Review + , module Control.Lens.Setter + , module Control.Lens.Simple +-#ifndef DISABLE_TEMPLATE_HASKELL ++#if 0 + , module Control.Lens.TH + #endif + , module Control.Lens.Traversal +@@ -89,7 +89,7 @@ import Control.Lens.Reified + import Control.Lens.Review + import Control.Lens.Setter + import Control.Lens.Simple +-#ifndef DISABLE_TEMPLATE_HASKELL ++#if 0 + import Control.Lens.TH + #endif + import Control.Lens.Traversal +@@ -99,4 +99,4 @@ import Control.Lens.Wrapped + import Control.Lens.Zipper + import Control.Lens.Zoom + +-{-# ANN module "HLint: ignore Use import/export shortcut" #-} ++ +diff --git a/src/Control/Lens/Equality.hs b/src/Control/Lens/Equality.hs +index 982c2d7..3a3fe1a 100644 +--- a/src/Control/Lens/Equality.hs ++++ b/src/Control/Lens/Equality.hs +@@ -28,8 +28,8 @@ module Control.Lens.Equality + import Control.Lens.Internal.Setter + import Control.Lens.Type + +-{-# ANN module "HLint: ignore Use id" #-} +-{-# ANN module "HLint: ignore Eta reduce" #-} ++ ++ + + -- $setup + -- >>> import Control.Lens +diff --git a/src/Control/Lens/Fold.hs b/src/Control/Lens/Fold.hs +index 32a4073..cc7da1e 100644 +--- a/src/Control/Lens/Fold.hs ++++ b/src/Control/Lens/Fold.hs +@@ -163,9 +163,9 @@ import Data.Traversable + -- >>> let g :: Expr -> Expr; g = Debug.SimpleReflect.Vars.g + -- >>> let timingOut :: NFData a => a -> IO a; timingOut = fmap (fromMaybe (error "timeout")) . timeout (5*10^6) . evaluate . force + +-{-# ANN module "HLint: ignore Eta reduce" #-} +-{-# ANN module "HLint: ignore Use camelCase" #-} +-{-# ANN module "HLint: ignore Use curry" #-} ++ ++ ++ + + infixl 8 ^.., ^?, ^?!, ^@.., ^@?, ^@?! + +diff --git a/src/Control/Lens/Internal.hs b/src/Control/Lens/Internal.hs +index 295662e..539642d 100644 +--- a/src/Control/Lens/Internal.hs ++++ b/src/Control/Lens/Internal.hs +@@ -43,4 +43,4 @@ import Control.Lens.Internal.Review + import Control.Lens.Internal.Setter + import Control.Lens.Internal.Zoom + +-{-# ANN module "HLint: ignore Use import/export shortcut" #-} ++ +diff --git a/src/Control/Lens/Internal/Exception.hs b/src/Control/Lens/Internal/Exception.hs +index 387203e..8bea89b 100644 +--- a/src/Control/Lens/Internal/Exception.hs ++++ b/src/Control/Lens/Internal/Exception.hs +@@ -36,6 +36,7 @@ import Data.Monoid + import Data.Proxy + import Data.Reflection + import Data.Typeable ++import Data.Typeable + import System.IO.Unsafe + + ------------------------------------------------------------------------------ +@@ -128,18 +129,6 @@ class Handleable e (m :: * -> *) (h :: * -> *) | h -> e m where + handler_ l = handler l . const + {-# INLINE handler_ #-} + +-instance Handleable SomeException IO Exception.Handler where +- handler = handlerIO +- +-instance Handleable SomeException m (CatchIO.Handler m) where +- handler = handlerCatchIO +- +-handlerIO :: forall a r. Getting (First a) SomeException a -> (a -> IO r) -> Exception.Handler r +-handlerIO l f = reify (preview l) $ \ (_ :: Proxy s) -> Exception.Handler (\(Handling a :: Handling a s IO) -> f a) +- +-handlerCatchIO :: forall m a r. Getting (First a) SomeException a -> (a -> m r) -> CatchIO.Handler m r +-handlerCatchIO l f = reify (preview l) $ \ (_ :: Proxy s) -> CatchIO.Handler (\(Handling a :: Handling a s m) -> f a) +- + ------------------------------------------------------------------------------ + -- Helpers + ------------------------------------------------------------------------------ +@@ -159,21 +148,8 @@ supply = unsafePerformIO $ newIORef 0 + -- | This permits the construction of an \"impossible\" 'Control.Exception.Handler' that matches only if some function does. + newtype Handling a s (m :: * -> *) = Handling a + +--- the m parameter exists simply to break the Typeable1 pattern, so we can provide this without overlap. +--- here we simply generate a fresh TypeRep so we'll fail to compare as equal to any other TypeRep. +-instance Typeable (Handling a s m) where +- typeOf _ = unsafePerformIO $ do +- i <- atomicModifyIORef supply $ \a -> let a' = a + 1 in a' `seq` (a', a) +- return $ mkTyConApp (mkTyCon3 "lens" "Control.Lens.Internal.Exception" ("Handling" ++ show i)) [] +- {-# INLINE typeOf #-} +- + -- The @Handling@ wrapper is uninteresting, and should never be thrown, so you won't get much benefit here. + instance Show (Handling a s m) where + showsPrec d _ = showParen (d > 10) $ showString "Handling ..." + {-# INLINE showsPrec #-} + +-instance Reifies s (SomeException -> Maybe a) => Exception (Handling a s m) where +- toException _ = SomeException HandlingException +- {-# INLINE toException #-} +- fromException = fmap Handling . reflect (Proxy :: Proxy s) +- {-# INLINE fromException #-} +diff --git a/src/Control/Lens/Internal/Instances.hs b/src/Control/Lens/Internal/Instances.hs +index 6783f33..17715ce 100644 +--- a/src/Control/Lens/Internal/Instances.hs ++++ b/src/Control/Lens/Internal/Instances.hs +@@ -24,26 +24,12 @@ import Data.Traversable + -- Orphan Instances + ------------------------------------------------------------------------------- + +-instance Foldable ((,) b) where +- foldMap f (_, a) = f a +- + instance Foldable1 ((,) b) where + foldMap1 f (_, a) = f a + +-instance Traversable ((,) b) where +- traverse f (b, a) = (,) b <$> f a +- + instance Traversable1 ((,) b) where + traverse1 f (b, a) = (,) b <$> f a + +-instance Foldable (Either a) where +- foldMap _ (Left _) = mempty +- foldMap f (Right a) = f a +- +-instance Traversable (Either a) where +- traverse _ (Left b) = pure (Left b) +- traverse f (Right a) = Right <$> f a +- + instance Foldable (Const m) where + foldMap _ _ = mempty + +diff --git a/src/Control/Lens/Internal/Zipper.hs b/src/Control/Lens/Internal/Zipper.hs +index 95875b7..76060be 100644 +--- a/src/Control/Lens/Internal/Zipper.hs ++++ b/src/Control/Lens/Internal/Zipper.hs +@@ -53,7 +53,7 @@ import Data.Profunctor.Unsafe + -- >>> import Control.Lens + -- >>> import Data.Char + +-{-# ANN module "HLint: ignore Use foldl" #-} ++ + + ------------------------------------------------------------------------------ + -- * Jacket +diff --git a/src/Control/Lens/Iso.hs b/src/Control/Lens/Iso.hs +index 1152af4..80c3175 100644 +--- a/src/Control/Lens/Iso.hs ++++ b/src/Control/Lens/Iso.hs +@@ -82,8 +82,6 @@ import Data.Maybe + import Data.Profunctor + import Data.Profunctor.Unsafe + +-{-# ANN module "HLint: ignore Use on" #-} +- + -- $setup + -- >>> :set -XNoOverloadedStrings + -- >>> import Control.Lens +diff --git a/src/Control/Lens/Lens.hs b/src/Control/Lens/Lens.hs +index b26cc06..6f84943 100644 +--- a/src/Control/Lens/Lens.hs ++++ b/src/Control/Lens/Lens.hs +@@ -126,7 +126,7 @@ import Data.Profunctor.Rep + import Data.Profunctor.Unsafe + import Data.Void + +-{-# ANN module "HLint: ignore Use ***" #-} ++ + + -- $setup + -- >>> :set -XNoOverloadedStrings +diff --git a/src/Control/Lens/Operators.hs b/src/Control/Lens/Operators.hs +index 11868e0..475c945 100644 +--- a/src/Control/Lens/Operators.hs ++++ b/src/Control/Lens/Operators.hs +@@ -108,4 +108,4 @@ import Control.Lens.Review + import Control.Lens.Setter + import Control.Lens.Zipper + +-{-# ANN module "HLint: ignore Use import/export shortcut" #-} ++ +diff --git a/src/Control/Lens/Plated.hs b/src/Control/Lens/Plated.hs +index a8c4d20..cef574e 100644 +--- a/src/Control/Lens/Plated.hs ++++ b/src/Control/Lens/Plated.hs +@@ -95,7 +95,7 @@ import Data.Data.Lens + import Data.Monoid + import Data.Tree + +-{-# ANN module "HLint: ignore Reduce duplication" #-} ++ + + -- | A 'Plated' type is one where we know how to extract its immediate self-similar children. + -- +diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs +index 45b5cfe..88c7ff9 100644 +--- a/src/Control/Lens/Prism.hs ++++ b/src/Control/Lens/Prism.hs +@@ -53,8 +53,6 @@ import Unsafe.Coerce + import Data.Profunctor.Unsafe + #endif + +-{-# ANN module "HLint: ignore Use camelCase" #-} +- + -- $setup + -- >>> :set -XNoOverloadedStrings + -- >>> import Control.Lens +diff --git a/src/Control/Lens/Setter.hs b/src/Control/Lens/Setter.hs +index 2acbfa6..4a12c6b 100644 +--- a/src/Control/Lens/Setter.hs ++++ b/src/Control/Lens/Setter.hs +@@ -87,8 +87,6 @@ import Data.Profunctor + import Data.Profunctor.Rep + import Data.Profunctor.Unsafe + +-{-# ANN module "HLint: ignore Avoid lambda" #-} +- + -- $setup + -- >>> import Control.Lens + -- >>> import Control.Monad.State +diff --git a/src/Control/Lens/TH.hs b/src/Control/Lens/TH.hs +index a05eb07..49218b5 100644 +--- a/src/Control/Lens/TH.hs ++++ b/src/Control/Lens/TH.hs +@@ -87,7 +87,7 @@ import Language.Haskell.TH + import Language.Haskell.TH.Syntax + import Language.Haskell.TH.Lens + +-{-# ANN module "HLint: ignore Use foldl" #-} ++ + + -- | Flags for 'Lens' construction + data LensFlag +diff --git a/src/Data/Data/Lens.hs b/src/Data/Data/Lens.hs +index cf1e7c9..b39dacf 100644 +--- a/src/Data/Data/Lens.hs ++++ b/src/Data/Data/Lens.hs +@@ -65,9 +65,9 @@ import Data.Monoid + import GHC.Exts (realWorld#) + #endif + +-{-# ANN module "HLint: ignore Eta reduce" #-} +-{-# ANN module "HLint: ignore Use foldl" #-} +-{-# ANN module "HLint: ignore Reduce duplication" #-} ++ ++ ++ + + -- $setup + -- >>> :set -XNoOverloadedStrings +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/lifted-base_0.2.0.2_0001-hacked-for-newer-ghc.patch b/standalone/android/haskell-patches/lifted-base_0.2.0.2_0001-hacked-for-newer-ghc.patch deleted file mode 100644 index b61dc17ba..000000000 --- a/standalone/android/haskell-patches/lifted-base_0.2.0.2_0001-hacked-for-newer-ghc.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 4bb0de1e6213ec925820c8b9cc3ff5f3c3c72d7a Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 28 Feb 2013 23:31:27 -0400 -Subject: [PATCH] hacked for newer ghc - ---- - Control/Concurrent/Lifted.hs | 2 +- - Control/Exception/Lifted.hs | 11 ++-------- - Setup.hs | 46 ++---------------------------------------- - lifted-base.cabal | 9 ++++----- - 4 files changed, 9 insertions(+), 59 deletions(-) - -diff --git a/Control/Concurrent/Lifted.hs b/Control/Concurrent/Lifted.hs -index 4bc58a8..e4445e6 100644 ---- a/Control/Concurrent/Lifted.hs -+++ b/Control/Concurrent/Lifted.hs -@@ -124,7 +124,7 @@ import Control.Concurrent.SampleVar.Lifted - #endif - import Control.Exception.Lifted ( throwTo - #if MIN_VERSION_base(4,6,0) -- , SomeException, try, mask -+ , SomeException, try - #endif - ) - #include "inlinable.h" -diff --git a/Control/Exception/Lifted.hs b/Control/Exception/Lifted.hs -index 871cda7..0b9d8b7 100644 ---- a/Control/Exception/Lifted.hs -+++ b/Control/Exception/Lifted.hs -@@ -50,8 +50,8 @@ module Control.Exception.Lifted - -- |The following functions allow a thread to control delivery of - -- asynchronous exceptions during a critical region. - #if MIN_VERSION_base(4,3,0) -- , mask, mask_ -- , uninterruptibleMask, uninterruptibleMask_ -+ , mask_ -+ , uninterruptibleMask_ - , getMaskingState - #if MIN_VERSION_base(4,4,0) - , allowInterrupt -@@ -266,10 +266,6 @@ evaluate = liftBase ∘ E.evaluate - -------------------------------------------------------------------------------- - - #if MIN_VERSION_base(4,3,0) ---- |Generalized version of 'E.mask'. --mask ∷ MonadBaseControl IO m ⇒ ((∀ a. m a → m a) → m b) → m b --mask = liftBaseOp E.mask ∘ liftRestore --{-# INLINABLE mask #-} - - liftRestore ∷ MonadBaseControl IO m - ⇒ ((∀ a. m a → m a) → b) -@@ -283,9 +279,6 @@ mask_ = liftBaseOp_ E.mask_ - {-# INLINABLE mask_ #-} - - -- |Generalized version of 'E.uninterruptibleMask'. --uninterruptibleMask ∷ MonadBaseControl IO m ⇒ ((∀ a. m a → m a) → m b) → m b --uninterruptibleMask = liftBaseOp E.uninterruptibleMask ∘ liftRestore --{-# INLINABLE uninterruptibleMask #-} - - -- |Generalized version of 'E.uninterruptibleMask_'. - uninterruptibleMask_ ∷ MonadBaseControl IO m ⇒ m a → m a -diff --git a/Setup.hs b/Setup.hs -index 33956e1..9a994af 100644 ---- a/Setup.hs -+++ b/Setup.hs -@@ -1,44 +1,2 @@ --#! /usr/bin/env runhaskell -- --{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} -- --module Main (main) where -- -- --------------------------------------------------------------------------------- ---- Imports --------------------------------------------------------------------------------- -- ---- from base --import System.IO ( IO ) -- ---- from cabal --import Distribution.Simple ( defaultMainWithHooks -- , simpleUserHooks -- , UserHooks(haddockHook) -- ) -- --import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(..) ) --import Distribution.Simple.Program ( userSpecifyArgs ) --import Distribution.Simple.Setup ( HaddockFlags ) --import Distribution.PackageDescription ( PackageDescription(..) ) -- -- --------------------------------------------------------------------------------- ---- Cabal setup program which sets the CPP define '__HADDOCK __' when haddock is run. --------------------------------------------------------------------------------- -- --main ∷ IO () --main = defaultMainWithHooks hooks -- where -- hooks = simpleUserHooks { haddockHook = haddockHook' } -- ---- Define __HADDOCK__ for CPP when running haddock. --haddockHook' ∷ PackageDescription → LocalBuildInfo → UserHooks → HaddockFlags → IO () --haddockHook' pkg lbi = -- haddockHook simpleUserHooks pkg (lbi { withPrograms = p }) -- where -- p = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (withPrograms lbi) -- -- ---- The End --------------------------------------------------------------------- -+import Distribution.Simple -+main = defaultMain -diff --git a/lifted-base.cabal b/lifted-base.cabal -index 54ef418..8da5086 100644 ---- a/lifted-base.cabal -+++ b/lifted-base.cabal -@@ -9,7 +9,7 @@ Copyright: (c) 2011-2012 Bas van Dijk, Anders Kaseorg - Homepage: https://github.com/basvandijk/lifted-base - Bug-reports: https://github.com/basvandijk/lifted-base/issues - Category: Control --Build-type: Custom -+Build-type: Simple - Cabal-version: >= 1.9.2 - Description: @lifted-base@ exports IO operations from the base library lifted to - any instance of 'MonadBase' or 'MonadBaseControl'. -@@ -37,7 +37,6 @@ Library - Exposed-modules: Control.Exception.Lifted - Control.Concurrent.MVar.Lifted - Control.Concurrent.Chan.Lifted -- Control.Concurrent.Lifted - Data.IORef.Lifted - System.Timeout.Lifted - if impl(ghc < 7.6) -@@ -46,7 +45,7 @@ Library - Control.Concurrent.QSemN.Lifted - Control.Concurrent.SampleVar.Lifted - -- Build-depends: base >= 3 && < 4.7 -+ Build-depends: base >= 3 && < 4.8 - , base-unicode-symbols >= 0.1.1 && < 0.3 - , transformers-base >= 0.4 && < 0.5 - , monad-control >= 0.3 && < 0.4 -@@ -64,7 +63,7 @@ test-suite test-lifted-base - hs-source-dirs: test - - build-depends: lifted-base -- , base >= 3 && < 4.7 -+ , base >= 3 && < 4.8 - , transformers >= 0.2 && < 0.4 - , transformers-base >= 0.4 && < 0.5 - , monad-control >= 0.3 && < 0.4 -@@ -87,7 +86,7 @@ benchmark bench-lifted-base - ghc-options: -O2 - - build-depends: lifted-base -- , base >= 3 && < 4.7 -+ , base >= 3 && < 4.8 - , transformers >= 0.2 && < 0.4 - , criterion >= 0.5 && < 0.7 - , monad-control >= 0.3 && < 0.4 --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/lifted-base_crossbuild.patch b/standalone/android/haskell-patches/lifted-base_crossbuild.patch new file mode 100644 index 000000000..945aee491 --- /dev/null +++ b/standalone/android/haskell-patches/lifted-base_crossbuild.patch @@ -0,0 +1,25 @@ +From 8a98fa29048b508c64d5bb1e03ef89bfad8adc01 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 21:34:17 +0000 +Subject: [PATCH] crossbuild + +--- + lifted-base.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lifted-base.cabal b/lifted-base.cabal +index 24f2860..3bef225 100644 +--- a/lifted-base.cabal ++++ b/lifted-base.cabal +@@ -9,7 +9,7 @@ Copyright: (c) 2011-2012 Bas van Dijk, Anders Kaseorg + Homepage: https://github.com/basvandijk/lifted-base + Bug-reports: https://github.com/basvandijk/lifted-base/issues + Category: Control +-Build-type: Custom ++Build-type: Simple + Cabal-version: >= 1.8 + Description: @lifted-base@ exports IO operations from the base library lifted to + any instance of 'MonadBase' or 'MonadBaseControl'. +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/persistent-template_stub-out.patch b/standalone/android/haskell-patches/persistent-template_stub-out.patch new file mode 100644 index 000000000..6b7b62bd4 --- /dev/null +++ b/standalone/android/haskell-patches/persistent-template_stub-out.patch @@ -0,0 +1,25 @@ +From 0b9df0de3aa45918a2a9226a2da6be4680276419 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 03:31:55 +0000 +Subject: [PATCH] stub out + +--- + persistent-template.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/persistent-template.cabal b/persistent-template.cabal +index 8216ce7..f23234b 100644 +--- a/persistent-template.cabal ++++ b/persistent-template.cabal +@@ -23,7 +23,7 @@ library + , containers + , aeson + , monad-logger +- exposed-modules: Database.Persist.TH ++ exposed-modules: + ghc-options: -Wall + if impl(ghc >= 7.4) + cpp-options: -DGHC_7_4 +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch b/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch index 38cecc5c7..300975b83 100644 --- a/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch +++ b/standalone/android/haskell-patches/persistent_1.1.5.1_0001-disable-TH.patch @@ -1,71 +1,32 @@ -From 8fddef803ee9191ca15363283b7e4d5af4c70f3a Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 28 Feb 2013 23:34:10 -0400 +From 760fa2c5044ae38bee8114ff84c625ac59f35c6f Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 00:03:55 +0000 Subject: [PATCH] disable TH --- - Database/Persist/GenericSql/Internal.hs | 6 +----- - Database/Persist/GenericSql/Raw.hs | 5 ++--- - 2 files changed, 3 insertions(+), 8 deletions(-) + Database/Persist/Sql/Raw.hs | 2 -- + 1 file changed, 2 deletions(-) -diff --git a/Database/Persist/GenericSql/Internal.hs b/Database/Persist/GenericSql/Internal.hs -index f109887..5273398 100644 ---- a/Database/Persist/GenericSql/Internal.hs -+++ b/Database/Persist/GenericSql/Internal.hs -@@ -14,7 +14,6 @@ module Database.Persist.GenericSql.Internal - , createSqlPool - , mkColumns - , Column (..) -- , logSQL - , InsertSqlResult (..) - ) where - -@@ -33,7 +32,7 @@ import Data.Monoid (Monoid, mappend, mconcat) - import Database.Persist.EntityDef - import qualified Data.Conduit as C - import Language.Haskell.TH.Syntax (Q, Exp) --import Control.Monad.Logger (logDebugS) -+ - import Data.Maybe (mapMaybe, listToMaybe) - import Data.Int (Int64) - -@@ -197,6 +196,3 @@ tableColumn t s = go $ entityColumns t - | x == s = ColumnDef x y z - | otherwise = go rest - -} -- --logSQL :: Q Exp --logSQL = [|\sql_foo params_foo -> $logDebugS (T.pack "SQL") $ T.pack $ show (sql_foo :: Text) ++ " " ++ show (params_foo :: [PersistValue])|] -diff --git a/Database/Persist/GenericSql/Raw.hs b/Database/Persist/GenericSql/Raw.hs -index e4bf9f4..3da8fa0 100644 ---- a/Database/Persist/GenericSql/Raw.hs -+++ b/Database/Persist/GenericSql/Raw.hs -@@ -26,7 +26,6 @@ import Database.Persist.GenericSql.Internal hiding (execute, withStmt) - import Database.Persist.Store (PersistValue) - import Data.IORef - import Control.Monad.IO.Class --import Control.Monad.Logger (logDebugS) - import Control.Monad.Trans.Reader - import qualified Data.Map as Map - import Control.Applicative (Applicative) -@@ -134,7 +133,7 @@ withStmt :: (MonadSqlPersist m, MonadResource m) +diff --git a/Database/Persist/Sql/Raw.hs b/Database/Persist/Sql/Raw.hs +index 73189dd..6efebea 100644 +--- a/Database/Persist/Sql/Raw.hs ++++ b/Database/Persist/Sql/Raw.hs +@@ -22,7 +22,6 @@ rawQuery :: (MonadSqlPersist m, MonadResource m) -> [PersistValue] -> Source m [PersistValue] - withStmt sql vals = do + rawQuery sql vals = do - lift $ $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals -+ -- lift $ pack $ show sql ++ " " ++ show vals conn <- lift askSqlConn bracketP - (getStmt' conn sql) -@@ -146,7 +145,7 @@ execute x y = liftM (const ()) $ executeCount x y + (getStmtConn conn sql) +@@ -34,7 +33,6 @@ rawExecute x y = liftM (const ()) $ rawExecuteCount x y - executeCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64 - executeCount sql vals = do + rawExecuteCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64 + rawExecuteCount sql vals = do - $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals -+ -- pack $ show sql ++ " " ++ show vals stmt <- getStmt sql - res <- liftIO $ I.execute stmt vals - liftIO $ reset stmt + res <- liftIO $ stmtExecute stmt vals + liftIO $ stmtReset stmt -- 1.7.10.4 diff --git a/standalone/android/haskell-patches/primitive_fix-build-with-new-ghc.patch b/standalone/android/haskell-patches/primitive_fix-build-with-new-ghc.patch new file mode 100644 index 000000000..3f12965c1 --- /dev/null +++ b/standalone/android/haskell-patches/primitive_fix-build-with-new-ghc.patch @@ -0,0 +1,96 @@ +From 2b1ee45058b0d6db90f77e4859d01d1e8434906c Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:11:51 +0000 +Subject: [PATCH] fix build with new ghc + +--- + Data/Primitive/Array.hs | 2 +- + Data/Primitive/ByteArray.hs | 2 +- + Data/Primitive/MutVar.hs | 4 ++-- + Data/Primitive/Types.hs | 13 +++++++------ + 4 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/Data/Primitive/Array.hs b/Data/Primitive/Array.hs +index b82dcac..b28abea 100644 +--- a/Data/Primitive/Array.hs ++++ b/Data/Primitive/Array.hs +@@ -106,7 +106,7 @@ unsafeThawArray (Array arr#) + sameMutableArray :: MutableArray s a -> MutableArray s a -> Bool + {-# INLINE sameMutableArray #-} + sameMutableArray (MutableArray arr#) (MutableArray brr#) +- = sameMutableArray# arr# brr# ++ = tagToEnum# (sameMutableArray# arr# brr#) + + -- | Copy a slice of an immutable array to a mutable array. + copyArray :: PrimMonad m +diff --git a/Data/Primitive/ByteArray.hs b/Data/Primitive/ByteArray.hs +index 2a47254..3a1ed6e 100644 +--- a/Data/Primitive/ByteArray.hs ++++ b/Data/Primitive/ByteArray.hs +@@ -99,7 +99,7 @@ mutableByteArrayContents (MutableByteArray arr#) + sameMutableByteArray :: MutableByteArray s -> MutableByteArray s -> Bool + {-# INLINE sameMutableByteArray #-} + sameMutableByteArray (MutableByteArray arr#) (MutableByteArray brr#) +- = sameMutableByteArray# arr# brr# ++ = tagToEnum# (sameMutableByteArray# arr# brr#) + + -- | Convert a mutable byte array to an immutable one without copying. The + -- array should not be modified after the conversion. +diff --git a/Data/Primitive/MutVar.hs b/Data/Primitive/MutVar.hs +index 9745ec7..eb654c9 100644 +--- a/Data/Primitive/MutVar.hs ++++ b/Data/Primitive/MutVar.hs +@@ -23,7 +23,7 @@ module Data.Primitive.MutVar ( + ) where + + import Control.Monad.Primitive ( PrimMonad(..), primitive_ ) +-import GHC.Prim ( MutVar#, sameMutVar#, newMutVar#, ++import GHC.Prim ( MutVar#, sameMutVar#, newMutVar#, tagToEnum#, + readMutVar#, writeMutVar#, atomicModifyMutVar# ) + import Data.Typeable ( Typeable ) + +@@ -33,7 +33,7 @@ data MutVar s a = MutVar (MutVar# s a) + deriving ( Typeable ) + + instance Eq (MutVar s a) where +- MutVar mva# == MutVar mvb# = sameMutVar# mva# mvb# ++ MutVar mva# == MutVar mvb# = tagToEnum# (sameMutVar# mva# mvb#) + + -- | Create a new 'MutVar' with the specified initial value + newMutVar :: PrimMonad m => a -> m (MutVar (PrimState m) a) +diff --git a/Data/Primitive/Types.hs b/Data/Primitive/Types.hs +index 7568f0c..d961e97 100644 +--- a/Data/Primitive/Types.hs ++++ b/Data/Primitive/Types.hs +@@ -20,6 +20,7 @@ module Data.Primitive.Types ( + import Control.Monad.Primitive + import Data.Primitive.MachDeps + import Data.Primitive.Internal.Operations ++import GHC.Prim (tagToEnum#) + + import GHC.Base ( + unsafeCoerce#, +@@ -48,14 +49,14 @@ import Data.Primitive.Internal.Compat ( mkNoRepType ) + data Addr = Addr Addr# deriving ( Typeable ) + + instance Eq Addr where +- Addr a# == Addr b# = eqAddr# a# b# +- Addr a# /= Addr b# = neAddr# a# b# ++ Addr a# == Addr b# = tagToEnum# (eqAddr# a# b#) ++ Addr a# /= Addr b# = tagToEnum# (neAddr# a# b#) + + instance Ord Addr where +- Addr a# > Addr b# = gtAddr# a# b# +- Addr a# >= Addr b# = geAddr# a# b# +- Addr a# < Addr b# = ltAddr# a# b# +- Addr a# <= Addr b# = leAddr# a# b# ++ Addr a# > Addr b# = tagToEnum# (gtAddr# a# b#) ++ Addr a# >= Addr b# = tagToEnum# (geAddr# a# b#) ++ Addr a# < Addr b# = tagToEnum# (ltAddr# a# b#) ++ Addr a# <= Addr b# = tagToEnum# (leAddr# a# b#) + + instance Data Addr where + toConstr _ = error "toConstr" +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/process_fix-build-with-new-ghc.patch b/standalone/android/haskell-patches/process_fix-build-with-new-ghc.patch new file mode 100644 index 000000000..a790a316d --- /dev/null +++ b/standalone/android/haskell-patches/process_fix-build-with-new-ghc.patch @@ -0,0 +1,24 @@ +From 0b0d4250cfce44b1a03b50458b4122370ab349ce Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 21:50:51 +0000 +Subject: [PATCH] fix build with new ghc + +--- + System/Process/Internals.hs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs +index a73c6fc..6676a72 100644 +--- a/System/Process/Internals.hs ++++ b/System/Process/Internals.hs +@@ -61,6 +61,7 @@ import Control.Concurrent + import Control.Exception + import Foreign.C + import Foreign ++import System.IO.Unsafe + + # ifdef __GLASGOW_HASKELL__ + +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch b/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch index f868197a8..1c82eaead 100644 --- a/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch +++ b/standalone/android/haskell-patches/shakespeare-css_1.0.2_0001-remove-TH.patch @@ -1,15 +1,13 @@ -From 8f058e84892a8c4202275f524f74bd6a7097ad40 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Wed, 8 May 2013 02:07:15 -0400 +From 05d0b6e6d2f84cd8ff53b8ee3e42021fa02fe8e4 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:21:52 +0000 Subject: [PATCH] remove TH --- - Text/Cassius.hs | 23 -------------- - Text/Css.hs | 84 ------------------------------------------------- - Text/CssCommon.hs | 4 --- - Text/Lucius.hs | 30 +----------------- - shakespeare-css.cabal | 2 +- - 5 files changed, 2 insertions(+), 141 deletions(-) + Text/Cassius.hs | 23 ----------------------- + Text/CssCommon.hs | 4 ---- + Text/Lucius.hs | 30 +----------------------------- + 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/Text/Cassius.hs b/Text/Cassius.hs index ce05374..ae56b0a 100644 @@ -64,117 +62,6 @@ index ce05374..ae56b0a 100644 -- | Determine which identifiers are used by the given template, useful for -- creating systems like yesod devel. cassiusUsedIdentifiers :: String -> [(Deref, VarType)] -diff --git a/Text/Css.hs b/Text/Css.hs -index 8e6fc09..401a166 100644 ---- a/Text/Css.hs -+++ b/Text/Css.hs -@@ -108,19 +108,6 @@ cssUsedIdentifiers toi2b parseBlocks s' = - (scope, rest') = go rest - go' (k, v) = k ++ v - --cssFileDebug :: Bool -- ^ perform the indent-to-brace conversion -- -> Q Exp -> Parser [TopLevel] -> FilePath -> Q Exp --cssFileDebug toi2b parseBlocks' parseBlocks fp = do -- s <- fmap TL.unpack $ qRunIO $ readUtf8File fp --#ifdef GHC_7_4 -- qAddDependentFile fp --#endif -- let vs = cssUsedIdentifiers toi2b parseBlocks s -- c <- mapM vtToExp vs -- cr <- [|cssRuntime toi2b|] -- parseBlocks'' <- parseBlocks' -- return $ cr `AppE` parseBlocks'' `AppE` (LitE $ StringL fp) `AppE` ListE c -- - combineSelectors :: Selector -> Selector -> Selector - combineSelectors a b = do - a' <- a -@@ -202,17 +189,6 @@ cssRuntime toi2b parseBlocks fp cd render' = unsafePerformIO $ do - - addScope scope = map (DerefIdent . Ident *** CDPlain . fromString) scope ++ cd - --vtToExp :: (Deref, VarType) -> Q Exp --vtToExp (d, vt) = do -- d' <- lift d -- c' <- c vt -- return $ TupE [d', c' `AppE` derefToExp [] d] -- where -- c :: VarType -> Q Exp -- c VTPlain = [|CDPlain . toCss|] -- c VTUrl = [|CDUrl|] -- c VTUrlParam = [|CDUrlParam|] -- - getVars :: Monad m => [(String, String)] -> Content -> m [(Deref, VarType)] - getVars _ ContentRaw{} = return [] - getVars scope (ContentVar d) = -@@ -268,68 +244,8 @@ compressBlock (Block x y blocks) = - cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c - cc (a:b) = a : cc b - --blockToCss :: Name -> Scope -> Block -> Q Exp --blockToCss r scope (Block sel props subblocks) = -- [|(:) (Css' $(selectorToBuilder r scope sel) $(listE $ map go props)) -- . foldr (.) id $(listE $ map subGo subblocks) -- |] -- where -- go (x, y) = tupE [contentsToBuilder r scope x, contentsToBuilder r scope y] -- subGo (Block sel' b c) = -- blockToCss r scope $ Block sel'' b c -- where -- sel'' = combineSelectors sel sel' -- --selectorToBuilder :: Name -> Scope -> Selector -> Q Exp --selectorToBuilder r scope sels = -- contentsToBuilder r scope $ intercalate [ContentRaw ","] sels -- --contentsToBuilder :: Name -> Scope -> [Content] -> Q Exp --contentsToBuilder r scope contents = -- appE [|mconcat|] $ listE $ map (contentToBuilder r scope) contents -- --contentToBuilder :: Name -> Scope -> Content -> Q Exp --contentToBuilder _ _ (ContentRaw x) = -- [|fromText . pack|] `appE` litE (StringL x) --contentToBuilder _ scope (ContentVar d) = -- case d of -- DerefIdent (Ident s) -- | Just val <- lookup s scope -> [|fromText . pack|] `appE` litE (StringL val) -- _ -> [|toCss|] `appE` return (derefToExp [] d) --contentToBuilder r _ (ContentUrl u) = -- [|fromText|] `appE` -- (varE r `appE` return (derefToExp [] u) `appE` listE []) --contentToBuilder r _ (ContentUrlParam u) = -- [|fromText|] `appE` -- ([|uncurry|] `appE` varE r `appE` return (derefToExp [] u)) -- - type Scope = [(String, String)] - --topLevelsToCassius :: [TopLevel] -> Q Exp --topLevelsToCassius a = do -- r <- newName "_render" -- lamE [varP r] $ appE [|CssNoWhitespace . foldr ($) []|] $ fmap ListE $ go r [] a -- where -- go _ _ [] = return [] -- go r scope (TopBlock b:rest) = do -- e <- [|(++) $ map Css ($(blockToCss r scope b) [])|] -- es <- go r scope rest -- return $ e : es -- go r scope (TopAtBlock name s b:rest) = do -- let s' = contentsToBuilder r scope s -- e <- [|(:) $ AtBlock $(lift name) $(s') $(blocksToCassius r scope b)|] -- es <- go r scope rest -- return $ e : es -- go r scope (TopAtDecl dec cs:rest) = do -- e <- [|(:) $ AtDecl $(lift dec) $(contentsToBuilder r scope cs)|] -- es <- go r scope rest -- return $ e : es -- go r scope (TopVar k v:rest) = go r ((k, v) : scope) rest -- --blocksToCassius :: Name -> Scope -> [Block] -> Q Exp --blocksToCassius r scope a = do -- appE [|foldr ($) []|] $ listE $ map (blockToCss r scope) a -- - renderCss :: Css -> TL.Text - renderCss css = - toLazyText $ mconcat $ map go tops-- FIXME use a foldr diff --git a/Text/CssCommon.hs b/Text/CssCommon.hs index 719e0a8..8c40e8c 100644 --- a/Text/CssCommon.hs @@ -192,10 +79,10 @@ index 719e0a8..8c40e8c 100644 -mkSizeType "ExSize" "ex" -mkSizeType "PixelSize" "px" diff --git a/Text/Lucius.hs b/Text/Lucius.hs -index b71614e..a902e1c 100644 +index 89328bd..0a1cf5e 100644 --- a/Text/Lucius.hs +++ b/Text/Lucius.hs -@@ -6,12 +6,8 @@ +@@ -8,12 +8,8 @@ {-# OPTIONS_GHC -fno-warn-missing-fields #-} module Text.Lucius ( -- * Parsing @@ -203,13 +90,13 @@ index b71614e..a902e1c 100644 - , luciusFile - , luciusFileDebug - , luciusFileReload + -- ** Mixins +- , luciusMixin ++ luciusMixin + , Mixin -- ** Runtime -- , luciusRT -+ luciusRT - , luciusRT' - , -- * Datatypes - Css -@@ -31,11 +27,8 @@ module Text.Lucius + , luciusRT +@@ -40,11 +36,8 @@ module Text.Lucius , AbsoluteUnit (..) , AbsoluteSize (..) , absoluteSize @@ -221,9 +108,9 @@ index b71614e..a902e1c 100644 -- * Internal , parseTopLevels , luciusUsedIdentifiers -@@ -57,18 +50,6 @@ import Data.Either (partitionEithers) - import Data.Monoid (mconcat) +@@ -66,18 +59,6 @@ import Data.Monoid (mconcat) import Data.List (isSuffixOf) + import Control.Arrow (second) --- | --- @@ -240,7 +127,7 @@ index b71614e..a902e1c 100644 whiteSpace :: Parser () whiteSpace = many whiteSpace1 >> return () -@@ -179,15 +160,6 @@ parseComment = do +@@ -217,15 +198,6 @@ parseComment = do _ <- manyTill anyChar $ try $ string "*/" return $ ContentRaw "" @@ -253,22 +140,9 @@ index b71614e..a902e1c 100644 -luciusFileDebug = cssFileDebug False [|parseTopLevels|] parseTopLevels -luciusFileReload = luciusFileDebug - - parseTopLevels :: Parser [TopLevel] + parseTopLevels :: Parser [TopLevel Unresolved] parseTopLevels = go id -diff --git a/shakespeare-css.cabal b/shakespeare-css.cabal -index de2497b..874a3b5 100644 ---- a/shakespeare-css.cabal -+++ b/shakespeare-css.cabal -@@ -33,7 +33,7 @@ library - , shakespeare >= 1.0 && < 1.1 - , template-haskell - , text >= 0.11.1.1 && < 0.12 -- , process >= 1.0 && < 1.2 -+ , process >= 1.0 && < 1.3 - , parsec >= 2 && < 4 - , transformers - -- 1.7.10.4 diff --git a/standalone/android/haskell-patches/shakespeare-js_1.1.2_0001-remove-TH.patch b/standalone/android/haskell-patches/shakespeare-js_1.1.2_0001-remove-TH.patch deleted file mode 100644 index 98a16ae07..000000000 --- a/standalone/android/haskell-patches/shakespeare-js_1.1.2_0001-remove-TH.patch +++ /dev/null @@ -1,308 +0,0 @@ -From 332c71b3f6bc4786b914e675020a23c492beee5a Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Tue, 7 May 2013 19:28:06 -0400 -Subject: [PATCH] remove TH - ---- - Text/Coffee.hs | 54 ------------------------------------------------- - Text/Julius.hs | 56 ++++----------------------------------------------- - Text/Roy.hs | 54 ------------------------------------------------- - Text/TypeScript.hs | 57 +--------------------------------------------------- - 4 files changed, 5 insertions(+), 216 deletions(-) - -diff --git a/Text/Coffee.hs b/Text/Coffee.hs -index 2481936..3f7f9c3 100644 ---- a/Text/Coffee.hs -+++ b/Text/Coffee.hs -@@ -51,14 +51,6 @@ module Text.Coffee - -- ** Template-Reading Functions - -- | These QuasiQuoter and Template Haskell methods return values of - -- type @'JavascriptUrl' url@. See the Yesod book for details. -- coffee -- , coffeeFile -- , coffeeFileReload -- , coffeeFileDebug -- --#ifdef TEST_EXPORT -- , coffeeSettings --#endif - ) where - - import Language.Haskell.TH.Quote (QuasiQuoter (..)) -@@ -66,49 +58,3 @@ import Language.Haskell.TH.Syntax - import Text.Shakespeare - import Text.Julius - --coffeeSettings :: Q ShakespeareSettings --coffeeSettings = do -- jsettings <- javascriptSettings -- return $ jsettings { varChar = '%' -- , preConversion = Just PreConvert { -- preConvert = ReadProcess "coffee" ["-spb"] -- , preEscapeIgnoreBalanced = "'\"`" -- don't insert backtacks for variable already inside strings or backticks. -- , preEscapeIgnoreLine = "#" -- ignore commented lines -- , wrapInsertion = Just WrapInsertion { -- wrapInsertionIndent = Just " " -- , wrapInsertionStartBegin = "((" -- , wrapInsertionSeparator = ", " -- , wrapInsertionStartClose = ") =>" -- , wrapInsertionEnd = ")" -- , wrapInsertionApplyBegin = "(" -- , wrapInsertionApplyClose = ")\n" -- } -- } -- } -- ---- | Read inline, quasiquoted CoffeeScript. --coffee :: QuasiQuoter --coffee = QuasiQuoter { quoteExp = \s -> do -- rs <- coffeeSettings -- quoteExp (shakespeare rs) s -- } -- ---- | Read in a CoffeeScript template file. This function reads the file once, at ---- compile time. --coffeeFile :: FilePath -> Q Exp --coffeeFile fp = do -- rs <- coffeeSettings -- shakespeareFile rs fp -- ---- | Read in a CoffeeScript template file. This impure function uses ---- unsafePerformIO to re-read the file on every call, allowing for rapid ---- iteration. --coffeeFileReload :: FilePath -> Q Exp --coffeeFileReload fp = do -- rs <- coffeeSettings -- shakespeareFileReload rs fp -- ---- | Deprecated synonym for 'coffeeFileReload' --coffeeFileDebug :: FilePath -> Q Exp --coffeeFileDebug = coffeeFileReload --{-# DEPRECATED coffeeFileDebug "Please use coffeeFileReload instead." #-} -diff --git a/Text/Julius.hs b/Text/Julius.hs -index 230eac3..1a0376f 100644 ---- a/Text/Julius.hs -+++ b/Text/Julius.hs -@@ -14,17 +14,8 @@ module Text.Julius - -- ** Template-Reading Functions - -- | These QuasiQuoter and Template Haskell methods return values of - -- type @'JavascriptUrl' url@. See the Yesod book for details. -- js -- , julius -- , juliusFile -- , jsFile -- , juliusFileDebug -- , jsFileDebug -- , juliusFileReload -- , jsFileReload -- - -- * Datatypes -- , JavascriptUrl -+ JavascriptUrl - , Javascript (..) - , RawJavascript (..) - -@@ -37,9 +28,11 @@ module Text.Julius - , renderJavascriptUrl - - -- ** internal, used by 'Text.Coffee' -- , javascriptSettings - -- ** internal - , juliusUsedIdentifiers -+ -+ -- used by TH splices -+ , asJavascriptUrl - ) where - - import Language.Haskell.TH.Quote (QuasiQuoter (..)) -@@ -101,47 +94,6 @@ instance RawJS TL.Text where rawJS = RawJavascript . fromLazyText - instance RawJS Builder where rawJS = RawJavascript - instance RawJS Bool where rawJS = RawJavascript . toJavascript - --javascriptSettings :: Q ShakespeareSettings --javascriptSettings = do -- toJExp <- [|toJavascript|] -- wrapExp <- [|Javascript|] -- unWrapExp <- [|unJavascript|] -- asJavascriptUrl' <- [|asJavascriptUrl|] -- return $ defaultShakespeareSettings { toBuilder = toJExp -- , wrap = wrapExp -- , unwrap = unWrapExp -- , modifyFinalValue = Just asJavascriptUrl' -- } -- --js, julius :: QuasiQuoter --js = QuasiQuoter { quoteExp = \s -> do -- rs <- javascriptSettings -- quoteExp (shakespeare rs) s -- } -- --julius = js -- --jsFile, juliusFile :: FilePath -> Q Exp --jsFile fp = do -- rs <- javascriptSettings -- shakespeareFile rs fp -- --juliusFile = jsFile -- -- --jsFileReload, juliusFileReload :: FilePath -> Q Exp --jsFileReload fp = do -- rs <- javascriptSettings -- shakespeareFileReload rs fp -- --juliusFileReload = jsFileReload -- --jsFileDebug, juliusFileDebug :: FilePath -> Q Exp --juliusFileDebug = jsFileReload --{-# DEPRECATED juliusFileDebug "Please use juliusFileReload instead." #-} --jsFileDebug = jsFileReload --{-# DEPRECATED jsFileDebug "Please use jsFileReload instead." #-} -- - -- | Determine which identifiers are used by the given template, useful for - -- creating systems like yesod devel. - juliusUsedIdentifiers :: String -> [(Deref, VarType)] -diff --git a/Text/Roy.hs b/Text/Roy.hs -index cf09cec..870c9f6 100644 ---- a/Text/Roy.hs -+++ b/Text/Roy.hs -@@ -23,13 +23,6 @@ module Text.Roy - -- ** Template-Reading Functions - -- | These QuasiQuoter and Template Haskell methods return values of - -- type @'JavascriptUrl' url@. See the Yesod book for details. -- roy -- , royFile -- , royFileReload -- --#ifdef TEST_EXPORT -- , roySettings --#endif - ) where - - import Language.Haskell.TH.Quote (QuasiQuoter (..)) -@@ -37,50 +30,3 @@ import Language.Haskell.TH.Syntax - import Text.Shakespeare - import Text.Julius - ---- | The Roy language compiles down to Javascript. ---- We do this compilation once at compile time to avoid needing to do it during the request. ---- We call this a preConversion because other shakespeare modules like Lucius use Haskell to compile during the request instead rather than a system call. --roySettings :: Q ShakespeareSettings --roySettings = do -- jsettings <- javascriptSettings -- return $ jsettings { varChar = '#' -- , preConversion = Just PreConvert { -- preConvert = ReadProcess "roy" ["--stdio"] -- , preEscapeIgnoreBalanced = "'\"" -- , preEscapeIgnoreLine = "//" -- , wrapInsertion = Nothing -- {- -- Just WrapInsertion { -- wrapInsertionIndent = Just " " -- , wrapInsertionStartBegin = "(\\" -- , wrapInsertionSeparator = " " -- , wrapInsertionStartClose = " ->\n" -- , wrapInsertionEnd = ")" -- , wrapInsertionApplyBegin = " " -- , wrapInsertionApplyClose = ")\n" -- } -- -} -- } -- } -- ---- | Read inline, quasiquoted Roy. --roy :: QuasiQuoter --roy = QuasiQuoter { quoteExp = \s -> do -- rs <- roySettings -- quoteExp (shakespeare rs) s -- } -- ---- | Read in a Roy template file. This function reads the file once, at ---- compile time. --royFile :: FilePath -> Q Exp --royFile fp = do -- rs <- roySettings -- shakespeareFile rs fp -- ---- | Read in a Roy template file. This impure function uses ---- unsafePerformIO to re-read the file on every call, allowing for rapid ---- iteration. --royFileReload :: FilePath -> Q Exp --royFileReload fp = do -- rs <- roySettings -- shakespeareFileReload rs fp -diff --git a/Text/TypeScript.hs b/Text/TypeScript.hs -index 34bf4bf..30c5388 100644 ---- a/Text/TypeScript.hs -+++ b/Text/TypeScript.hs -@@ -53,65 +53,10 @@ - -- - -- 2. TypeScript: - module Text.TypeScript -- ( -- * Functions -- -- ** Template-Reading Functions -- -- | These QuasiQuoter and Template Haskell methods return values of -- -- type @'JavascriptUrl' url@. See the Yesod book for details. -- tsc -- , typeScriptFile -- , typeScriptFileReload -- --#ifdef TEST_EXPORT -- , typeScriptSettings --#endif -+ ( - ) where - - import Language.Haskell.TH.Quote (QuasiQuoter (..)) - import Language.Haskell.TH.Syntax - import Text.Shakespeare - import Text.Julius -- ---- | The TypeScript language compiles down to Javascript. ---- We do this compilation once at compile time to avoid needing to do it during the request. ---- We call this a preConversion because other shakespeare modules like Lucius use Haskell to compile during the request instead rather than a system call. --typeScriptSettings :: Q ShakespeareSettings --typeScriptSettings = do -- jsettings <- javascriptSettings -- return $ jsettings { varChar = '#' -- , preConversion = Just PreConvert { -- preConvert = ReadProcess "sh" ["-c", "TMP_IN=$(mktemp XXXXXXXXXX.ts); TMP_OUT=$(mktemp XXXXXXXXXX.js); cat /dev/stdin > ${TMP_IN} && tsc --out ${TMP_OUT} ${TMP_IN} && cat ${TMP_OUT}; rm ${TMP_IN} && rm ${TMP_OUT}"] -- , preEscapeIgnoreBalanced = "'\"" -- , preEscapeIgnoreLine = "//" -- , wrapInsertion = Just WrapInsertion { -- wrapInsertionIndent = Nothing -- , wrapInsertionStartBegin = ";(function(" -- , wrapInsertionSeparator = ", " -- , wrapInsertionStartClose = "){" -- , wrapInsertionEnd = "})" -- , wrapInsertionApplyBegin = "(" -- , wrapInsertionApplyClose = ");\n" -- } -- } -- } -- ---- | Read inline, quasiquoted TypeScript --tsc :: QuasiQuoter --tsc = QuasiQuoter { quoteExp = \s -> do -- rs <- typeScriptSettings -- quoteExp (shakespeare rs) s -- } -- ---- | Read in a Roy template file. This function reads the file once, at ---- compile time. --typeScriptFile :: FilePath -> Q Exp --typeScriptFile fp = do -- rs <- typeScriptSettings -- shakespeareFile rs fp -- ---- | Read in a Roy template file. This impure function uses ---- unsafePerformIO to re-read the file on every call, allowing for rapid ---- iteration. --typeScriptFileReload :: FilePath -> Q Exp --typeScriptFileReload fp = do -- rs <- typeScriptSettings -- shakespeareFileReload rs fp --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/shakespeare-js_TH-exports.patch b/standalone/android/haskell-patches/shakespeare-js_TH-exports.patch new file mode 100644 index 000000000..3ddbadaf1 --- /dev/null +++ b/standalone/android/haskell-patches/shakespeare-js_TH-exports.patch @@ -0,0 +1,25 @@ +From 40182bfb77ba16beab0da95b664d2c052d5fcad6 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 04:53:30 +0000 +Subject: [PATCH] TH exports + +--- + Text/Julius.hs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Text/Julius.hs b/Text/Julius.hs +index 3a9f83e..2b98f30 100644 +--- a/Text/Julius.hs ++++ b/Text/Julius.hs +@@ -40,6 +40,8 @@ module Text.Julius + , javascriptSettings + -- ** internal + , juliusUsedIdentifiers ++ -- used by TH ++ , asJavascriptUrl + ) where + + import Language.Haskell.TH.Quote (QuasiQuoter (..)) +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch b/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch index aa30b255a..51443b5d4 100644 --- a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch +++ b/standalone/android/haskell-patches/shakespeare_1.0.3_0001-export-symbol-used-by-TH-splices.patch @@ -1,139 +1,26 @@ -From 3cb1056782c29b0b68bdcff8fa49d3ea92126956 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Mon, 15 Apr 2013 16:46:15 -0400 -Subject: [PATCH] export symbol used by TH splices +From 4a75a2f0d77168aa3115b991284a5120484e18f0 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 04:59:21 +0000 +Subject: [PATCH] TH exports --- - Text/.Shakespeare.hs.swp | Bin 24576 -> 0 bytes - Text/Shakespeare.hs | 2 ++ - 2 files changed, 2 insertions(+) - delete mode 100644 Text/.Shakespeare.hs.swp - -diff --git a/Text/.Shakespeare.hs.swp b/Text/.Shakespeare.hs.swp -deleted file mode 100644 -index 4d6cd6a0295fdfb59f32a66b4af556c0630dd5b0..0000000000000000000000000000000000000000 -GIT binary patch -literal 0 -HcmV?d00001 - -literal 24576 -zcmeI4e~et$RmWd`KnqD)L_(BS5xTW4?M$;fu@g0M7u$*LtdmXsW9?l#wDxBEJo9Gf -z#WU|s-h1QO^^dk7RGJp46wwy`NCj0Y(S!!1AgEe}NKk}8ErJRNG@z(KqJ@T13Q|#9 -zR6ghact2*x>kWSanvuTVnRm}U_uO;OJ@?*o&-2-xr{<5SdmDFqe16RHu3haOfAZ_E -z_a3Fwww7 -z0}~BQG%(S?|0fM({p-CS(4lL=qu?5g>-pOOzWx0}{5=c)#QwgHzc+z9s33JFpNR%0 -z8klHcqJfD9CK{M%V4{JE1|}MqXkem&i3TPb_}{AmzvX$m5$_9fi0A%aVgN6{(es`I -zzX&dZcYzu3y*GH??}AT&_ks{CfP2BM;5zUML4hxWFM!X2XTa0oxI;GN(`@b5q3 -zdEW+q1)c*R0v`lD@F2Ja+zkHk^`6%R`@wf#=Xt*dj)L33^FQo)>);_U2fj-nMfm&Z@;M38Pg{=v0;4eAEh}Oh1S2h`)X| -zaMUe7^VK8erq$k&-{go$)yw+d5jmw@!>_`_lJ=8eE^Ye#V16}jZGhf}|gJeHq%I3sW^nO}B(&sBOwLMuVwp$B8=cC!v3~8z{d^Yb`{L(y$e%RNGLh -zAjzeZ#-zQ6{PbKv@6P+(K>$gF-lS_ukPf=ptg3Cl=wH?vSz7N0i$-HjKN78?4mw5; -zOwXx?8hL_1s6wHyZrIeiQE^+iN`qM^PJ>+3lor~9s3{7pl~RjV=*x;o-N7V6;={*;lR=J&F23q6JsMS|4#z5o|G5(pQD1n;kz|g;l(OBq%sbz3nkM^ph9XCf`ziHH63zL|5=(x`Mn -zie|KtTKTh}$2ewz>J3mMYOzdOnp9L#a8WHY5CQ66$6_DHg3T-nGbNrt&#s}ru6lkb -z-IGZY_?REM327$~zo2`jJM~D%8MJ5<9Wdo_Co1*Z*bC;I#D23gt@Z4;&imBGN+6XP -zsb?pa)=zw_xf#q#7j=VczBC0NJ;&&fxCMGwcpwjF=k?Vx@c -z^gSLsbekfjS5M^Ok -zH?374L@iuErXM8y2=x3&wR$SnL?fnCh0-rodOocRH)Fg?Oa~L?Y~R(#Rc*AYhUbaj -zJH#lS%-XwEyU(K0?)iPSbht5y`r?;%U?+Y{iiHf4Y86%?dA{JY7|iTb^T*thiY9vT -zdF>O*sg4J*ru&L!kDE3hKQV}?YT7D^lecwTmb-F8$G6r_-%qe!=~gm`7UW05uhYw( -zDS)YZFmMG~d`_MAcP%rnbY(FfB+cNc-wWi|X$qI+%N)xdOf;{#Bw>R1GU}J40Wk>E -zhFu)7@r2bxrYAG#wAq_1dl@T(;gHBGEmfMfKLwFyx_@g7Jtk+&o?vku7t?DjBylrH -zS-)lI><_&p$@IeQU{lTmv$Hi-B`LKrI#RCi@qynB+aZSh06V3IrakOmz+b1B$|h8r -zV9^m+@#c>;PDbJ*RBfRDE*S4Qf2{5(bu&leC=OedM|sPQ1B0;3yiqm#Wm>h9xF_Xx -zZ#z>eY`cnw-7;Xkdt>RL#^O4@Xst0X`;o}+rr!3jt=@8E{^-i7xf6@?$BwQzzq-;f -z3x4gc>D|*ia{;f+bdzRP4WBr-DUaiW7-Oj&ANXmgzth7;qn_8%3NRMKFo!)=Gb<-s -z1H| -z>!7QH1U~z>(gauxvJCZ@I>=JqYwIzwtyQ-C<$}BhN?`~!c} -zE{B-7?AFeS8}V5SGZd#He3NYVwAbM~&%z7LQMb8*_TfP{9Hb5J;>>n+Y+(t*UR-(b -zp@V9s9mO+4KZ$0-NEVnbm1p|Cu#Hl+edh8eHF{y1qL>*p+HDoYhxZ?S@Z|mn=hTUy -z87Hkrn4SmyWE{c4g@wF{yw;&^uokjAn`f6KXP+^Q@zg^k=xM;ft>&Uh%@+2oZaR8&sXp3ob|s5J`T=;IZy}Jf|sECb?^k}fd_!py%9`4 -z6Aer>Fwww70}~BQG%(S?L<18IOf)djz(fQ8M>L>HpA`x01v;3wgBy%^s9NfdJJhyW -zx$X#>62P5160U{OHhqY9H6NCUd(D)nUR{{9;KN`YoCT5>um`*e{2M`qFM*!{_kdf#8^BHACGPou -z1AGkp97w=%@HTKOxCPt{zQ$euv*118GB^YFfZM@$xa)rryZ}B0o&uM^Nw5TN0sqN8 -z|I6S>@KMkK?*O-gf8gH#x4_dN0Y|_bxB~K08cP4p&4sIOn+8zRrWWd)0Op?18#c8w -zQbi`SDO7v*X(n~$Lc(LX9p%iA>~EWHsD^mWxa&Bf&6~)(g3Ij7?e?hPu%W -zJjS+Lv?=YnPo3y17Q8zeZZYNm_RrW;~1!6FNlzJW^d@|vON+Tb$7Tv6&MeJ+{YH%2H#kA|~m6?9V* -zNmqo6SPQ#{<~p#%*M5~n-8SLqaRHiDA)Cn8G$OH(sv5V# -zOUWRR;k9gv_0{d`Ae+J@{4=}qZ2iCU$MW@ -z%$UUEnb}@YUQvepwwkt5j*(C^-E(Q589^;?{!42=|0UyNB+}B@M#q|qwlA~Os?c89 -zx)#JoCT=_s*N9rKoibj=jvCh7%$RyrqOG=Jyp&dq+|7_#l-e$FrMot}F6ObOX2thb -z3)ihO#i&M#cDN3R>DSg|dkddgb>Rxl*an4qZMO7def9#)kFRuk8Nuw{Y=Z!FKJNrG -z)qRIkG4vZM?HK3fRPH@xDyJ$*>nc^L*EC8$#5J(>2&`}n&6t7}wQZY`bz`L~k5b`h -zPFwMpJ+JJBb9YcPhY88ViidT@C3cyN7B*%PG{t{4Nf?#f0H+<1F>gxo;b>tlylUe8 -zr`6o!gTHn6&(I>#27oON%-$p>8UU5}?SMrNGBpQikuc -zCzsLY4*d}K9#!uauxa!EhACl)lf%Bv|=O3jF)t>(74Dk14nO7ChpvtIqvFA1I*D~isu9iZex;Z -zxu(_Fk%as}9J?%mK{O;uSaOjH_8XsMu}e;=5IRHPp)6RoRSa5w3D5lLMYlNSPxbT~ -zH}qo-g7Z>kv#s3c5*zZ7JYhXlG7a-gA-A8()0MQO##BZUpZAlox_+=L3986%XSy^t -zj_!a?8{U*|j#I{_1f;nn*%lgH3|M+4*+rH3$@!lny7#o4DLMb2<e -z&%v|cBj8bR8~6@q_s@Y}1-}B;z%rNyH-OJ@X8#57UJ!s5miiEDR>HGK=S|PeE(MPM(`qM -z`ric4fEDm|@HNi#zXU!4?ganAS^jUq3*ZCbeV_^M0Y3?@1z%+>WIR4CW0HTwgxqH< -zfv|-x`Kn_hNxDR_LtxP;PJdenY{}A=$FxepI$6?SN1mijH{?0m0=DV8ZAAy&2ZAdN}1mOL_@WPFL;5c`0h1d!~z6GieF@e{jxo?X|g -z+-i89-9%C?PCXzE{&yB=r44bw%#GYEx;c`?rN|#F}bITFChvVt>G%S&hp>mVe -zQE6dIbapZ_cQ0O+W(&EhGj+_^o8^)Q#1^P~YRPEg65o&;t?9pJFD*ZG&pnsyD2aDR -zkIf%FJb!eKvtjexl+INflWw|})pky+UAv~$U3CtQLb=y@7W-SwSHGGfc4{}VRa2=( -zGisZJGvoxwdCR=$!*}!UPfDh#vn5v0G|)%ug3wZx?kY5uK8{PMO)~#ZgsUCiKH9T~ -z{=$JWE41AJRU1Hu($TS1DYI1vSBX4~tgP>Vr`j^bQ{t&>jNO<7?7G{}L}L^GBEY)W==6B601}3#WEPUQX5)|f}sSMOQePggeLaXEY>HZdNVpwNi`+JfKOKT -zW0~=A+nMAHOJ816)pIJ;jMG|PctyQ!GSmbiv3Qr)u&ouEmum^pkkc@$ -zw#m&VrMmx{u&J%gPFTffSIcHAo>@*W5;6-uS6@+S&5%ay{F -cT45AdikYcun%oMsfwvWjb+Ig{u-NAPH%ay)TmS$7 + Text/Shakespeare.hs | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs -index d300951..fabbf66 100644 +index 9eb06a2..1290ab1 100644 --- a/Text/Shakespeare.hs +++ b/Text/Shakespeare.hs -@@ -22,6 +22,8 @@ module Text.Shakespeare +@@ -23,6 +23,9 @@ module Text.Shakespeare + , Deref + , Parser + ++ -- used by TH ++ , pack' ++ #ifdef TEST_EXPORT , preFilter #endif -+ -- used by TH splices -+ , pack' - ) where - - import Data.List (intersperse) -- -1.8.2.rc3 +1.7.10.4 diff --git a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-remove-TH.patch b/standalone/android/haskell-patches/shakespeare_1.0.3_0001-remove-TH.patch deleted file mode 100644 index 5a5b8eeb8..000000000 --- a/standalone/android/haskell-patches/shakespeare_1.0.3_0001-remove-TH.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 10484c5f68431349b249f07517c392c4a90bdb05 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Wed, 8 May 2013 01:47:19 -0400 -Subject: [PATCH] remove TH - ---- - Text/Shakespeare.hs | 109 ---------------------------------------------- - Text/Shakespeare/Base.hs | 28 ------------ - shakespeare.cabal | 2 +- - 3 files changed, 1 insertion(+), 138 deletions(-) - -diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs -index 7750135..fabbf66 100644 ---- a/Text/Shakespeare.hs -+++ b/Text/Shakespeare.hs -@@ -12,11 +12,7 @@ module Text.Shakespeare - , WrapInsertion (..) - , PreConversion (..) - , defaultShakespeareSettings -- , shakespeare -- , shakespeareFile -- , shakespeareFileReload - -- * low-level -- , shakespeareFromString - , shakespeareUsedIdentifiers - , RenderUrl - , VarType -@@ -135,39 +131,6 @@ defaultShakespeareSettings = ShakespeareSettings { - , modifyFinalValue = Nothing - } - --instance Lift PreConvert where -- lift (PreConvert convert ignore comment wrapInsertion) = -- [|PreConvert $(lift convert) $(lift ignore) $(lift comment) $(lift wrapInsertion)|] -- --instance Lift WrapInsertion where -- lift (WrapInsertion indent sb sep sc e ab ac) = -- [|WrapInsertion $(lift indent) $(lift sb) $(lift sep) $(lift sc) $(lift e) $(lift ab) $(lift ac)|] -- --instance Lift PreConversion where -- lift (ReadProcess command args) = -- [|ReadProcess $(lift command) $(lift args)|] -- lift Id = [|Id|] -- --instance Lift ShakespeareSettings where -- lift (ShakespeareSettings x1 x2 x3 x4 x5 x6 x7 x8 x9) = -- [|ShakespeareSettings -- $(lift x1) $(lift x2) $(lift x3) -- $(liftExp x4) $(liftExp x5) $(liftExp x6) $(lift x7) $(lift x8) $(liftMExp x9)|] -- where -- liftExp (VarE n) = [|VarE $(liftName n)|] -- liftExp (ConE n) = [|ConE $(liftName n)|] -- liftExp _ = error "liftExp only supports VarE and ConE" -- liftMExp Nothing = [|Nothing|] -- liftMExp (Just e) = [|Just|] `appE` liftExp e -- liftName (Name (OccName a) b) = [|Name (OccName $(lift a)) $(liftFlavour b)|] -- liftFlavour NameS = [|NameS|] -- liftFlavour (NameQ (ModName a)) = [|NameQ (ModName $(lift a))|] -- liftFlavour (NameU _) = error "liftFlavour NameU" -- [|NameU $(lift $ fromIntegral a)|] -- liftFlavour (NameL _) = error "liftFlavour NameL" -- [|NameU $(lift $ fromIntegral a)|] -- liftFlavour (NameG ns (PkgName p) (ModName m)) = [|NameG $(liftNS ns) (PkgName $(lift p)) (ModName $(lift m))|] -- liftNS VarName = [|VarName|] -- liftNS DataName = [|DataName|] -- - type QueryParameters = [(TS.Text, TS.Text)] - type RenderUrl url = (url -> QueryParameters -> TS.Text) - type Shakespeare url = RenderUrl url -> Builder -@@ -302,54 +265,6 @@ pack' = TS.pack - {-# NOINLINE pack' #-} - #endif - --contentsToShakespeare :: ShakespeareSettings -> [Content] -> Q Exp --contentsToShakespeare rs a = do -- r <- newName "_render" -- c <- mapM (contentToBuilder r) a -- compiledTemplate <- case c of -- -- Make sure we convert this mempty using toBuilder to pin down the -- -- type appropriately -- [] -> fmap (AppE $ wrap rs) [|mempty|] -- [x] -> return x -- _ -> do -- mc <- [|mconcat|] -- return $ mc `AppE` ListE c -- fmap (maybe id AppE $ modifyFinalValue rs) $ -- if justVarInterpolation rs -- then return compiledTemplate -- else return $ LamE [VarP r] compiledTemplate -- where -- contentToBuilder :: Name -> Content -> Q Exp -- contentToBuilder _ (ContentRaw s') = do -- ts <- [|fromText . pack'|] -- return $ wrap rs `AppE` (ts `AppE` LitE (StringL s')) -- contentToBuilder _ (ContentVar d) = -- return $ wrap rs `AppE` (toBuilder rs `AppE` derefToExp [] d) -- contentToBuilder r (ContentUrl d) = do -- ts <- [|fromText|] -- return $ wrap rs `AppE` (ts `AppE` (VarE r `AppE` derefToExp [] d `AppE` ListE [])) -- contentToBuilder r (ContentUrlParam d) = do -- ts <- [|fromText|] -- up <- [|\r' (u, p) -> r' u p|] -- return $ wrap rs `AppE` (ts `AppE` (up `AppE` VarE r `AppE` derefToExp [] d)) -- contentToBuilder r (ContentMix d) = -- return $ derefToExp [] d `AppE` VarE r -- --shakespeare :: ShakespeareSettings -> QuasiQuoter --shakespeare r = QuasiQuoter { quoteExp = shakespeareFromString r } -- --shakespeareFromString :: ShakespeareSettings -> String -> Q Exp --shakespeareFromString r str = do -- s <- qRunIO $ preFilter r str -- contentsToShakespeare r $ contentFromString r s -- --shakespeareFile :: ShakespeareSettings -> FilePath -> Q Exp --shakespeareFile r fp = do --#ifdef GHC_7_4 -- qAddDependentFile fp --#endif -- readFileQ fp >>= shakespeareFromString r -- - data VarType = VTPlain | VTUrl | VTUrlParam | VTMixin - - getVars :: Content -> [(Deref, VarType)] -@@ -369,30 +284,6 @@ data VarExp url = EPlain Builder - shakespeareUsedIdentifiers :: ShakespeareSettings -> String -> [(Deref, VarType)] - shakespeareUsedIdentifiers settings = concatMap getVars . contentFromString settings - --shakespeareFileReload :: ShakespeareSettings -> FilePath -> Q Exp --shakespeareFileReload rs fp = do -- str <- readFileQ fp -- s <- qRunIO $ preFilter rs str -- let b = shakespeareUsedIdentifiers rs s -- c <- mapM vtToExp b -- rt <- [|shakespeareRuntime|] -- wrap' <- [|\x -> $(return $ wrap rs) . x|] -- r' <- lift rs -- return $ wrap' `AppE` (rt `AppE` r' `AppE` (LitE $ StringL fp) `AppE` ListE c) -- where -- vtToExp :: (Deref, VarType) -> Q Exp -- vtToExp (d, vt) = do -- d' <- lift d -- c' <- c vt -- return $ TupE [d', c' `AppE` derefToExp [] d] -- where -- c :: VarType -> Q Exp -- c VTPlain = [|EPlain . $(return $ toBuilder rs)|] -- c VTUrl = [|EUrl|] -- c VTUrlParam = [|EUrlParam|] -- c VTMixin = [|\x -> EMixin $ \r -> $(return $ unwrap rs) $ x r|] -- -- - shakespeareRuntime :: ShakespeareSettings -> FilePath -> [(Deref, VarExp url)] -> Shakespeare url - shakespeareRuntime rs fp cd render' = unsafePerformIO $ do - str <- readFileUtf8 fp -diff --git a/Text/Shakespeare/Base.hs b/Text/Shakespeare/Base.hs -index 7c96898..ef769b1 100644 ---- a/Text/Shakespeare/Base.hs -+++ b/Text/Shakespeare/Base.hs -@@ -52,34 +52,6 @@ data Deref = DerefModulesIdent [String] Ident - | DerefTuple [Deref] - deriving (Show, Eq, Read, Data, Typeable, Ord) - --instance Lift Ident where -- lift (Ident s) = [|Ident|] `appE` lift s --instance Lift Deref where -- lift (DerefModulesIdent v s) = do -- dl <- [|DerefModulesIdent|] -- v' <- lift v -- s' <- lift s -- return $ dl `AppE` v' `AppE` s' -- lift (DerefIdent s) = do -- dl <- [|DerefIdent|] -- s' <- lift s -- return $ dl `AppE` s' -- lift (DerefBranch x y) = do -- x' <- lift x -- y' <- lift y -- db <- [|DerefBranch|] -- return $ db `AppE` x' `AppE` y' -- lift (DerefIntegral i) = [|DerefIntegral|] `appE` lift i -- lift (DerefRational r) = do -- n <- lift $ numerator r -- d <- lift $ denominator r -- per <- [|(%) :: Int -> Int -> Ratio Int|] -- dr <- [|DerefRational|] -- return $ dr `AppE` InfixE (Just n) per (Just d) -- lift (DerefString s) = [|DerefString|] `appE` lift s -- lift (DerefList x) = [|DerefList $(lift x)|] -- lift (DerefTuple x) = [|DerefTuple $(lift x)|] -- - derefParens, derefCurlyBrackets :: UserParser a Deref - derefParens = between (char '(') (char ')') parseDeref - derefCurlyBrackets = between (char '{') (char '}') parseDeref -diff --git a/shakespeare.cabal b/shakespeare.cabal -index 01c8d5d..0fff966 100644 ---- a/shakespeare.cabal -+++ b/shakespeare.cabal -@@ -27,7 +27,7 @@ library - , template-haskell - , parsec >= 2 && < 4 - , text >= 0.7 && < 0.12 -- , process >= 1.0 && < 1.2 -+ , process >= 1.0 && < 1.3 - - exposed-modules: - Text.Shakespeare --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/skein_hardcode_little-endian.patch b/standalone/android/haskell-patches/skein_hardcode_little-endian.patch new file mode 100644 index 000000000..788d8e521 --- /dev/null +++ b/standalone/android/haskell-patches/skein_hardcode_little-endian.patch @@ -0,0 +1,24 @@ +From 3a04b41ffce4e4e87b0fedd3a1e3434a3f06cc76 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 00:18:12 +0000 +Subject: [PATCH] hardcode little endian + +--- + c_impl/optimized/skein_port.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/c_impl/optimized/skein_port.h b/c_impl/optimized/skein_port.h +index a2d0fc2..6929bb0 100644 +--- a/c_impl/optimized/skein_port.h ++++ b/c_impl/optimized/skein_port.h +@@ -45,6 +45,7 @@ typedef uint64_t u64b_t; /* 64-bit unsigned integer */ + * platform-specific code instead (e.g., for big-endian CPUs). + * + */ ++#define SKEIN_NEED_SWAP (0) + #ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */ + + #include "brg_endian.h" /* get endianness selection */ +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch b/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch index 5a343d875..fc9569573 100644 --- a/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch +++ b/standalone/android/haskell-patches/socks_0.4.2_0001-remove-IPv6-stuff.patch @@ -1,43 +1,29 @@ -From abab0f8202998a3e88c5dc5f67a8245da6c174b3 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 28 Feb 2013 23:36:20 -0400 +From 28e6a6599ee91e15aa7b2f9d25433490f192f22e Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:17:29 +0000 Subject: [PATCH] remove IPv6 stuff --- - Network/Socks5.hs | 1 - - Network/Socks5/Command.hs | 16 ++-------------- - Network/Socks5/Types.hs | 3 +-- - Network/Socks5/Wire.hs | 2 -- - 4 files changed, 3 insertions(+), 19 deletions(-) + Network/Socks5/Command.hs | 8 +------- + Network/Socks5/Conf.hs | 1 - + Network/Socks5/Lowlevel.hs | 1 - + Network/Socks5/Types.hs | 18 +----------------- + Network/Socks5/Wire.hs | 2 -- + 5 files changed, 2 insertions(+), 28 deletions(-) -diff --git a/Network/Socks5.hs b/Network/Socks5.hs -index 67b0060..80efb9c 100644 ---- a/Network/Socks5.hs -+++ b/Network/Socks5.hs -@@ -54,7 +54,6 @@ socksConnectAddr :: Socket -> SockAddr -> SockAddr -> IO () - socksConnectAddr sock sockserver destaddr = withSocks sock sockserver $ do - case destaddr of - SockAddrInet p h -> socks5ConnectIPV4 sock h p >> return () -- SockAddrInet6 p _ h _ -> socks5ConnectIPV6 sock h p >> return () - _ -> error "unsupported unix sockaddr type" - - -- | connect a new socket to the socks server, and connect the stream to a FQDN diff --git a/Network/Socks5/Command.hs b/Network/Socks5/Command.hs -index 2952706..db994c9 100644 +index 8ce06ec..222d954 100644 --- a/Network/Socks5/Command.hs +++ b/Network/Socks5/Command.hs -@@ -9,9 +9,8 @@ - -- - module Network.Socks5.Command - ( socks5Establish -- , socks5ConnectIPV4 -- , socks5ConnectIPV6 - , socks5ConnectDomainName -+ , socks5ConnectIPV4 - -- * lowlevel interface - , socks5Rpc - ) where -@@ -23,7 +22,7 @@ import qualified Data.ByteString as B +@@ -12,7 +12,6 @@ module Network.Socks5.Command + , Connect(..) + , Command(..) + , connectIPV4 +- , connectIPV6 + , connectDomainName + -- * lowlevel interface + , rpc +@@ -28,7 +27,7 @@ import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import Data.Serialize @@ -46,50 +32,92 @@ index 2952706..db994c9 100644 import Network.Socket.ByteString import Network.Socks5.Types -@@ -46,17 +45,6 @@ socks5ConnectIPV4 socket hostaddr port = onReply <$> socks5Rpc socket request - onReply (SocksAddrIPV4 h, p) = (h, p) - onReply _ = error "ipv4 requested, got something different" +@@ -64,11 +63,6 @@ connectIPV4 socket hostaddr port = onReply <$> rpc_ socket (Connect $ SocksAddre + where onReply (SocksAddrIPV4 h, p) = (h, p) + onReply _ = error "ipv4 requested, got something different" --socks5ConnectIPV6 :: Socket -> HostAddress6 -> PortNumber -> IO (HostAddress6, PortNumber) --socks5ConnectIPV6 socket hostaddr6 port = onReply <$> socks5Rpc socket request -- where -- request = SocksRequest -- { requestCommand = SocksCommandConnect -- , requestDstAddr = SocksAddrIPV6 hostaddr6 -- , requestDstPort = fromIntegral port -- } -- onReply (SocksAddrIPV6 h, p) = (h, p) -- onReply _ = error "ipv6 requested, got something different" +-connectIPV6 :: Socket -> HostAddress6 -> PortNumber -> IO (HostAddress6, PortNumber) +-connectIPV6 socket hostaddr6 port = onReply <$> rpc_ socket (Connect $ SocksAddress (SocksAddrIPV6 hostaddr6) port) +- where onReply (SocksAddrIPV6 h, p) = (h, p) +- onReply _ = error "ipv6 requested, got something different" - -- TODO: FQDN should only be ascii, maybe putting a "fqdn" data type -- in front to make sure and make the BC.pack safe. - socks5ConnectDomainName :: Socket -> String -> PortNumber -> IO (SocksAddr, PortNumber) + connectDomainName :: Socket -> String -> PortNumber -> IO (SocksHostAddress, PortNumber) +diff --git a/Network/Socks5/Conf.hs b/Network/Socks5/Conf.hs +index c29ff7b..007d382 100644 +--- a/Network/Socks5/Conf.hs ++++ b/Network/Socks5/Conf.hs +@@ -47,5 +47,4 @@ defaultSocksConfFromSockAddr sockaddr = SocksConf server SocksVer5 + where server = SocksAddress haddr port + (haddr,port) = case sockaddr of + SockAddrInet p h -> (SocksAddrIPV4 h, p) +- SockAddrInet6 p _ h _ -> (SocksAddrIPV6 h, p) + _ -> error "unsupported unix sockaddr type" +diff --git a/Network/Socks5/Lowlevel.hs b/Network/Socks5/Lowlevel.hs +index c10d9b9..2c3d59c 100644 +--- a/Network/Socks5/Lowlevel.hs ++++ b/Network/Socks5/Lowlevel.hs +@@ -17,7 +17,6 @@ resolveToSockAddr :: SocksAddress -> IO SockAddr + resolveToSockAddr (SocksAddress sockHostAddr port) = + case sockHostAddr of + SocksAddrIPV4 ha -> return $ SockAddrInet port ha +- SocksAddrIPV6 ha6 -> return $ SockAddrInet6 port 0 ha6 0 + SocksAddrDomainName bs -> do he <- getHostByName (BC.unpack bs) + return $ SockAddrInet port (hostAddress he) + diff --git a/Network/Socks5/Types.hs b/Network/Socks5/Types.hs -index 5dc7d5e..12dea99 100644 +index 7fbec25..17c7c83 100644 --- a/Network/Socks5/Types.hs +++ b/Network/Socks5/Types.hs -@@ -17,7 +17,7 @@ module Network.Socks5.Types +@@ -19,7 +19,7 @@ module Network.Socks5.Types import Data.ByteString (ByteString) import Data.Word import Data.Data --import Network.Socket (HostAddress, HostAddress6) -+import Network.Socket (HostAddress) +-import Network.Socket (HostAddress, HostAddress6, PortNumber) ++import Network.Socket (HostAddress, PortNumber) import Control.Exception + import qualified Data.ByteString.Char8 as BC + import Numeric (showHex) +@@ -53,12 +53,10 @@ data SocksMethod = + data SocksHostAddress = + SocksAddrIPV4 !HostAddress + | SocksAddrDomainName !ByteString +- | SocksAddrIPV6 !HostAddress6 + deriving (Eq,Ord) - data SocksCommand = -@@ -38,7 +38,6 @@ data SocksMethod = - data SocksAddr = - SocksAddrIPV4 HostAddress - | SocksAddrDomainName ByteString -- | SocksAddrIPV6 HostAddress6 - deriving (Show,Eq) + instance Show SocksHostAddress where + show (SocksAddrIPV4 ha) = "SocksAddrIPV4(" ++ showHostAddress ha ++ ")" +- show (SocksAddrIPV6 ha6) = "SocksAddrIPV6(" ++ showHostAddress6 ha6 ++ ")" + show (SocksAddrDomainName dn) = "SocksAddrDomainName(" ++ BC.unpack dn ++ ")" - data SocksReply = + -- | Converts a HostAddress to a String in dot-decimal notation +@@ -69,20 +67,6 @@ showHostAddress num = concat [show q1, ".", show q2, ".", show q3, ".", show q4] + (num''',q3) = num'' `quotRem` 256 + (_,q4) = num''' `quotRem` 256 + +--- | Converts a IPv6 HostAddress6 to standard hex notation +-showHostAddress6 :: HostAddress6 -> String +-showHostAddress6 (a,b,c,d) = +- (concat . intersperse ":" . map (flip showHex "")) +- [p1,p2,p3,p4,p5,p6,p7,p8] +- where (a',p2) = a `quotRem` 65536 +- (_,p1) = a' `quotRem` 65536 +- (b',p4) = b `quotRem` 65536 +- (_,p3) = b' `quotRem` 65536 +- (c',p6) = c `quotRem` 65536 +- (_,p5) = c' `quotRem` 65536 +- (d',p8) = d `quotRem` 65536 +- (_,p7) = d' `quotRem` 65536 +- + -- | Describe a Socket address on the SOCKS protocol + data SocksAddress = SocksAddress !SocksHostAddress !PortNumber + deriving (Show,Eq,Ord) diff --git a/Network/Socks5/Wire.hs b/Network/Socks5/Wire.hs -index 2cfed52..d3bd9c5 100644 +index 3ab95a8..2881988 100644 --- a/Network/Socks5/Wire.hs +++ b/Network/Socks5/Wire.hs -@@ -41,12 +41,10 @@ data SocksResponse = SocksResponse +@@ -46,12 +46,10 @@ data SocksResponse = SocksResponse getAddr 1 = SocksAddrIPV4 <$> getWord32be getAddr 3 = SocksAddrDomainName <$> (getWord8 >>= getByteString . fromIntegral) @@ -101,7 +129,7 @@ index 2cfed52..d3bd9c5 100644 -putAddr (SocksAddrIPV6 (a,b,c,d)) = putWord8 4 >> mapM_ putWord32host [a,b,c,d] getSocksRequest 5 = do - cmd <- toEnum . fromIntegral <$> getWord8 + cmd <- toEnum . fromIntegral <$> getWord8 -- 1.7.10.4 diff --git a/standalone/android/haskell-patches/unordered-containers_fix-build-with-new-ghc.patch b/standalone/android/haskell-patches/unordered-containers_fix-build-with-new-ghc.patch new file mode 100644 index 000000000..7c0774e67 --- /dev/null +++ b/standalone/android/haskell-patches/unordered-containers_fix-build-with-new-ghc.patch @@ -0,0 +1,32 @@ +From 2d1f0027ae1ca56bbf4449887cf3bc61dc1c8e84 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 22:32:01 +0000 +Subject: [PATCH] fix build with new ghc + +--- + Data/HashMap/Base.hs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Data/HashMap/Base.hs b/Data/HashMap/Base.hs +index 6a77df4..93a384d 100644 +--- a/Data/HashMap/Base.hs ++++ b/Data/HashMap/Base.hs +@@ -86,7 +86,7 @@ import qualified Data.List as L + import Data.Monoid (Monoid(mempty, mappend)) + import Data.Traversable (Traversable(..)) + import Data.Word (Word) +-import GHC.Exts ((==#), build, reallyUnsafePtrEquality#) ++import GHC.Exts ((==#), build, reallyUnsafePtrEquality#, tagToEnum#) + import Prelude hiding (filter, foldr, lookup, map, null, pred) + + import qualified Data.HashMap.Array as A +@@ -1072,5 +1072,5 @@ fullNodeMask = complement (complement 0 `unsafeShiftL` maxChildren) + -- | Check if two the two arguments are the same value. N.B. This + -- function might give false negatives (due to GC moving objects.) + ptrEq :: a -> a -> Bool +-ptrEq x y = reallyUnsafePtrEquality# x y ==# 1# ++ptrEq x y = tagToEnum# (reallyUnsafePtrEquality# x y ==# 1#) + {-# INLINE ptrEq #-} +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/vector_0.10.0.1_0001-disable-optimisation-that-breaks-when-cross-compilin.patch b/standalone/android/haskell-patches/vector_0.10.0.1_0001-disable-optimisation-that-breaks-when-cross-compilin.patch deleted file mode 100644 index aa50d9c93..000000000 --- a/standalone/android/haskell-patches/vector_0.10.0.1_0001-disable-optimisation-that-breaks-when-cross-compilin.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3a4ee8091ba9da44f9f4a04522a5ff45fabe70d9 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 28 Feb 2013 23:37:56 -0400 -Subject: [PATCH] disable optimisation that breaks when cross-compiling - -This needs TH to work actually. ---- - Data/Vector/Fusion/Stream/Monadic.hs | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Data/Vector/Fusion/Stream/Monadic.hs b/Data/Vector/Fusion/Stream/Monadic.hs -index 51fec75..b089b3d 100644 ---- a/Data/Vector/Fusion/Stream/Monadic.hs -+++ b/Data/Vector/Fusion/Stream/Monadic.hs -@@ -101,7 +101,6 @@ import GHC.Exts ( SpecConstrAnnotation(..) ) - - data SPEC = SPEC | SPEC2 - #if __GLASGOW_HASKELL__ >= 700 --{-# ANN type SPEC ForceSpecConstr #-} - #endif - - emptyStream :: String --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/vector_hack-to-build-with-new-ghc.patch b/standalone/android/haskell-patches/vector_hack-to-build-with-new-ghc.patch new file mode 100644 index 000000000..4c08be4f9 --- /dev/null +++ b/standalone/android/haskell-patches/vector_hack-to-build-with-new-ghc.patch @@ -0,0 +1,130 @@ +From af259b521574b734a7a0b1b3e9e6868df33ebdb9 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sat, 21 Sep 2013 23:47:47 +0000 +Subject: [PATCH] hack to build with new ghc + +--- + Data/Vector.hs | 1 - + Data/Vector/Fusion/Stream/Monadic.hs | 1 - + Data/Vector/Generic.hs | 10 ++-------- + Data/Vector/Primitive.hs | 1 - + Data/Vector/Storable.hs | 1 - + Data/Vector/Unboxed/Base.hs | 15 +-------------- + 6 files changed, 3 insertions(+), 26 deletions(-) + +diff --git a/Data/Vector.hs b/Data/Vector.hs +index 138b2db..92c4387 100644 +--- a/Data/Vector.hs ++++ b/Data/Vector.hs +@@ -215,7 +215,6 @@ instance Data a => Data (Vector a) where + toConstr _ = error "toConstr" + gunfold _ _ = error "gunfold" + dataTypeOf _ = G.mkType "Data.Vector.Vector" +- dataCast1 = G.dataCast + + type instance G.Mutable Vector = MVector + +diff --git a/Data/Vector/Fusion/Stream/Monadic.hs b/Data/Vector/Fusion/Stream/Monadic.hs +index 51fec75..b089b3d 100644 +--- a/Data/Vector/Fusion/Stream/Monadic.hs ++++ b/Data/Vector/Fusion/Stream/Monadic.hs +@@ -101,7 +101,6 @@ import GHC.Exts ( SpecConstrAnnotation(..) ) + + data SPEC = SPEC | SPEC2 + #if __GLASGOW_HASKELL__ >= 700 +-{-# ANN type SPEC ForceSpecConstr #-} + #endif + + emptyStream :: String +diff --git a/Data/Vector/Generic.hs b/Data/Vector/Generic.hs +index 78f7260..f4ea80a 100644 +--- a/Data/Vector/Generic.hs ++++ b/Data/Vector/Generic.hs +@@ -157,7 +157,7 @@ module Data.Vector.Generic ( + showsPrec, readPrec, + + -- ** @Data@ and @Typeable@ +- gfoldl, dataCast, mkType ++ gfoldl, mkType + ) where + + import Data.Vector.Generic.Base +@@ -194,7 +194,7 @@ import Prelude hiding ( length, null, + showsPrec ) + + import qualified Text.Read as Read +-import Data.Typeable ( Typeable1, gcast1 ) ++import Data.Typeable ( gcast1 ) + + #include "vector.h" + +@@ -2019,9 +2019,3 @@ gfoldl f z v = z fromList `f` toList v + mkType :: String -> DataType + {-# INLINE mkType #-} + mkType = mkNoRepType +- +-dataCast :: (Vector v a, Data a, Typeable1 v, Typeable1 t) +- => (forall d. Data d => c (t d)) -> Maybe (c (v a)) +-{-# INLINE dataCast #-} +-dataCast f = gcast1 f +- +diff --git a/Data/Vector/Primitive.hs b/Data/Vector/Primitive.hs +index 5f59bae..06e84c3 100644 +--- a/Data/Vector/Primitive.hs ++++ b/Data/Vector/Primitive.hs +@@ -188,7 +188,6 @@ instance (Data a, Prim a) => Data (Vector a) where + toConstr _ = error "toConstr" + gunfold _ _ = error "gunfold" + dataTypeOf _ = G.mkType "Data.Vector.Primitive.Vector" +- dataCast1 = G.dataCast + + + type instance G.Mutable Vector = MVector +diff --git a/Data/Vector/Storable.hs b/Data/Vector/Storable.hs +index f9928e4..a17e3d6 100644 +--- a/Data/Vector/Storable.hs ++++ b/Data/Vector/Storable.hs +@@ -194,7 +194,6 @@ instance (Data a, Storable a) => Data (Vector a) where + toConstr _ = error "toConstr" + gunfold _ _ = error "gunfold" + dataTypeOf _ = G.mkType "Data.Vector.Storable.Vector" +- dataCast1 = G.dataCast + + type instance G.Mutable Vector = MVector + +diff --git a/Data/Vector/Unboxed/Base.hs b/Data/Vector/Unboxed/Base.hs +index 00350cb..c13ea20 100644 +--- a/Data/Vector/Unboxed/Base.hs ++++ b/Data/Vector/Unboxed/Base.hs +@@ -31,7 +31,7 @@ import Data.Word ( Word, Word8, Word16, Word32, Word64 ) + import Data.Int ( Int8, Int16, Int32, Int64 ) + import Data.Complex + +-import Data.Typeable ( Typeable1(..), Typeable2(..), mkTyConApp, ++import Data.Typeable ( mkTyConApp, + #if MIN_VERSION_base(4,4,0) + mkTyCon3 + #else +@@ -65,19 +65,6 @@ vectorTyCon = mkTyCon3 "vector" + vectorTyCon m s = mkTyCon $ m ++ "." ++ s + #endif + +-instance Typeable1 Vector where +- typeOf1 _ = mkTyConApp (vectorTyCon "Data.Vector.Unboxed" "Vector") [] +- +-instance Typeable2 MVector where +- typeOf2 _ = mkTyConApp (vectorTyCon "Data.Vector.Unboxed.Mutable" "MVector") [] +- +-instance (Data a, Unbox a) => Data (Vector a) where +- gfoldl = G.gfoldl +- toConstr _ = error "toConstr" +- gunfold _ _ = error "gunfold" +- dataTypeOf _ = G.mkType "Data.Vector.Unboxed.Vector" +- dataCast1 = G.dataCast +- + -- ---- + -- Unit + -- ---- +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch b/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch new file mode 100644 index 000000000..7016e001c --- /dev/null +++ b/standalone/android/haskell-patches/yesod-auth_don-t-really-build.patch @@ -0,0 +1,34 @@ +From 3eb7b0a42099721dc19363ac41319efeed4ac5f9 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 05:19:53 +0000 +Subject: [PATCH] don't really build + +--- + yesod-auth.cabal | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/yesod-auth.cabal b/yesod-auth.cabal +index 591ced5..11217be 100644 +--- a/yesod-auth.cabal ++++ b/yesod-auth.cabal +@@ -52,16 +52,7 @@ library + , safe + , time + +- exposed-modules: Yesod.Auth +- Yesod.Auth.BrowserId +- Yesod.Auth.Dummy +- Yesod.Auth.Email +- Yesod.Auth.OpenId +- Yesod.Auth.Rpxnow +- Yesod.Auth.HashDB +- Yesod.Auth.Message +- Yesod.Auth.GoogleEmail +- other-modules: Yesod.Auth.Routes ++ exposed-modules: + ghc-options: -Wall + + source-repository head +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod-core_1.1.8_0001-remove-TH.patch b/standalone/android/haskell-patches/yesod-core_1.1.8_0001-remove-TH.patch deleted file mode 100644 index fd641a1aa..000000000 --- a/standalone/android/haskell-patches/yesod-core_1.1.8_0001-remove-TH.patch +++ /dev/null @@ -1,476 +0,0 @@ -From 801f6dea3be43113400e41aabb443456fffcd227 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 28 Feb 2013 23:39:40 -0400 -Subject: [PATCH 1/2] remove TH - ---- - Yesod/Core.hs | 10 ---- - Yesod/Dispatch.hs | 119 +---------------------------------------------- - Yesod/Handler.hs | 27 +---------- - Yesod/Internal/Cache.hs | 5 -- - Yesod/Internal/Core.hs | 119 +++++------------------------------------------ - Yesod/Widget.hs | 29 ------------ - 6 files changed, 13 insertions(+), 296 deletions(-) - -diff --git a/Yesod/Core.hs b/Yesod/Core.hs -index 7268d6c..ce04b7d 100644 ---- a/Yesod/Core.hs -+++ b/Yesod/Core.hs -@@ -21,16 +21,6 @@ module Yesod.Core - , unauthorizedI - -- * Logging - , LogLevel (..) -- , logDebug -- , logInfo -- , logWarn -- , logError -- , logOther -- , logDebugS -- , logInfoS -- , logWarnS -- , logErrorS -- , logOtherS - -- * Sessions - , SessionBackend (..) - , defaultClientSessionBackend -diff --git a/Yesod/Dispatch.hs b/Yesod/Dispatch.hs -index 1e19388..dd37475 100644 ---- a/Yesod/Dispatch.hs -+++ b/Yesod/Dispatch.hs -@@ -6,20 +6,9 @@ - {-# LANGUAGE MultiParamTypeClasses #-} - module Yesod.Dispatch - ( -- * Quasi-quoted routing -- parseRoutes -- , parseRoutesNoCheck -- , parseRoutesFile -- , parseRoutesFileNoCheck -- , mkYesod -- , mkYesodSub - -- ** More fine-grained -- , mkYesodData -- , mkYesodSubData -- , mkYesodDispatch -- , mkYesodSubDispatch -- , mkDispatchInstance - -- ** Path pieces -- , PathPiece (..) -+ PathPiece (..) - , PathMultiPiece (..) - , Texts - -- * Convert to WAI -@@ -52,117 +41,11 @@ import Data.Monoid (mappend) - import qualified Data.ByteString as S - import qualified Blaze.ByteString.Builder - import Network.HTTP.Types (status301) --import Yesod.Routes.TH - import Yesod.Content (chooseRep) --import Yesod.Routes.Parse - import System.Log.FastLogger (Logger) - - type Texts = [Text] - ---- | Generates URL datatype and site function for the given 'Resource's. This ---- is used for creating sites, /not/ subsites. See 'mkYesodSub' for the latter. ---- Use 'parseRoutes' to create the 'Resource's. --mkYesod :: String -- ^ name of the argument datatype -- -> [ResourceTree String] -- -> Q [Dec] --mkYesod name = fmap (uncurry (++)) . mkYesodGeneral name [] [] False -- ---- | Generates URL datatype and site function for the given 'Resource's. This ---- is used for creating subsites, /not/ sites. See 'mkYesod' for the latter. ---- Use 'parseRoutes' to create the 'Resource's. In general, a subsite is not ---- executable by itself, but instead provides functionality to ---- be embedded in other sites. --mkYesodSub :: String -- ^ name of the argument datatype -- -> Cxt -- -> [ResourceTree String] -- -> Q [Dec] --mkYesodSub name clazzes = -- fmap (uncurry (++)) . mkYesodGeneral name' rest clazzes True -- where -- (name':rest) = words name -- ---- | Sometimes, you will want to declare your routes in one file and define ---- your handlers elsewhere. For example, this is the only way to break up a ---- monolithic file into smaller parts. Use this function, paired with ---- 'mkYesodDispatch', to do just that. --mkYesodData :: String -> [ResourceTree String] -> Q [Dec] --mkYesodData name res = mkYesodDataGeneral name [] False res -- --mkYesodSubData :: String -> Cxt -> [ResourceTree String] -> Q [Dec] --mkYesodSubData name clazzes res = mkYesodDataGeneral name clazzes True res -- --mkYesodDataGeneral :: String -> Cxt -> Bool -> [ResourceTree String] -> Q [Dec] --mkYesodDataGeneral name clazzes isSub res = do -- let (name':rest) = words name -- (x, _) <- mkYesodGeneral name' rest clazzes isSub res -- let rname = mkName $ "resources" ++ name -- eres <- lift res -- let y = [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String) -- , FunD rname [Clause [] (NormalB eres) []] -- ] -- return $ x ++ y -- ---- | See 'mkYesodData'. --mkYesodDispatch :: String -> [ResourceTree String] -> Q [Dec] --mkYesodDispatch name = fmap snd . mkYesodGeneral name [] [] False -- --mkYesodSubDispatch :: String -> Cxt -> [ResourceTree String] -> Q [Dec] --mkYesodSubDispatch name clazzes = fmap snd . mkYesodGeneral name' rest clazzes True -- where (name':rest) = words name -- --mkYesodGeneral :: String -- ^ foundation type -- -> [String] -- ^ arguments for the type -- -> Cxt -- ^ the type constraints -- -> Bool -- ^ it this a subsite -- -> [ResourceTree String] -- -> Q([Dec],[Dec]) --mkYesodGeneral name args clazzes isSub resS = do -- subsite <- sub -- masterTypeSyns <- if isSub then return [] -- else sequence [handler, widget] -- renderRouteDec <- mkRenderRouteInstance subsite res -- dispatchDec <- mkDispatchInstance context sub master res -- return (renderRouteDec ++ masterTypeSyns, dispatchDec) -- where sub = foldl appT subCons subArgs -- master = if isSub then (varT $ mkName "master") else sub -- context = if isSub then cxt $ yesod : map return clazzes -- else return [] -- yesod = classP ''Yesod [master] -- handler = tySynD (mkName "Handler") [] [t| GHandler $master $master |] -- widget = tySynD (mkName "Widget") [] [t| GWidget $master $master () |] -- res = map (fmap parseType) resS -- subCons = conT $ mkName name -- subArgs = map (varT. mkName) args -- ---- | If the generation of @'YesodDispatch'@ instance require finer ---- control of the types, contexts etc. using this combinator. You will ---- hardly need this generality. However, in certain situations, like ---- when writing library/plugin for yesod, this combinator becomes ---- handy. --mkDispatchInstance :: CxtQ -- ^ The context -- -> TypeQ -- ^ The subsite type -- -> TypeQ -- ^ The master site type -- -> [ResourceTree a] -- ^ The resource -- -> DecsQ --mkDispatchInstance context sub master res = do -- logger <- newName "logger" -- let loggerE = varE logger -- loggerP = VarP logger -- yDispatch = conT ''YesodDispatch `appT` sub `appT` master -- thisDispatch = do -- Clause pat body decs <- mkDispatchClause -- [|yesodRunner $loggerE |] -- [|yesodDispatch $loggerE |] -- [|fmap chooseRep|] -- res -- return $ FunD 'yesodDispatch -- [ Clause (loggerP:pat) -- body -- decs -- ] -- in sequence [instanceD context yDispatch [thisDispatch]] -- -- - -- | Convert the given argument into a WAI application, executable with any WAI - -- handler. This is the same as 'toWaiAppPlain', except it includes two - -- middlewares: GZIP compression and autohead. This is the -diff --git a/Yesod/Handler.hs b/Yesod/Handler.hs -index 1997bdb..98c915c 100644 ---- a/Yesod/Handler.hs -+++ b/Yesod/Handler.hs -@@ -42,7 +42,6 @@ module Yesod.Handler - , RedirectUrl (..) - , redirect - , redirectWith -- , redirectToPost - -- ** Errors - , notFound - , badMethod -@@ -100,7 +99,6 @@ module Yesod.Handler - , getMessageRender - -- * Per-request caching - , CacheKey -- , mkCacheKey - , cacheLookup - , cacheInsert - , cacheDelete -@@ -172,7 +170,7 @@ import System.Log.FastLogger - import Control.Monad.Logger - - import qualified Yesod.Internal.Cache as Cache --import Yesod.Internal.Cache (mkCacheKey, CacheKey) -+import Yesod.Internal.Cache (CacheKey) - import qualified Data.IORef as I - import Control.Exception.Lifted (catch) - import Control.Monad.Trans.Control -@@ -937,29 +935,6 @@ newIdent = do - put x { ghsIdent = i' } - return $ T.pack $ 'h' : show i' - ---- | Redirect to a POST resource. ---- ---- This is not technically a redirect; instead, it returns an HTML page with a ---- POST form, and some Javascript to automatically submit the form. This can be ---- useful when you need to post a plain link somewhere that needs to cause ---- changes on the server. --redirectToPost :: RedirectUrl master url => url -> GHandler sub master a --redirectToPost url = do -- urlText <- toTextUrl url -- hamletToRepHtml [hamlet| --$newline never --$doctype 5 -- -- -- -- Redirecting... -- <body onload="document.getElementById('form').submit()"> -- <form id="form" method="post" action=#{urlText}> -- <noscript> -- <p>Javascript has been disabled; please click on the button below to be redirected. -- <input type="submit" value="Continue"> --|] >>= sendResponse -- - -- | Converts the given Hamlet template into 'Content', which can be used in a - -- Yesod 'Response'. - hamletToContent :: HtmlUrl (Route master) -> GHandler sub master Content -diff --git a/Yesod/Internal/Cache.hs b/Yesod/Internal/Cache.hs -index 4aec0d2..fdef9d7 100644 ---- a/Yesod/Internal/Cache.hs -+++ b/Yesod/Internal/Cache.hs -@@ -3,7 +3,6 @@ - module Yesod.Internal.Cache - ( Cache - , CacheKey -- , mkCacheKey - , lookup - , insert - , delete -@@ -24,10 +23,6 @@ newtype Cache = Cache (Map.IntMap Any) - - newtype CacheKey a = CacheKey Int - ---- | Generate a new 'CacheKey'. Be sure to give a full type signature. --mkCacheKey :: Q Exp --mkCacheKey = [|CacheKey|] `appE` (LitE . IntegerL . fromIntegral . hashUnique <$> runIO newUnique) -- - lookup :: CacheKey a -> Cache -> Maybe a - lookup (CacheKey i) (Cache m) = unsafeCoerce <$> Map.lookup i m - -diff --git a/Yesod/Internal/Core.hs b/Yesod/Internal/Core.hs -index c4a9796..90c05fc 100644 ---- a/Yesod/Internal/Core.hs -+++ b/Yesod/Internal/Core.hs -@@ -44,7 +44,6 @@ module Yesod.Internal.Core - - import Yesod.Content - import Yesod.Handler hiding (lift, getExpires) --import Control.Monad.Logger (logErrorS) - - import Yesod.Routes.Class - import Data.Time (UTCTime, addUTCTime, getCurrentTime) -@@ -165,22 +164,7 @@ class RenderRoute a => Yesod a where - - -- | Applies some form of layout to the contents of a page. - defaultLayout :: GWidget sub a () -> GHandler sub a RepHtml -- defaultLayout w = do -- p <- widgetToPageContent w -- mmsg <- getMessage -- hamletToRepHtml [hamlet| --$newline never --$doctype 5 -- --<html> -- <head> -- <title>#{pageTitle p} -- ^{pageHead p} -- <body> -- $maybe msg <- mmsg -- <p .message>#{msg} -- ^{pageBody p} --|] -+ defaultLayout w = error "defaultLayout not implemented" - - -- | Override the rendering function for a particular URL. One use case for - -- this is to offload static hosting to a different domain name to avoid -@@ -521,46 +505,11 @@ applyLayout' title body = fmap chooseRep $ defaultLayout $ do - - -- | The default error handler for 'errorHandler'. - defaultErrorHandler :: Yesod y => ErrorResponse -> GHandler sub y ChooseRep --defaultErrorHandler NotFound = do -- r <- waiRequest -- let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r -- applyLayout' "Not Found" -- [hamlet| --$newline never --<h1>Not Found --<p>#{path'} --|] --defaultErrorHandler (PermissionDenied msg) = -- applyLayout' "Permission Denied" -- [hamlet| --$newline never --<h1>Permission denied --<p>#{msg} --|] --defaultErrorHandler (InvalidArgs ia) = -- applyLayout' "Invalid Arguments" -- [hamlet| --$newline never --<h1>Invalid Arguments --<ul> -- $forall msg <- ia -- <li>#{msg} --|] --defaultErrorHandler (InternalError e) = do -- $logErrorS "yesod-core" e -- applyLayout' "Internal Server Error" -- [hamlet| --$newline never --<h1>Internal Server Error --<pre>#{e} --|] --defaultErrorHandler (BadMethod m) = -- applyLayout' "Bad Method" -- [hamlet| --$newline never --<h1>Method Not Supported --<p>Method <code>#{S8.unpack m}</code> not supported --|] -+defaultErrorHandler NotFound = error "Not Found" -+defaultErrorHandler (PermissionDenied msg) = error "Permission Denied" -+defaultErrorHandler (InvalidArgs ia) = error "Invalid Arguments" -+defaultErrorHandler (InternalError e) = error "Internal Server Error" -+defaultErrorHandler (BadMethod m) = error "Bad Method" - - -- | Return the same URL if the user is authorized to see it. - -- -@@ -616,45 +565,10 @@ widgetToPageContent w = do - -- modernizr should be at the end of the <head> http://www.modernizr.com/docs/#installing - -- the asynchronous loader means your page doesn't have to wait for all the js to load - let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc -- regularScriptLoad = [hamlet| --$newline never --$forall s <- scripts -- ^{mkScriptTag s} --$maybe j <- jscript -- $maybe s <- jsLoc -- <script src="#{s}"> -- $nothing -- <script>^{jelper j} --|] -- -- headAll = [hamlet| --$newline never --\^{head'} --$forall s <- stylesheets -- ^{mkLinkTag s} --$forall s <- css -- $maybe t <- right $ snd s -- $maybe media <- fst s -- <link rel=stylesheet media=#{media} href=#{t}> -- $nothing -- <link rel=stylesheet href=#{t}> -- $maybe content <- left $ snd s -- $maybe media <- fst s -- <style media=#{media}>#{content} -- $nothing -- <style>#{content} --$case jsLoader master -- $of BottomOfBody -- $of BottomOfHeadAsync asyncJsLoader -- ^{asyncJsLoader asyncScripts mcomplete} -- $of BottomOfHeadBlocking -- ^{regularScriptLoad} --|] -- let bodyScript = [hamlet| --$newline never --^{body} --^{regularScriptLoad} --|] -+ regularScriptLoad = error "TODO" -+ -+ headAll = error "TODO" -+ let bodyScript = error "TODO" - - return $ PageContent title headAll (case jsLoader master of - BottomOfBody -> bodyScript -@@ -696,18 +610,7 @@ jsonArray = unsafeLazyByteString . encode . Array . Vector.fromList . map String - - -- | For use with setting 'jsLoader' to 'BottomOfHeadAsync' - loadJsYepnope :: Yesod master => Either Text (Route master) -> [Text] -> Maybe (HtmlUrl (Route master)) -> (HtmlUrl (Route master)) --loadJsYepnope eyn scripts mcomplete = -- [hamlet| --$newline never -- $maybe yn <- left eyn -- <script src=#{yn}> -- $maybe yn <- right eyn -- <script src=@{yn}> -- $maybe complete <- mcomplete -- <script>yepnope({load:#{jsonArray scripts},complete:function(){^{complete}}}); -- $nothing -- <script>yepnope({load:#{jsonArray scripts}}); --|] -+loadJsYepnope eyn scripts mcomplete = error "TODO" - - asyncHelper :: (url -> [x] -> Text) - -> [Script (url)] -diff --git a/Yesod/Widget.hs b/Yesod/Widget.hs -index bd94bd3..bf79150 100644 ---- a/Yesod/Widget.hs -+++ b/Yesod/Widget.hs -@@ -15,8 +15,6 @@ module Yesod.Widget - GWidget - , PageContent (..) - -- * Special Hamlet quasiquoter/TH for Widgets -- , whamlet -- , whamletFile - , ihamletToRepHtml - -- * Convert to Widget - , ToWidget (..) -@@ -54,7 +52,6 @@ module Yesod.Widget - , addScriptEither - -- * Internal - , unGWidget -- , whamletFileWithSettings - ) where - - import Data.Monoid -@@ -274,32 +271,6 @@ data PageContent url = PageContent - , pageBody :: HtmlUrl url - } - --whamlet :: QuasiQuoter --whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings -- --whamletFile :: FilePath -> Q Exp --whamletFile = NP.hamletFileWithSettings rules NP.defaultHamletSettings -- --whamletFileWithSettings :: NP.HamletSettings -> FilePath -> Q Exp --whamletFileWithSettings = NP.hamletFileWithSettings rules -- --rules :: Q NP.HamletRules --rules = do -- ah <- [|toWidget|] -- let helper qg f = do -- x <- newName "urender" -- e <- f $ VarE x -- let e' = LamE [VarP x] e -- g <- qg -- bind <- [|(>>=)|] -- return $ InfixE (Just g) bind (Just e') -- let ur f = do -- let env = NP.Env -- (Just $ helper [|liftW getUrlRenderParams|]) -- (Just $ helper [|liftM (toHtml .) $ liftW getMessageRender|]) -- f env -- return $ NP.HamletRules ah ur $ \_ b -> return $ ah `AppE` b -- - -- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'. - ihamletToRepHtml :: RenderMessage master message - => HtmlUrlI18n message (Route master) --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/yesod-core_1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch b/standalone/android/haskell-patches/yesod-core_1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch deleted file mode 100644 index af0b3d15b..000000000 --- a/standalone/android/haskell-patches/yesod-core_1.1.8_0002-replaced-TH-in-Yesod.Internal.Core.patch +++ /dev/null @@ -1,267 +0,0 @@ -From 9ae3db0b3292b53715232fecec3c5e2bf03b89cd Mon Sep 17 00:00:00 2001 -From: Joey Hess <joey@kitenet.net> -Date: Fri, 1 Mar 2013 01:02:53 -0400 -Subject: [PATCH 2/2] replaced TH in Yesod.Internal.Core - -Done by running a build with -ddump-splices and manually pasting in the -spliced code, and then modifying it until it compiles. - -(This predated the Evil Splicer, and both this and the previous patch need -to be redone to use it.) ---- - Yesod/Internal/Core.hs | 211 +++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 201 insertions(+), 10 deletions(-) - -diff --git a/Yesod/Internal/Core.hs b/Yesod/Internal/Core.hs -index 90c05fc..b9a0ae8 100644 ---- a/Yesod/Internal/Core.hs -+++ b/Yesod/Internal/Core.hs -@@ -96,6 +96,9 @@ import System.Log.FastLogger (Logger, mkLogger, loggerDate, LogStr (..), loggerP - import Control.Monad.Logger (LogLevel (LevelInfo, LevelOther), LogSource) - import System.Log.FastLogger.Date (ZonedDate) - import System.IO (stdout) -+import qualified Data.Foldable -+import qualified Text.Blaze.Internal -+import qualified Text.Hamlet - - yesodVersion :: String - yesodVersion = showVersion Paths_yesod_core.version -@@ -164,7 +167,28 @@ class RenderRoute a => Yesod a where - - -- | Applies some form of layout to the contents of a page. - defaultLayout :: GWidget sub a () -> GHandler sub a RepHtml -- defaultLayout w = error "defaultLayout not implemented" -+ defaultLayout w = do -+ p <- widgetToPageContent w -+ mmsg <- getMessage -+ hamletToRepHtml $ \ _render_ay88 -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "<!DOCTYPE html>\n<html><head><title>"); -+ id (TBH.toHtml (pageTitle p)); -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) ""); -+ id (pageHead p) _render_ay88; -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) ""); -+ Text.Hamlet.maybeH -+ mmsg -+ (\ msg_ay89 -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

"); -+ id (TBH.toHtml msg_ay89); -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") }) -+ Nothing; -+ id (pageBody p) _render_ay88; -+ id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) "") } - - -- | Override the rendering function for a particular URL. One use case for - -- this is to offload static hosting to a different domain name to avoid -@@ -505,11 +529,45 @@ applyLayout' title body = fmap chooseRep $ defaultLayout $ do - - -- | The default error handler for 'errorHandler'. - defaultErrorHandler :: Yesod y => ErrorResponse -> GHandler sub y ChooseRep --defaultErrorHandler NotFound = error "Not Found" --defaultErrorHandler (PermissionDenied msg) = error "Permission Denied" --defaultErrorHandler (InvalidArgs ia) = error "Invalid Arguments" --defaultErrorHandler (InternalError e) = error "Internal Server Error" --defaultErrorHandler (BadMethod m) = error "Bad Method" -+defaultErrorHandler NotFound = do -+ r <- waiRequest -+ let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r -+ applyLayout' "Not Found" $ \ _render_ayac -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

Not Found

"); -+ id (TBH.toHtml path'); -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") } -+defaultErrorHandler (PermissionDenied msg) = -+ applyLayout' "Permission Denied" $ \ _render_ayah -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

Permission denied

"); -+ id (TBH.toHtml msg); -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") } -+defaultErrorHandler (InvalidArgs ia) = -+ applyLayout' "Invalid Arguments" $ \ _render_ayam -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

Invalid Arguments

    "); -+ Data.Foldable.mapM_ -+ (\ msg_ayan -+ -> do { id ((Text.Blaze.Internal.preEscapedText . T.pack) "
  • "); -+ id (TBH.toHtml msg_ayan); -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "
  • ") }) -+ ia; -+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") } -+defaultErrorHandler (InternalError e) = do -+ applyLayout' "Internal Server Error" $ \ _render_ayau -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

Internal Server Error

");
-+              id (TBH.toHtml e);
-+              id ((Text.Blaze.Internal.preEscapedText . T.pack) "
") } -+defaultErrorHandler (BadMethod m) = -+ applyLayout' "Bad Method" $ \ _render_ayaz -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "

Method Not Supported

Method "); -+ id (TBH.toHtml (S8.unpack m)); -+ id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ " not supported

") } - - -- | Return the same URL if the user is authorized to see it. - -- -@@ -565,10 +623,99 @@ widgetToPageContent w = do - -- modernizr should be at the end of the http://www.modernizr.com/docs/#installing - -- the asynchronous loader means your page doesn't have to wait for all the js to load - let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc -- regularScriptLoad = error "TODO" -- -- headAll = error "TODO" -- let bodyScript = error "TODO" -+ regularScriptLoad = \ _render_aybs -> do { Data.Foldable.mapM_ -+ (\ s_aybt -+ -> id (mkScriptTag s_aybt) _render_aybs) -+ scripts; -+ Text.Hamlet.maybeH -+ jscript -+ (\ j_aybu -+ -> Text.Hamlet.maybeH -+ jsLoc -+ (\ s_aybv -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }) -+ (Just -+ (do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) "") }))) -+ Nothing } -+ -+ headAll = \ _render_aybz -> do -+ { id head' _render_aybz; -+ Data.Foldable.mapM_ -+ (\ s_aybA -> id (mkLinkTag s_aybA) _render_aybz) -+ stylesheets; -+ Data.Foldable.mapM_ -+ (\ s_aybB -+ -> do { Text.Hamlet.maybeH -+ (right (snd s_aybB)) -+ (\ t_aybC -+ -> Text.Hamlet.maybeH -+ (fst s_aybB) -+ (\ media_aybD -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }) -+ (Just -+ (do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }))) -+ Nothing; -+ Text.Hamlet.maybeH -+ (left (snd s_aybB)) -+ (\ content_aybE -+ -> Text.Hamlet.maybeH -+ (fst s_aybB) -+ (\ media_aybF -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }) -+ (Just -+ (do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }))) -+ Nothing }) -+ css; -+ case jsLoader master of -+ BottomOfBody -> return () -+ BottomOfHeadAsync asyncJsLoader -> id (asyncJsLoader asyncScripts mcomplete) _render_aybz -+ BottomOfHeadBlocking -> id regularScriptLoad _render_aybz -+ } -+ -+ let bodyScript = \ _render_aybL -> do { -+ id body _render_aybL; -+ id regularScriptLoad _render_aybL } - - return $ PageContent title headAll (case jsLoader master of - BottomOfBody -> bodyScript -@@ -611,6 +758,50 @@ jsonArray = unsafeLazyByteString . encode . Array . Vector.fromList . map String - -- | For use with setting 'jsLoader' to 'BottomOfHeadAsync' - loadJsYepnope :: Yesod master => Either Text (Route master) -> [Text] -> Maybe (HtmlUrl (Route master)) -> (HtmlUrl (Route master)) - loadJsYepnope eyn scripts mcomplete = error "TODO" -+{- -+ \ _render_aybU -+ -> do { Text.Hamlet.maybeH -+ (left eyn) -+ (\ yn_aybV -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) "") }) -+ Nothing; -+ Text.Hamlet.maybeH -+ (right eyn) -+ (\ yn_aybW -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) "") }) -+ Nothing; -+ Text.Hamlet.maybeH -+ mcomplete -+ (\ complete_aybY -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") }) -+ (Just -+ (do { id -+ ((Text.Blaze.Internal.preEscapedText . T.pack) -+ "") })) } -+-} - - asyncHelper :: (url -> [x] -> Text) - -> [Script (url)] --- -1.7.10.4 - diff --git a/standalone/android/haskell-patches/yesod-core_1.1.8_0003-exports-for-TH-splices.patch b/standalone/android/haskell-patches/yesod-core_1.1.8_0003-exports-for-TH-splices.patch deleted file mode 100644 index 440b57ac8..000000000 --- a/standalone/android/haskell-patches/yesod-core_1.1.8_0003-exports-for-TH-splices.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b7e01a2fded6575678db234e1f2de1f104f11376 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Mon, 15 Apr 2013 15:25:07 -0400 -Subject: [PATCH 3/3] exports for TH splices - ---- - Yesod/Widget.hs | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/Yesod/Widget.hs b/Yesod/Widget.hs -index bf79150..01ae294 100644 ---- a/Yesod/Widget.hs -+++ b/Yesod/Widget.hs -@@ -52,6 +52,9 @@ module Yesod.Widget - , addScriptEither - -- * Internal - , unGWidget -+ -+ -- used by TH code -+ , liftW - ) where - - import Data.Monoid --- -1.8.2.rc3 - diff --git a/standalone/android/haskell-patches/yesod-core_expand_TH.patch b/standalone/android/haskell-patches/yesod-core_expand_TH.patch new file mode 100644 index 000000000..9ea21f625 --- /dev/null +++ b/standalone/android/haskell-patches/yesod-core_expand_TH.patch @@ -0,0 +1,427 @@ +From 9e15d4af1f53c76a402ec1782e0306a4bee7eec7 Mon Sep 17 00:00:00 2001 +From: foo +Date: Sun, 22 Sep 2013 04:03:56 +0000 +Subject: [PATCH] expad TH + +used EvilSplicer +Has to remove some logger TH splices which didn't come out. +--- + Yesod/Core.hs | 2 - + Yesod/Core/Class/Yesod.hs | 247 ++++++++++++++++++++++++++++++-------------- + Yesod/Core/Dispatch.hs | 7 -- + Yesod/Core/Handler.hs | 24 ++--- + Yesod/Core/Internal/Run.hs | 2 - + Yesod/Core/Widget.hs | 2 + + 6 files changed, 181 insertions(+), 103 deletions(-) + +diff --git a/Yesod/Core.hs b/Yesod/Core.hs +index 12e59d5..f1ff21c 100644 +--- a/Yesod/Core.hs ++++ b/Yesod/Core.hs +@@ -94,8 +94,6 @@ module Yesod.Core + , JavascriptUrl + , renderJavascriptUrl + -- ** Cassius/Lucius +- , cassius +- , lucius + , CssUrl + , renderCssUrl + ) where +diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs +index cf02a1a..3f1e88e 100644 +--- a/Yesod/Core/Class/Yesod.hs ++++ b/Yesod/Core/Class/Yesod.hs +@@ -9,6 +9,10 @@ import Yesod.Core.Content + import Yesod.Core.Handler + + import Yesod.Routes.Class ++import qualified Text.Blaze.Internal ++import qualified Control.Monad.Logger ++import qualified Text.Hamlet ++import qualified Data.Foldable + + import Blaze.ByteString.Builder (Builder) + import Blaze.ByteString.Builder.Char.Utf8 (fromText) +@@ -87,18 +91,27 @@ class RenderRoute site => Yesod site where + defaultLayout w = do + p <- widgetToPageContent w + mmsg <- getMessage +- giveUrlRenderer [hamlet| +- $newline never +- $doctype 5 +- +- +- #{pageTitle p} +- ^{pageHead p} +- <body> +- $maybe msg <- mmsg +- <p .message>#{msg} +- ^{pageBody p} +- |] ++ giveUrlRenderer $ \ _render_aHra ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "<!DOCTYPE html>\n<html><head><title>"); ++ id (TBH.toHtml (pageTitle p)); ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) ""); ++ Text.Hamlet.asHtmlUrl (pageHead p) _render_aHra; ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) ""); ++ Text.Hamlet.maybeH ++ mmsg ++ (\ msg_aHrb ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

"); ++ id (TBH.toHtml msg_aHrb); ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") }) ++ Nothing; ++ Text.Hamlet.asHtmlUrl (pageBody p) _render_aHra; ++ id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) "") } ++ + + -- | Override the rendering function for a particular URL. One use case for + -- this is to offload static hosting to a different domain name to avoid +@@ -356,45 +369,103 @@ widgetToPageContent w = do + -- modernizr should be at the end of the http://www.modernizr.com/docs/#installing + -- the asynchronous loader means your page doesn't have to wait for all the js to load + let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc +- regularScriptLoad = [hamlet| +- $newline never +- $forall s <- scripts +- ^{mkScriptTag s} +- $maybe j <- jscript +- $maybe s <- jsLoc +- ") }) ++ (Just ++ (do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) "") }))) ++ Nothing } ++ ++ ++ headAll = \ _render_aHsW ++ -> do { Text.Hamlet.asHtmlUrl head' _render_aHsW; ++ Data.Foldable.mapM_ ++ (\ s_aHsX -> Text.Hamlet.asHtmlUrl (mkLinkTag s_aHsX) _render_aHsW) ++ stylesheets; ++ Data.Foldable.mapM_ ++ (\ s_aHsY ++ -> do { Text.Hamlet.maybeH ++ (right (snd s_aHsY)) ++ (\ t_aHsZ ++ -> Text.Hamlet.maybeH ++ (fst s_aHsY) ++ (\ media_aHt0 ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "") }) ++ (Just ++ (do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "") }))) ++ Nothing; ++ Text.Hamlet.maybeH ++ (left (snd s_aHsY)) ++ (\ content_aHt1 ++ -> Text.Hamlet.maybeH ++ (fst s_aHsY) ++ (\ media_aHt2 ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "") }) ++ (Just ++ (do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "") }))) ++ Nothing }) ++ css; ++ case jsLoader master of { ++ BottomOfBody -> return () ++ ; BottomOfHeadAsync asyncJsLoader_aHt3 ++ -> Text.Hamlet.asHtmlUrl ++ (asyncJsLoader_aHt3 asyncScripts mcomplete) _render_aHsW ++ ; BottomOfHeadBlocking ++ -> Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHsW } } ++ ++ let bodyScript = \ _render_aHt8 -> do { Text.Hamlet.asHtmlUrl body _render_aHt8; ++ Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHt8 } ++ + + return $ PageContent title headAll $ + case jsLoader master of +@@ -424,10 +495,13 @@ defaultErrorHandler NotFound = selectRep $ do + r <- waiRequest + let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r + setTitle "Not Found" +- toWidget [hamlet| +-

Not Found +-

#{path'} +- |] ++ toWidget $ \ _render_aHte ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

Not Found

\n

"); ++ id (TBH.toHtml path'); ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") } ++ + provideRep $ return $ object ["message" .= ("Not Found" :: Text)] + + -- For API requests. +@@ -437,10 +511,11 @@ defaultErrorHandler NotFound = selectRep $ do + defaultErrorHandler NotAuthenticated = selectRep $ do + provideRep $ defaultLayout $ do + setTitle "Not logged in" +- toWidget [hamlet| +-

Not logged in +-

Set the authRoute and the user will be redirected there. +- |] ++ toWidget $ \ _render_aHti ++ -> id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

Not logged in

\n

Set the authRoute and the user will be redirected there.

") ++ + + provideRep $ do + -- 401 *MUST* include a WWW-Authenticate header +@@ -462,10 +537,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do + defaultErrorHandler (PermissionDenied msg) = selectRep $ do + provideRep $ defaultLayout $ do + setTitle "Permission Denied" +- toWidget [hamlet| +-

Permission denied +-

#{msg} +- |] ++ toWidget $ \ _render_aHtq ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

Permission denied

\n

"); ++ id (TBH.toHtml msg); ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) "

") } ++ + provideRep $ + return $ object $ [ + "message" .= ("Permission Denied. " <> msg) +@@ -474,30 +552,43 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do + defaultErrorHandler (InvalidArgs ia) = selectRep $ do + provideRep $ defaultLayout $ do + setTitle "Invalid Arguments" +- toWidget [hamlet| +-

Invalid Arguments +-
    +- $forall msg <- ia +-
  • #{msg} +- |] ++ toWidget $ \ _render_aHtv ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

    Invalid Arguments

    \n
      "); ++ Data.Foldable.mapM_ ++ (\ msg_aHtw ++ -> do { id ((Text.Blaze.Internal.preEscapedText . T.pack) "
    • "); ++ id (TBH.toHtml msg_aHtw); ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) "
    • ") }) ++ ia; ++ id ((Text.Blaze.Internal.preEscapedText . T.pack) "
    ") } ++ + provideRep $ return $ object ["message" .= ("Invalid Arguments" :: Text), "errors" .= ia] + defaultErrorHandler (InternalError e) = do +- $logErrorS "yesod-core" e + selectRep $ do + provideRep $ defaultLayout $ do + setTitle "Internal Server Error" +- toWidget [hamlet| +-

    Internal Server Error +-
    #{e}
    +-            |]
    ++            toWidget  $             \ _render_aHtC
    ++              -> do { id
    ++                        ((Text.Blaze.Internal.preEscapedText . T.pack)
    ++                           "

    Internal Server Error

    \n
    ");
    ++                      id (TBH.toHtml e);
    ++                      id ((Text.Blaze.Internal.preEscapedText . T.pack) "
    ") } ++ + provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e] + defaultErrorHandler (BadMethod m) = selectRep $ do + provideRep $ defaultLayout $ do + setTitle"Bad Method" +- toWidget [hamlet| +-

    Method Not Supported +-

    Method #{S8.unpack m} not supported +- |] ++ toWidget $ \ _render_aHtH ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "

    Method Not Supported

    \n

    Method "); ++ id (TBH.toHtml (S8.unpack m)); ++ id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ " not supported

    ") } ++ + provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= m] + + asyncHelper :: (url -> [x] -> Text) +diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs +index 335a15c..4ca05da 100644 +--- a/Yesod/Core/Dispatch.hs ++++ b/Yesod/Core/Dispatch.hs +@@ -123,13 +123,6 @@ toWaiApp site = do + , yreSite = site + , yreSessionBackend = sb + } +- messageLoggerSource +- site +- logger +- $(qLocation >>= liftLoc) +- "yesod-core" +- LevelInfo +- (toLogStr ("Application launched" :: S.ByteString)) + middleware <- mkDefaultMiddlewares logger + return $ middleware $ toWaiAppYre yre + +diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs +index f3b1799..d819b04 100644 +--- a/Yesod/Core/Handler.hs ++++ b/Yesod/Core/Handler.hs +@@ -152,7 +152,7 @@ import qualified Control.Monad.Trans.Writer as Writer + + import Control.Monad.IO.Class (MonadIO, liftIO) + import Control.Monad.Trans.Resource (MonadResource, liftResourceT) +- ++import qualified Text.Blaze.Internal + import qualified Network.HTTP.Types as H + import qualified Network.Wai as W + import Control.Monad.Trans.Class (lift) +@@ -710,19 +710,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) + -> m a + redirectToPost url = do + urlText <- toTextUrl url +- giveUrlRenderer [hamlet| +-$newline never +-$doctype 5 +- +- +- +- Redirecting... +- <body onload="document.getElementById('form').submit()"> +- <form id="form" method="post" action=#{urlText}> +- <noscript> +- <p>Javascript has been disabled; please click on the button below to be redirected. +- <input type="submit" value="Continue"> +-|] >>= sendResponse ++ giveUrlRenderer $ \ _render_awps ++ -> do { id ++ ((Text.Blaze.Internal.preEscapedText . T.pack) ++ "<!DOCTYPE html>\n<html><head><title>Redirecting...
    ") } ++ >>= sendResponse + + -- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'. + hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html +diff --git a/Yesod/Core/Internal/Run.hs b/Yesod/Core/Internal/Run.hs +index 35f1d3f..8b92e99 100644 +--- a/Yesod/Core/Internal/Run.hs ++++ b/Yesod/Core/Internal/Run.hs +@@ -122,8 +122,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) + -> ErrorResponse + -> YesodApp + safeEh log' er req = do +- liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError +- $ toLogStr $ "Error handler errored out: " ++ show er + return $ YRPlain + H.status500 + [] +diff --git a/Yesod/Core/Widget.hs b/Yesod/Core/Widget.hs +index be97764..874f018 100644 +--- a/Yesod/Core/Widget.hs ++++ b/Yesod/Core/Widget.hs +@@ -47,6 +47,8 @@ module Yesod.Core.Widget + , handlerToWidget + -- * Internal + , whamletFileWithSettings ++ -- used by TH ++ , asWidgetT + ) where + + import Data.Monoid +-- +1.7.10.4 + diff --git a/standalone/android/haskell-patches/yesod-form_1.2.1.1-0001-prepare-for-Evil-Splicer.patch b/standalone/android/haskell-patches/yesod-form_1.2.1.1-0001-prepare-for-Evil-Splicer.patch deleted file mode 100644 index c24055b1f..000000000 --- a/standalone/android/haskell-patches/yesod-form_1.2.1.1-0001-prepare-for-Evil-Splicer.patch +++ /dev/null @@ -1,83 +0,0 @@ -From a603bac40f0a0f6232fbfb056a778860270101de Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Mon, 15 Apr 2013 15:59:56 -0400 -Subject: [PATCH 1/2] prepare for Evil Splicer - ---- - Yesod/Form/Functions.hs | 3 +-- - evilsplicer-headers.hs | 9 +++++++++ - yesod-form.cabal | 5 +++-- - 3 files changed, 13 insertions(+), 4 deletions(-) - create mode 100644 evilsplicer-headers.hs - -diff --git a/Yesod/Form/Functions.hs b/Yesod/Form/Functions.hs -index db3e493..89eb1e8 100644 ---- a/Yesod/Form/Functions.hs -+++ b/Yesod/Form/Functions.hs -@@ -54,10 +54,9 @@ import Text.Blaze (Markup, toMarkup) - #define toHtml toMarkup - import Yesod.Handler (GHandler, getRequest, runRequestBody, newIdent, getYesod) - import Yesod.Core (RenderMessage, SomeMessage (..)) --import Yesod.Widget (GWidget, whamlet) -+import Yesod.Widget (GWidget) - import Yesod.Request (reqToken, reqWaiRequest, reqGetParams, languages) - import Network.Wai (requestMethod) --import Text.Hamlet (shamlet) - import Data.Monoid (mempty) - import Data.Maybe (listToMaybe, fromMaybe) - import Yesod.Message (RenderMessage (..)) -diff --git a/evilsplicer-headers.hs b/evilsplicer-headers.hs -new file mode 100644 -index 0000000..865d043 ---- /dev/null -+++ b/evilsplicer-headers.hs -@@ -0,0 +1,9 @@ -+import qualified Data.Text.Lazy.Builder -+import qualified Text.Shakespeare -+import qualified Text.Hamlet -+import qualified Data.Monoid -+import qualified Text.Julius -+import qualified "blaze-markup" Text.Blaze.Internal -+import qualified "blaze-markup" Text.Blaze as Text.Blaze.Markup -+import qualified Yesod.Widget -+import qualified Data.Foldable -diff --git a/yesod-form.cabal b/yesod-form.cabal -index a0d2a80..ae99ddc 100644 ---- a/yesod-form.cabal -+++ b/yesod-form.cabal -@@ -18,7 +18,7 @@ library - , yesod-persistent >= 1.1 && < 1.2 - , time >= 1.1.4 - , hamlet >= 1.1 && < 1.2 -- , shakespeare-css >= 1.0 && < 1.1 -+ , shakespeare-css == 1.0.2 - , shakespeare-js >= 1.0.2 && < 1.2 - , persistent >= 1.0 && < 1.2 - , template-haskell -@@ -37,6 +37,7 @@ library - , attoparsec >= 0.10 && < 0.11 - , crypto-api >= 0.8 && < 0.11 - , aeson -+ , shakespeare - - exposed-modules: Yesod.Form - Yesod.Form.Class -@@ -45,7 +46,6 @@ library - Yesod.Form.Input - Yesod.Form.Fields - Yesod.Form.Jquery -- Yesod.Form.Nic - Yesod.Form.MassInput - Yesod.Form.I18n.English - Yesod.Form.I18n.Portuguese -@@ -56,6 +56,7 @@ library - Yesod.Form.I18n.Japanese - -- FIXME Yesod.Helpers.Crud - ghc-options: -Wall -+ Extensions: PackageImports - - test-suite test - type: exitcode-stdio-1.0 --- -1.8.2.rc3 - diff --git a/standalone/android/haskell-patches/yesod-form_1.2.1.1-0002-expand-TH.patch b/standalone/android/haskell-patches/yesod-form_1.2.1.1-0002-expand-TH.patch deleted file mode 100644 index 3ce48e5fc..000000000 --- a/standalone/android/haskell-patches/yesod-form_1.2.1.1-0002-expand-TH.patch +++ /dev/null @@ -1,1606 +0,0 @@ -From f98c22ec71695537e0e008a0bd54affdf8a60f64 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Mon, 15 Apr 2013 17:35:57 -0400 -Subject: [PATCH 2/2] expand TH - -Used the EvilSplicer, and then some manual fixups, as it is apparently -buggy. Also a few module import fixes. ---- - Yesod/Form/Fields.hs | 623 ++++++++++++++++++++++++++++++++++++++---------- - Yesod/Form/Functions.hs | 240 +++++++++++++++---- - Yesod/Form/Jquery.hs | 141 ++++++++--- - Yesod/Form/MassInput.hs | 228 ++++++++++++++---- - Yesod/Form/Nic.hs | 59 ++++- - 5 files changed, 1042 insertions(+), 249 deletions(-) - -diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs -index 7917ce2..db76ea2 100644 ---- a/Yesod/Form/Fields.hs -+++ b/Yesod/Form/Fields.hs -@@ -46,11 +46,22 @@ module Yesod.Form.Fields - , optionsEnum - ) where - -+import qualified Data.Text.Lazy.Builder -+import qualified Text.Shakespeare -+import qualified Data.Monoid -+import qualified Text.Julius -+import qualified "blaze-markup" Text.Blaze.Internal -+import qualified "blaze-markup" Text.Blaze as Text.Blaze.Internal -+import qualified "blaze-html" Text.Blaze.Html -+import qualified Yesod.Widget -+import qualified Text.Css -+import qualified Control.Monad -+import qualified Data.Foldable - import Yesod.Form.Types - import Yesod.Form.I18n.English - import Yesod.Form.Functions (parseHelper) - import Yesod.Handler (getMessageRender) --import Yesod.Widget (toWidget, whamlet, GWidget) -+import Yesod.Widget (toWidget, GWidget) - import Yesod.Message (RenderMessage (renderMessage), SomeMessage (..)) - import Text.Hamlet - import Text.Blaze (ToMarkup (toMarkup), preEscapedToMarkup, unsafeByteString) -@@ -108,10 +119,24 @@ intField = Field - Right (a, "") -> Right a - _ -> Left $ MsgInvalidInteger s - -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amMY -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - where -@@ -125,10 +150,24 @@ doubleField = Field - Right (a, "") -> Right a - _ -> Left $ MsgInvalidNumber s - -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNa -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - where showVal = either id (pack . show) -@@ -136,10 +175,24 @@ $newline never - dayField :: RenderMessage master FormMessage => Field sub master Day - dayField = Field - { fieldParse = parseHelper $ parseDate . unpack -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNk -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - where showVal = either id (pack . show) -@@ -147,10 +200,23 @@ $newline never - timeField :: RenderMessage master FormMessage => Field sub master TimeOfDay - timeField = Field - { fieldParse = parseHelper parseTime -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amNx -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - where -@@ -163,10 +229,18 @@ $newline never - htmlField :: RenderMessage master FormMessage => Field sub master Html - htmlField = Field - { fieldParse = parseHelper $ Right . preEscapedText . sanitizeBalance -- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| --$newline never --") } -+ - , fieldEnctype = UrlEncoded - } - where showVal = either id (pack . renderHtml) -@@ -192,10 +266,18 @@ instance ToHtml Textarea where - textareaField :: RenderMessage master FormMessage => Field sub master Textarea - textareaField = Field - { fieldParse = parseHelper $ Right . Textarea -- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| --$newline never --") } -+ - , fieldEnctype = UrlEncoded - } - -@@ -203,10 +285,19 @@ hiddenField :: (PathPiece p, RenderMessage master FormMessage) - => Field sub master p - hiddenField = Field - { fieldParse = parseHelper $ maybe (Left MsgValueRequired) Right . fromPathPiece -- , fieldView = \theId name attrs val _isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val _isReq -> toWidget $ \ _render_amNZ -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) -+ "") } -+ - , fieldEnctype = UrlEncoded - } - -@@ -214,20 +305,50 @@ textField :: RenderMessage master FormMessage => Field sub master Text - textField = Field - { fieldParse = parseHelper $ Right - , fieldView = \theId name attrs val isReq -> -- [whamlet| --$newline never -- --|] -+ do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - - passwordField :: RenderMessage master FormMessage => Field sub master Text - passwordField = Field - { fieldParse = parseHelper $ Right -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amOg -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - -@@ -305,10 +426,24 @@ emailField = Field - then Right s - else Left $ MsgInvalidEmail s - #endif -- , fieldView = \theId name attrs val isReq -> toWidget [hamlet| --$newline never -- --|] -+ , fieldView = \theId name attrs val isReq -> toWidget $ \ _render_amOO -+ -> do { id -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - -@@ -317,20 +452,60 @@ searchField :: RenderMessage master FormMessage => AutoFocus -> Field sub master - searchField autoFocus = Field - { fieldParse = parseHelper Right - , fieldView = \theId name attrs val isReq -> do -- [whamlet|\ --$newline never -- --|] -+ do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - when autoFocus $ do - -- we want this javascript to be placed immediately after the field -- [whamlet| --$newline never --") } -+ -+ toWidget $ \ _render_amP5 -+ -> (Text.Css.CssNoWhitespace -+ . (foldr ($) [])) -+ [((++) -+ $ (map -+ Text.Css.Css -+ ((((:) -+ (Text.Css.Css' -+ (Data.Monoid.mconcat [toCss theId]) -+ [(Data.Monoid.mconcat -+ [(Text.Css.fromText -+ . Text.Css.pack) -+ "-webkit-appearance"], -+ Data.Monoid.mconcat -+ [(Text.Css.fromText -+ . Text.Css.pack) -+ "textfield"])])) -+ . (foldr (.) id [])) -+ [])))] -+ - , fieldEnctype = UrlEncoded - } - -@@ -341,10 +516,25 @@ urlField = Field - Nothing -> Left $ MsgInvalidUrl s - Just _ -> Right s - , fieldView = \theId name attrs val isReq -> -- [whamlet| --$newline never -- --|] -+ do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - , fieldEnctype = UrlEncoded - } - -@@ -353,18 +543,48 @@ selectFieldList = selectField . optionsPairs - - selectField :: (Eq a, RenderMessage master FormMessage) => GHandler sub master (OptionList a) -> Field sub master a - selectField = selectFieldHelper -- (\theId name attrs inside -> [whamlet| --$newline never --"); -+ toWidget inside; -+ toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") }) -+ -- outside -+ (\_theId _name isSel -> do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) -+ "") }) -+ -- onOpt -+ (\_theId _name _attrs value isSel text -> do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") }) -+ -- inside - - multiSelectFieldList :: (Eq a, RenderMessage master FormMessage, RenderMessage master msg) => [(msg, a)] -> Field sub master [a] - multiSelectFieldList = multiSelectField . optionsPairs -@@ -385,12 +605,40 @@ multiSelectField ioptlist = - view theId name attrs val isReq = do - opts <- fmap olOptions $ lift ioptlist - let selOpts = map (id &&& (optselected val)) opts -- [whamlet| --$newline never -- "); -+ Data.Foldable.mapM_ -+ (\ (opt_amPV, optsel_amPW) -+ -> do { toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") }) -+ selOpts; -+ toWidget -+ ((Text.Blaze.Internal.preEscapedText . pack) "") } -+ - where - optselected (Left _) _ = False - optselected (Right vals) opt = (optionInternalValue opt) `elem` vals -@@ -400,41 +648,140 @@ radioFieldList = radioField . optionsPairs - - radioField :: (Eq a, RenderMessage master FormMessage) => GHandler sub master (OptionList a) -> Field sub master a - radioField = selectFieldHelper -- (\theId _name _attrs inside -> [whamlet| --$newline never --
    ^{inside} --|]) -- (\theId name isSel -> [whamlet| --$newline never --