Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-threepenny-gui for openSUSE:Factory checked in at 2023-01-18 13:10:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-threepenny-gui (Old) and /work/SRC/openSUSE:Factory/.ghc-threepenny-gui.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-threepenny-gui" Wed Jan 18 13:10:48 2023 rev:9 rq:1059120 version:0.9.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-threepenny-gui/ghc-threepenny-gui.changes 2022-10-13 15:43:36.854909992 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-threepenny-gui.new.32243/ghc-threepenny-gui.changes 2023-01-18 13:11:13.968946931 +0100 @@ -1,0 +2,17 @@ +Sun Dec 11 12:32:51 UTC 2022 - Peter Simons <psim...@suse.com> + +- Update threepenny-gui to version 0.9.4.0. + **0.9.4.0** â Maintenance and snapshot release + + * Fix support for SSL: Export `ConfigSSL` constructor. + +------------------------------------------------------------------- +Sat Dec 3 13:31:01 UTC 2022 - Peter Simons <psim...@suse.com> + +- Update threepenny-gui to version 0.9.2.0. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/threepenny-gui-0.9.2.0/src/CHANGELOG.md + +------------------------------------------------------------------- Old: ---- threepenny-gui-0.9.1.0.tar.gz threepenny-gui.cabal New: ---- threepenny-gui-0.9.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-threepenny-gui.spec ++++++ --- /var/tmp/diff_new_pack.fg3DK4/_old 2023-01-18 13:11:15.252951906 +0100 +++ /var/tmp/diff_new_pack.fg3DK4/_new 2023-01-18 13:11:15.260951937 +0100 @@ -18,13 +18,12 @@ %global pkg_name threepenny-gui Name: ghc-%{pkg_name} -Version: 0.9.1.0 +Version: 0.9.4.0 Release: 0 Summary: GUI framework that uses the web browser as a display License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/7.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-async-devel @@ -81,7 +80,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ threepenny-gui-0.9.1.0.tar.gz -> threepenny-gui-0.9.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/CHANGELOG.md new/threepenny-gui-0.9.4.0/CHANGELOG.md --- old/threepenny-gui-0.9.1.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,9 +1,22 @@ ## Changelog for the `threepenny-gui` package +**0.9.4.0** â Maintenance and snapshot release + +* Fix support for SSL: Export `ConfigSSL` constructor. + +**0.9.2.0** â Maintenance and snapshot release + +* Add support for SSL. + + To start the server as an HTTPS server, use the `jsUseSSL` field with appropriate parameters. For security reasons, no information is read from the environment in this case. + +* Bump dependencies for compatibility with GHC-9.4. +* Bump dependencies for compatibility with GHC-9.2. + **0.9.1.0** â Maintenance and snapshot release * Add support for websockets over SSL. -* Bump dependencies for compatibility with GHC 9.0. +* Bump dependencies for compatibility with GHC-9.0. **0.9.0.0** â Maintenance and snapshot release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/README.md new/threepenny-gui-0.9.4.0/README.md --- old/threepenny-gui-0.9.1.0/README.md 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,3 @@ -[![Travis Build Status](https://travis-ci.org/HeinrichApfelmus/threepenny-gui.svg)](https://travis-ci.org/HeinrichApfelmus/threepenny-gui) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/HeinrichApfelmus/threepenny-gui?svg=true)](https://ci.appveyor.com/project/HeinrichApfelmus/threepenny-gui) [![Hackage](https://img.shields.io/hackage/v/threepenny-gui.svg)](https://hackage.haskell.org/package/threepenny-gui) [![Stackage LTS](http://stackage.org/package/threepenny-gui/badge/lts)](http://stackage.org/lts/package/threepenny-gui) @@ -10,7 +9,7 @@ Threepenny is a GUI framework written in Haskell that uses the web browser as a display. It's very easy to install. See the - [**Project homepage**](http://wiki.haskell.org/Threepenny-gui) + [**Project homepage**](https://heinrichapfelmus.github.io/threepenny-gui/) for more information on what it does and can do for you as a library user. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/samples/Paths.hs new/threepenny-gui-0.9.4.0/samples/Paths.hs --- old/threepenny-gui-0.9.1.0/samples/Paths.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/samples/Paths.hs 2001-09-09 03:46:40.000000000 +0200 @@ -11,11 +11,6 @@ getStaticDir :: IO FilePath getStaticDir = (</> "samples/static") `liftM` Paths_threepenny_gui.getDataDir -#elif defined(FPCOMPLETE) - -getStaticDir :: IO FilePath -getStaticDir = return "samples/static" - #else -- using GHCi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/CallBuffer.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/CallBuffer.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/CallBuffer.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/CallBuffer.hs 2001-09-09 03:46:40.000000000 +0200 @@ -12,9 +12,8 @@ ------------------------------------------------------------------------------} -- | Set the call buffering mode for the given browser window. setCallBufferMode :: Window -> CallBufferMode -> IO () -setCallBufferMode w@Window{..} new = do - flushCallBuffer w - atomically $ writeTVar wCallBufferMode new +setCallBufferMode w new = + flushCallBufferWithAtomic w $ writeTVar (wCallBufferMode w) new -- | Get the call buffering mode for the given browser window. getCallBufferMode :: Window -> IO CallBufferMode @@ -23,16 +22,21 @@ -- | Flush the call buffer, -- i.e. send all outstanding JavaScript to the client in one single message. flushCallBuffer :: Window -> IO () -flushCallBuffer w@Window{..} = do - code' <- atomically $ do - code <- readTVar wCallBuffer - writeTVar wCallBuffer id - return code +flushCallBuffer w = flushCallBufferWithAtomic w $ return () + +-- | Flush the call buffer, and atomically perform an additional action +flushCallBufferWithAtomic :: Window -> STM a -> IO a +flushCallBufferWithAtomic w@Window{..} action = do + -- by taking the call buffer, we ensure that no further code + -- is added to the buffer while we execute the current buffer's code. + code' <- atomically $ takeTMVar wCallBuffer let code = code' "" - unless (null code) $ - runEval code + unless (null code) $ runEval code + atomically $ do + putTMVar wCallBuffer id + action --- Schedule a piece of JavaScript code to be run with `runEval`, +-- | Schedule a piece of JavaScript code to be run with `runEval`, -- depending on the buffering mode bufferRunEval :: Window -> String -> IO () bufferRunEval w@Window{..} code = do @@ -42,8 +46,8 @@ NoBuffering -> do return $ Just code _ -> do - msg <- readTVar wCallBuffer - writeTVar wCallBuffer (msg . (\s -> ";" ++ code ++ s)) + msg <- takeTMVar wCallBuffer + putTMVar wCallBuffer (msg . (\s -> ";" ++ code ++ s)) return Nothing case action of Nothing -> return () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/EventLoop.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/EventLoop.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/EventLoop.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/EventLoop.hs 2001-09-09 03:46:40.000000000 +0200 @@ -3,7 +3,7 @@ module Foreign.JavaScript.EventLoop ( eventLoop, runEval, callEval, debug, onDisconnect, - newHandler, fromJSStablePtr, + newHandler, fromJSStablePtr, newJSObjectFromCoupon ) where import Control.Applicative @@ -186,16 +186,20 @@ -- parseArgs x = Map.elems (fromSuccess (JSON.fromJSON x) :: Map.Map String JSON.Value) --- | Convert a stable pointer from JavaScript into a 'JSObject'. +-- | Retrieve 'JSObject' associated with a JavaScript stable pointer. fromJSStablePtr :: JSON.Value -> Window -> IO JSObject fromJSStablePtr js w@(Window{..}) = do let JSON.Success coupon = JSON.fromJSON js mhs <- Foreign.lookup coupon wJSObjects case mhs of Just hs -> return hs - Nothing -> do - ptr <- newRemotePtr coupon (JSPtr coupon) wJSObjects - addFinalizer ptr $ - runEval ("Haskell.freeStablePtr('" ++ T.unpack coupon ++ "')") - return ptr + Nothing -> newJSObjectFromCoupon w coupon + +-- | Create a new JSObject by registering a new coupon. +newJSObjectFromCoupon :: Window -> Foreign.Coupon -> IO JSObject +newJSObjectFromCoupon w@(Window{..}) coupon = do + ptr <- newRemotePtr coupon (JSPtr coupon) wJSObjects + addFinalizer ptr $ + bufferRunEval w ("Haskell.freeStablePtr('" ++ T.unpack coupon ++ "')") + return ptr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Marshal.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Marshal.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Marshal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Marshal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -28,7 +28,7 @@ import qualified Data.Vector as Vector import Safe (atMay) -import Foreign.JavaScript.EventLoop (fromJSStablePtr) +import Foreign.JavaScript.EventLoop (fromJSStablePtr, newJSObjectFromCoupon ) import Foreign.JavaScript.Types import Foreign.RemotePtr @@ -122,14 +122,17 @@ instance FromJS NewJSObject where fromJS = FromJS' { wrapCode = id, marshal = \_ _ -> return NewJSObject } +-- | Impose a JS stable pointer upon a newly created JavaScript object. +-- In this way, JSObject can be created without waiting for the browser +-- to return a result. wrapImposeStablePtr :: Window -> JSFunction NewJSObject -> IO (JSFunction JSObject) -wrapImposeStablePtr w@(Window{..}) f = do +wrapImposeStablePtr (Window{..}) f = do coupon <- newCoupon wJSObjects rcoupon <- render coupon rcode <- code f return $ JSFunction { code = return $ apply "Haskell.imposeStablePtr(%1,%2)" [rcode, rcoupon] - , marshalResult = \w _ -> newRemotePtr coupon (JSPtr coupon) wJSObjects + , marshalResult = \w _ -> newJSObjectFromCoupon w coupon } {----------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Server.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Server.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Server.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Server.hs 2001-09-09 03:46:40.000000000 +0200 @@ -40,13 +40,10 @@ httpComm :: Config -> EventLoop -> IO () httpComm Config{..} worker = do env <- getEnvironment - let portEnv = Safe.readMay =<< Prelude.lookup "PORT" env - let addrEnv = fmap BS.pack $ Prelude.lookup "ADDR" env - - let config = Snap.setPort (maybe defaultPort id (jsPort `mplus` portEnv)) - $ Snap.setBind (maybe defaultAddr id (jsAddr `mplus` addrEnv)) - $ Snap.setErrorLog (Snap.ConfigIoLog jsLog) - $ Snap.setAccessLog (Snap.ConfigIoLog jsLog) + + let config = Snap.setErrorLog (Snap.ConfigIoLog jsLog) + $ Snap.setAccessLog (Snap.ConfigIoLog jsLog) + $ maybe (configureHTTP env) configureSSL jsUseSSL $ Snap.defaultConfig server <- Server <$> newMVar newFilepaths <*> newMVar newFilepaths <*> return jsLog @@ -55,6 +52,22 @@ routeResources server jsCustomHTML jsStatic ++ routeWebsockets (worker server) + where + configureHTTP :: [(String, String)] -> Snap.Config m a -> Snap.Config m a + configureHTTP env config = + let portEnv = Safe.readMay =<< Prelude.lookup "PORT" env + addrEnv = fmap BS.pack $ Prelude.lookup "ADDR" env + in Snap.setPort (maybe defaultPort id (jsPort `mplus` portEnv)) + $ Snap.setBind (maybe defaultAddr id (jsAddr `mplus` addrEnv)) config + + configureSSL :: ConfigSSL -> Snap.Config m a -> Snap.Config m a + configureSSL cfgSsl config = + Snap.setSSLBind (jsSSLBind cfgSsl) + . Snap.setSSLPort (jsSSLPort cfgSsl) + . Snap.setSSLCert (jsSSLCert cfgSsl) + . Snap.setSSLKey (jsSSLKey cfgSsl) + $ Snap.setSSLChainCert (jsSSLChainCert cfgSsl) config + -- | Route the communication between JavaScript and the server routeWebsockets :: (RequestInfo -> Comm -> IO void) -> Routes routeWebsockets worker = [("websocket", response)] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Types.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Types.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript/Types.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript/Types.hs 2001-09-09 03:46:40.000000000 +0200 @@ -30,7 +30,7 @@ This is a record type which has the following fields: -* @jsPort :: Maybe Int@ +* @jsPort :: Maybe Int@ Port number. @Nothing@ means that the port number is read from the environment variable @PORT@. @@ -64,17 +64,62 @@ The initial 'CallBufferMode' to use for 'runFunction'. It can be changed at any time with 'setCallBufferMode'. +* @jsUseSSLBind :: Maybe ConfigSSL@ + + Whether to serve on a HTTPS connection instead of HTTP for improved security. + + * 'Just' with a 'ConfigSSL' to serve on HTTPS. + Note that this will fail silently unless the @snap-server@ package + has been compiled with the @openssl@ flag enabled. + + * 'Nothing' to serve on HTTP. + (For reasons of forward compatibility, the constructor is not exported.) -} data Config = Config - { jsPort :: Maybe Int + { jsPort :: Maybe Int , jsAddr :: Maybe ByteString , jsCustomHTML :: Maybe FilePath , jsStatic :: Maybe FilePath , jsLog :: ByteString -> IO () , jsWindowReloadOnDisconnect :: Bool , jsCallBufferMode :: CallBufferMode + , jsUseSSL :: Maybe ConfigSSL + } + +{- | Static configuration for the SSL version of the "Foreign.JavaScript" server. + +This is a record type which has the following fields: + +* @jsSSLBind :: ByteString@ + + Bind address. + +* @jsSSLCert :: FilePath@ + + Path to SSL certificate file. Example: @cert.pem@. + +* @jsSSLChainCert :: Bool@ + + If it is SSL chain certificate file. + +* @jsSSLKey :: FilePath@ + + Path to SSL key file. Example: @key.pem@. + +* @jsSSLPort :: ByteString@ + + Port number. Example: 443. + +-} + +data ConfigSSL = ConfigSSL + { jsSSLBind :: ByteString + , jsSSLCert :: FilePath + , jsSSLChainCert :: Bool + , jsSSLKey :: FilePath + , jsSSLPort :: Int } defaultPort :: Int @@ -99,6 +144,7 @@ , jsStatic = Nothing , jsLog = BS.hPutStrLn stderr , jsCallBufferMode = FlushOften + , jsUseSSL = Nothing } {----------------------------------------------------------------------------- @@ -271,7 +317,7 @@ , runEval :: String -> IO () , callEval :: String -> IO JSON.Value - , wCallBuffer :: TVar (String -> String) + , wCallBuffer :: TMVar (String -> String) , wCallBufferMode :: TVar CallBufferMode , timestamp :: IO () @@ -289,7 +335,7 @@ newPartialWindow :: IO Window newPartialWindow = do ptr <- newRemotePtr "" () =<< newVendor - b1 <- newTVarIO id + b1 <- newTMVarIO id b2 <- newTVarIO NoBuffering let nop = const $ return () Window undefined [] nop undefined b1 b2 (return ()) nop nop ptr <$> newVendor <*> newVendor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript.hs new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/JavaScript.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/JavaScript.hs 2001-09-09 03:46:40.000000000 +0200 @@ -16,7 +16,9 @@ serve, defaultConfig, Config( jsPort, jsAddr , jsCustomHTML, jsStatic, jsLog - , jsWindowReloadOnDisconnect, jsCallBufferMode), + , jsWindowReloadOnDisconnect, jsCallBufferMode + , jsUseSSL), + ConfigSSL (..), Server, MimeType, URI, loadFile, loadDirectory, Window, getServer, getCookies, root, @@ -76,7 +78,9 @@ unsafeCreateJSObject w f = do g <- wrapImposeStablePtr w f bufferRunEval w =<< toCode g - marshalResult g w JSON.Null + marshalResult g w err + where + err = error "unsafeCreateJSObject: marshal does not take arguments" -- | Call a JavaScript function and wait for the result. callFunction :: Window -> JSFunction a -> IO a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Foreign/RemotePtr.hs new/threepenny-gui-0.9.4.0/src/Foreign/RemotePtr.hs --- old/threepenny-gui-0.9.1.0/src/Foreign/RemotePtr.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Foreign/RemotePtr.hs 2001-09-09 03:46:40.000000000 +0200 @@ -19,7 +19,7 @@ import Control.Monad import Control.Concurrent import qualified Data.Text as T -import qualified Data.Map as Map +import qualified Data.HashMap.Strict as Map import Data.Functor import Data.IORef @@ -53,7 +53,7 @@ case GHC.mkWeak# r# v f s of (# s1, w #) -> (# s1, GHC.Weak w #) #endif -type Map = Map.Map +type Map = Map.HashMap {----------------------------------------------------------------------------- Types @@ -97,8 +97,8 @@ -- A single 'RemotePtr' will always be associated with the same 'Coupon'. data Vendor a = Vendor - { coupons :: MVar (Map Coupon (Weak (RemotePtr a))) - , counter :: MVar [Integer] + { coupons :: IORef (Map Coupon (Weak (RemotePtr a))) + , counter :: IORef Integer } {----------------------------------------------------------------------------- @@ -107,14 +107,14 @@ -- | Create a new 'Vendor' for trading 'Coupon's and 'RemotePtr's. newVendor :: IO (Vendor a) newVendor = do - counter <- newMVar [0..] - coupons <- newMVar Map.empty + counter <- newIORef 0 + coupons <- newIORef Map.empty return $ Vendor {..} -- | Take a 'Coupon' to a 'Vendor' and maybe you'll get a 'RemotePtr' for it. lookup :: Coupon -> Vendor a -> IO (Maybe (RemotePtr a)) lookup coupon Vendor{..} = do - w <- Map.lookup coupon <$> readMVar coupons + w <- Map.lookup coupon <$> readIORef coupons maybe (return Nothing) deRefWeak w -- | Create a new 'Coupon'. @@ -124,7 +124,7 @@ -- certainly not on a remote machine. newCoupon :: Vendor a -> IO Coupon newCoupon Vendor{..} = - T.pack . show <$> modifyMVar counter (\(n:ns) -> return (ns,n)) + T.pack . show <$> atomicModifyIORef' counter (\n -> (n+1,n)) -- | Create a new 'RemotePtr' from a 'Coupon' and register it with a 'Vendor'. newRemotePtr :: Coupon -> a -> Vendor a -> IO (RemotePtr a) @@ -133,9 +133,9 @@ let self = undefined ptr <- newIORef RemoteData{..} - let finalize = modifyMVar coupons $ \m -> return (Map.delete coupon m, ()) + let finalize = atomicModifyIORef' coupons $ \m -> (Map.delete coupon m, ()) w <- mkWeakIORef ptr finalize - modifyMVar coupons $ \m -> return (Map.insert coupon w m, ()) + atomicModifyIORef' coupons $ \m -> (Map.insert coupon w m, ()) atomicModifyIORef' ptr $ \itemdata -> (itemdata { self = w }, ()) return ptr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Graphics/UI/Threepenny/Core.hs new/threepenny-gui-0.9.4.0/src/Graphics/UI/Threepenny/Core.hs --- old/threepenny-gui-0.9.1.0/src/Graphics/UI/Threepenny/Core.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Graphics/UI/Threepenny/Core.hs 2001-09-09 03:46:40.000000000 +0200 @@ -5,7 +5,7 @@ -- * Server -- $server - Config(..), defaultConfig, startGUI, + Config(..), ConfigSSL (..), defaultConfig, startGUI, loadFile, loadDirectory, -- * UI monad @@ -70,7 +70,7 @@ import qualified Reactive.Threepenny as Reactive -- exports -import Foreign.JavaScript (Config(..), defaultConfig) +import Foreign.JavaScript (Config(..), ConfigSSL (..), defaultConfig) import Graphics.UI.Threepenny.Internal import Reactive.Threepenny hiding (onChange) @@ -134,7 +134,7 @@ -- | Set CSS style of an Element style :: WriteAttr Element [(String,String)] -style = mkWriteAttr $ \xs el -> forM_ xs $ \(name,val) -> +style = mkWriteAttr $ \xs el -> forM_ xs $ \(name,val) -> runFunction $ ffi "%1.style[%2] = %3" el name val -- | Value attribute of an element. @@ -360,7 +360,7 @@ fromObjectProperty :: (FromJS a, ToJS a) => String -> Attr Element a fromObjectProperty name = mkReadWriteAttr get set where - set v el = runFunction $ ffi ("%1." ++ name ++ " = %2") el v + set v el = runFunction $ ffi ("%1." ++ name ++ " = %2") el v get el = callFunction $ ffi ("%1." ++ name) el {----------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/src/Reactive/Threepenny/Types.hs new/threepenny-gui-0.9.4.0/src/Reactive/Threepenny/Types.hs --- old/threepenny-gui-0.9.1.0/src/Reactive/Threepenny/Types.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/src/Reactive/Threepenny/Types.hs 2001-09-09 03:46:40.000000000 +0200 @@ -20,7 +20,9 @@ , evalP :: EvalP (Maybe a) } -instance Hashable Priority where hashWithSalt _ = fromEnum +instance Hashable Priority where + hashWithSalt = hashUsing fromEnum + hash = fromEnum data Latch a = Latch { readL :: EvalL a } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threepenny-gui-0.9.1.0/threepenny-gui.cabal new/threepenny-gui-0.9.4.0/threepenny-gui.cabal --- old/threepenny-gui-0.9.1.0/threepenny-gui.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/threepenny-gui-0.9.4.0/threepenny-gui.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ Name: threepenny-gui -Version: 0.9.1.0 +Version: 0.9.4.0 Synopsis: GUI framework that uses the web browser as a display. Description: Threepenny-GUI is a GUI framework that uses the web browser as a display. @@ -33,8 +33,10 @@ ,GHC == 8.2.2 ,GHC == 8.4.4 ,GHC == 8.6.5 - ,GHC == 8.8.3 - ,GHC == 8.10.1 + ,GHC == 8.8.4 + ,GHC == 8.10.7 + ,GHC == 9.2.4 + ,GHC == 9.4.1 Extra-Source-Files: CHANGELOG.md ,README.md @@ -109,8 +111,8 @@ if flag(rebug) cpp-options: -DREBUG ghc-options: -O2 - build-depends: base >= 4.8 && < 4.16 - ,aeson (>= 0.7 && < 0.10) || == 0.11.* || (>= 1.0 && < 1.6) + build-depends: base >= 4.8 && < 4.19 + ,aeson (>= 0.7 && < 0.10) || == 0.11.* || (>= 1.0 && < 2.2) ,async >= 2.0 && < 2.3 ,bytestring >= 0.9.2 && < 0.12 ,containers >= 0.4.2 && < 0.7 @@ -119,19 +121,19 @@ ,exceptions >= 0.6 && < 0.11 ,filepath >= 1.3.0 && < 1.5.0 ,file-embed >= 0.0.10 && < 0.1 - ,hashable >= 1.1.0 && < 1.4 + ,hashable >= 1.2.0 && < 1.5 ,safe == 0.3.* ,snap-server >= 0.9.0 && < 1.2 ,snap-core >= 0.9.0 && < 1.1 ,stm >= 2.2 && < 2.6 - ,template-haskell >= 2.7.0 && < 2.18 - ,text >= 0.11 && < 1.3 + ,template-haskell >= 2.7.0 && < 2.20 + ,text >= 0.11 && < 2.1 ,transformers >= 0.3.0 && < 0.6 ,unordered-containers == 0.2.* ,websockets (>= 0.8 && < 0.12.5) || (> 0.12.5.0 && < 0.13) ,websockets-snap >= 0.8 && < 0.11 ,vault == 0.3.* - ,vector >= 0.10 && < 0.13 + ,vector >= 0.10 && < 0.14 if impl(ghc >= 8.0) ghc-options: -Wcompat -Wnoncanonical-monad-instances default-language: Haskell2010