I don't know why these unsafe* functions are suggested so easily. Their
name is chosen for good reason.


On Mon, 23 Oct 2006, Bas van Dijk wrote:

> ------------------------------------------------------------------------------
> module Main where
> 
> import Text.ParserCombinators.Parsec
> 
> data T = ...
> 
> test = print . take 3 =<< parseFiles
> 
> parseFiles :: IO [T]
> parseFiles = mapM parseFile =<< getFileFPs

Is it possible to turn it into

parseFiles :: [IO T]

?

Then you can easily do

sequence (take 3 parseFiles)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to