help designing types for a gsl fit

Hello, I'm trying to install an application Termite - Debug https://raw.githubusercontent.com/termite2/debug/master/Debug/SourceView.hs but I get this error in line 929:14 when it try to do this lprog <- G.labelNew Nothing The error says: Could not deduce (glib-0.13.4.1:System.Glib.UTFString.GlibString string0) arising from a use of ‘G.labelNew’ from the context (D.Rel c v a s) bound by the type signature for sourceWindowCreate :: D.Rel c v a s => RSourceView c a u -> IO G.Widget at Debug/SourceView.hs:913:23-73 instance glib-0.13.4.1:System.Glib.UTFString.GlibString [Char] -- Defined in ‘glib-0.13.4.1:System.Glib.UTFString’ In a stmt of a 'do' block: lprog <- G.labelNew Nothing In the expression: do { vbox <- G.vBoxNew False 0; G.widgetShow vbox; spec <- getIORef svInputSpec ref; code <- codeWinNew spec; .... } In an equation for ‘sourceWindowCreate’: sourceWindowCreate ref = do { vbox <- G.vBoxNew False 0; G.widgetShow vbox; spec <- getIORef svInputSpec ref; cabal: Error: some packages failed to install: I really don't know how to proceed, I'm new with Haskell Thanks in advance. ----------------- Agustin Larreinegabe

If you look at the type of labelNew
GlibString string => Maybe string -> IO Label
If you look at the instances for GlibString, they could be Text or
[Char]. You have to decide which. The fact that you are using
Nothing does not tell you the entire final type. It could be Maybe
[Char], or Maybe Text. Even though the choice seems arbitrary in this
instance, you have to decide which it is. So try this.
lprog <- G.labelNew (Nothing :: Maybe [Char])
On Fri, Jun 23, 2017 at 3:22 AM, Agustin Larreinegabe
Hello, I'm trying to install an application Termite - Debug but I get this error in line 929:14
when it try to do this
lprog <- G.labelNew Nothing
The error says:
Could not deduce (glib-0.13.4.1:System.Glib.UTFString.GlibString string0) arising from a use of ‘G.labelNew’ from the context (D.Rel c v a s) bound by the type signature for sourceWindowCreate :: D.Rel c v a s => RSourceView c a u -> IO G.Widget at Debug/SourceView.hs:913:23-73 instance glib-0.13.4.1:System.Glib.UTFString.GlibString [Char] -- Defined in ‘glib-0.13.4.1:System.Glib.UTFString’ In a stmt of a 'do' block: lprog <- G.labelNew Nothing In the expression: do { vbox <- G.vBoxNew False 0; G.widgetShow vbox; spec <- getIORef svInputSpec ref; code <- codeWinNew spec; .... } In an equation for ‘sourceWindowCreate’: sourceWindowCreate ref = do { vbox <- G.vBoxNew False 0; G.widgetShow vbox; spec <- getIORef svInputSpec ref; cabal: Error: some packages failed to install:
I really don't know how to proceed, I'm new with Haskell
Thanks in advance.
----------------- Agustin Larreinegabe
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (2)
-
Agustin Larreinegabe
-
David McBride