packages feed

hpage 0.10.0 → 0.10.1

raw patch · 3 files changed

+16/−43 lines, 3 files

Files

README view
@@ -1,40 +1,7 @@ Welcome to hPage! --- INSTALL --------------------------------------------------------------------------------------------------------The easiest way to install hPage is through cabal-install:-1. Install wxWidgets 2.8.10 (or superior) from http://wxwidgets.org-2. Install Cabal from http://www.haskell.org/cabal/-3. Run $ sudo cabal install hpage-4. Run $ ~/.cabal/bin/hpage---- USE ------------------------------------------------------------------------------------------------------------To start using it, just write some haskell expressions separated by empty lines like the following ones:--12 + 30--length [0..41]--Now you can place your cursor on any of them and then press the [Value] or [Type] buttons to get their values or types-You can also type in Type names, like...--Int--IO--...to see their kind, using the [Kind] button--You can define functions, let's try out the well known fact...--fact x = foldl (*) 1 [1..x]--Now if you place your cursor on something like...--fact 20--... you can ask for its value or type--Also, instead of just placing your cursor on a expression, you can mark an area and hpage will evaluate just that area--That's just to start up... you can do some serious stuff with this application, just check out the different menues+λPage is targeted at those haskell developers which also like to work with dynamic GUIs and wish to have something like Smalltalk's Workspace or jPage for Java. Using λPage developers can write haskell expressions, evaluate and test them, load, unload and (of course) reload modules and then, re-evaluate the same expressions. Developed over wxWidgets, λPage is multi-platform by nature and works in every scenario where ghc and wxWidgets work.  visit us at http://haskell.hpage.com++check out the install instructions in our wiki page: http://wiki.github.com/elbrujohalcon/hPage/installing-page
hpage.cabal view
@@ -1,5 +1,5 @@ name: hpage-version: 0.10.0+version: 0.10.1 cabal-version: >=1.6 build-type: Custom license: BSD3
src/HPage/GUI/FreeTextWindow.hs view
@@ -397,8 +397,8 @@     forever $ do          t <- recv          liftIO $ do-                    txt <- catch (eval t) $ \(ErrorCall desc) ->-                                                    varUpdate varErrors (++ [GUIBtm desc t]) >>+                    txt <- flip handle (eval t) $ \(ex :: SomeException) ->+                                                    varUpdate varErrors (++ [GUIBtm (show ex) t]) >>                                                     return bottomChar                     debugIO $ "Writing chv := " ++ txt                     tryPutMVar chv $ Just txt@@ -449,12 +449,12 @@ valueFiller' :: GUIContext -> String -> IO String valueFiller' guiCtx@GUICtx{guiResults = GUIRes{resValue  = txtValue}} val =       do-        h <- try (case val of+      	h <- try (case val of                       [] -> return []                       (c:_) -> return [c])         case h of-            Left (ErrorCall desc) ->-                return desc+            Left (ex :: SomeException) ->+                return $ show ex             Right [] ->                 return ""             Right t ->@@ -953,6 +953,11 @@                               guiChrFiller  = chfv,                               guiStatus     = status} =     do+    	-- Cancel if needed...+    	btnText <- get btnInterpret text+    	if btnText == "Cancel"+    		then get btnInterpret (on command) >>= liftIO +    		else return ()         sel <- textCtrlGetStringSelection txtCode         let runner = case sel of                         "" -> tryIn@@ -1001,7 +1006,8 @@                                                       bgcolor := case errs of                                                                      [] -> white                                                                      _  -> yellow]-                                        set btnInterpret [on command := poc, text := "Interpret"]+                                        set btnInterpret [text := "Interpret",+                                        				  on command := poc]                          in liftIO $ set btnInterpret [text := "Cancel",                                                        on command := revert]                         liftDebugIO "sending the value to the Value Filler..."