
6 Dec
2018
6 Dec
'18
6:16 a.m.
again un haskell beginner question ;-) ... i have this: [Only {fromOnly = "-04.3982"}] as result of a database query, i understand it's a list and i can get the first element: *Main> Data.List.head [Only {fromOnly = "-04.3982"}] Only {fromOnly = "-04.3982"} *Main> let s = Data.List.head [Only {fromOnly = "-04.3982"}] *Main> s Only {fromOnly = "-04.3982"} *Main> show s "Only {fromOnly = \"-04.3982\"}" but how can i get the String "-04.3982" ? and after converting it to a Float -- Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS