On Wed, Jun 15, 2011 at 04:13:49AM -0700, kaffeepause73 wrote: > The folloing file log.txt contains three signal traces in the three columns > (time, signal 1, signal 2) > > 0 30 9 > 0.1 30 9 > 0.2 30 9 > > let m = read text :: [[Double]] > > SecondLot > signalImport: Prelude.read: no parse
Instances of Read tends to expect the format that Show would output. In the case of lists, it's [elem1,elem2,elem3]. You can either modify your exporter to output values in the format that read expects, or you could use a combination of the functions 'lines', 'words' and 'read' to split the input into a list of lines, split each line into a list of words, and finally use read to go from word to Double. -- Lars Viklund | [email protected] _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
