
2 Oct
2018
2 Oct
'18
12:48 p.m.
Hello suppose that I have a bunch of type like this data Unchecked data Hdf5 data Cbf data A t > A String The A thing come from a database as A Unchecked now if I read the String and it ends with .h5, I have a A Hdf5 type and If the string end with .cbf, I have a A Cbf. So I would like a function which allow to return a A Hdf5 or a A Cbf depending on the String content. check :: A Unchecked -> A ??? check = ??? Is it possible to do this ? Thanks Frederic PS: At the end I will have more tha one tag.