[Haskell-cafe] Selda, type operators and heterogeneous lists

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sat Apr 14 07:09:27 UTC 2018


On Fri, Apr 13, 2018 at 04:38:46PM +0200, Marc Busqué wrote:
> On Fri, 13 Apr 2018, Tom Ellis wrote:
> >On Fri, Apr 13, 2018 at 03:59:44PM +0200, Marc Busqué wrote:
> >
> >Before we can help we need to know more.  Specifically, why do you want to
> >put them in a single list?
> 
> I want to make the same action with more than one (creating them in
> the database server):
> 
> ```
> migrate :: IO ()
> migrate = do
>     dir <- dBDir
>     createDirectoryIfMissing True dir
>     forM_ [categories, expenses]
>        $ withDB . createTable ```

I think I would just tolerate

      forM_ [createTable categories, createTable expenses]
        $ withDB


More information about the Haskell-Cafe mailing list