[Haskell-beginners] (SPAM 3)Re: database, list result, extraction and conversion

Bill Kunyiha bkunyiha at gmail.com
Thu Dec 6 20:03:42 UTC 2018


Thank you for reaching out to me.
Is this a remote position?
I live in Los Angeles and cannot relocate.

Thank You
Bill Kunyiha

On Thu, Dec 6, 2018 at 8:10 AM Francesco Ariis <fa-ml at ariis.it> wrote:

> On Thu, Dec 06, 2018 at 03:54:45PM +0100, Damien Mattei wrote:
> > if it was so easy!
>
> Damien, you must heed the compiler!
>
> > UpdateSidonie.hs:93:25: error:
> >     • Couldn't match expected type ‘Only a’
> >                   with actual type ‘[Only Text]’
> >     • In the first argument of ‘fromOnly’, namely ‘bd_rows’
> >       In the expression: fromOnly bd_rows
> >       In an equation for ‘noBD’: noBD = fromOnly bd_rows
> >     • Relevant bindings include
> >         noBD :: a (bound at UpdateSidonie.hs:93:9)
> >    |
> > 93 |     let noBD = fromOnly bd_rows
> >    |                         ^^^^^^^
> > Failed, no modules loaded.
>
> So you applied `fromOnly` to `bd_rows`. fromOnly has type
>
>     fromOnly :: Only a -> a
>
> Now GHC is complaining:
>
>       • I was expecting ‘Only a’
>               but you gave me ‘[Only Text]’
>
> So either call "head" on [Only Text] (unsafe!) or map over it.
> See if it works and if not, fire again here
> -F
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20181206/ea1bcf68/attachment.html>


More information about the Beginners mailing list