Hi Everyone,

     Is there a "From SQL"-type function that "restores" a range or list comprehension?

Example:
Let's say I want to keep track of which episodes of a TV show I've seen. I have an SQL table, in which is a record:
   id (INTEGER): 30
   title (VARCHAR): "The Simpsons"
   episodes_watched (Some data format): [1..4], [14], [18..21], [23..25]

Then, when I pull the record, in Haskell, the "Episodes Watched" is already one list:
[1,2,3,4,14,18,19,21,23,24,25]

, or a series of lists that I can append together:
[1,2,3,4], [14], [18,19,20,21], [23,24,25]


Note in the example that I would like to be able to store multiple ranges within a single record.


Thanks so much for any help!
Tom