help designing types for a gsl fit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

help designing types for a gsl fit

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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: help designing types for a gsl fit

David McBride
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
<[hidden email]> wrote:

> 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
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Loading...