list - What do square brackets mean in a type declaration? -


for example:

 r <- query_ conn "select * test" :: io [testfield] 

what [testfield] represent?

simply put, io [testfield] list of testfields in io monad.

however, more correct description it's io action result has type [testfield] (since resulting value obtained after io performed).

you can learn more in following sources:

haskell hierarchical libraries - io monad

lyah - intro lists


Comments