[Haskell-cafe] Operator #
What does # mean in this code ? (from Data.List) findIndices p ls = loop 0# ls where loop _ [] = [] loop n (x:xs) | p x = I# n : loop (n +# 1#) xs | otherwise = loop (n +# 1#) xs -- View this message in context: http://haskell.1045720.n5.nabble.com/Operator-tp3299360p3299360.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] qtHaskell signal and slots
I have the following code that tries to resize window after a click. But nothing happens. If I use a builtin slot that does not need a function, such as "close", "quit" it works, however for any other slot it seems my function is ignored. Which slot/signal should I use and how? module Main where import Qtc.Classes.Qccs import Qtc.Classes.Gui import Qtc.Gui.Base import Qtc.Gui.QApplication import Qtc.Gui.QPushButton import Qtc.Core.QFile import Qtc.Tools.QUiLoader import Qtc.Enums.Core.QIODevice import Qtc.Core.Base import Qtc.ClassTypes.Gui import Qtc.Gui.QAbstractButton main = do app <- qApplication () loader <- qUiLoader () uiFile <- qFile "slide.ui" open uiFile fReadOnly ui <- load loader uiFile close uiFile () add <- findChild ui ("", "pushButton") connectSlot add "clicked()" add "click()" $ t ui qshow ui () qApplicationExec () t :: QWidget () -> QWidget () -> IO () t ui _= resize ui (500::Int ,500::Int) -- View this message in context: http://haskell.1045720.n5.nabble.com/qtHaskell-signal-and-slots-tp3282748p3282748.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] GUI Designer
There's a tutorial on how to use qtDesigner with qtHaskell ? Or how to use XRC files with wxHaskell? -- View this message in context: http://haskell.1045720.n5.nabble.com/GUI-Designer-tp3271441p3271441.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell Helper
I was able to parse function definition, but function call still is a problem, -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3205482.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell Helper
I read the parsec documentation and saw my mistake. By the way, there is a parser that returns [String] for my case? -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3198573.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell Helper
And why b <- between (char ',') (char '=') (sepBy alphaNum (char ',') ) does not return [String] ? -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3198511.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell Helper
The problem is there. A function in Hai would be function-name, arg1,argn=body. Func stores function name,arguments and body as Strings(I was thinking to put Func String String String). The parser func that I wrote so far try to parse a function definition, not a function call. But when I try to store the function on my Map I get a error with somthing called 'functional dependencies'(which I don't know what is). -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3117672.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell Helper
No, it is not secret. I'm having trouble to define functions. Take a look at my code(please be gentle) http://haskell.1045720.n5.nabble.com/file/n3100036/hai1.hs hai1.hs -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3100036.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe