[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-beginners
Subject:    Re: [Haskell-beginners] (SPAM 3)Re:  monad and variable result
From:       Francesco Ariis <fa-ml () ariis ! it>
Date:       2018-12-10 15:06:12
Message-ID: 20181210150612.aicm6oalxvoxcwxv () x60s ! casa
[Download RAW message or body]

On Mon, Dec 10, 2018 at 03:46:46PM +0100, Damien Mattei wrote:
> query returns a list i suppose because i can wirte this in my main code:
>  bd_rows <- query conn qry_head (Only (name::String))

`query` does not return a `[r]`, rather an `IO [r]`. The difference
is very important; if you don't get it you will always have troubles
with Haskell. This will for sure help you

    https://www.seas.upenn.edu/~cis194/fall16/lectures/06-io-and-monads.html
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic