How to create a list of records in haskell
I have a Record
data TestList = Temp1 (String,[String])
| Temp2 (String,[(String,String)])
deriving (Show, Eq)
I am creating a list of records
testLists :: [TestList]
testLists = [minBound..maxBound]
When I run, it throws me an error.
No instance for (Enum TestList)
arising from the arithmetic sequence `minBound .. maxBound'
Possible fix: add an instance declaration for (Enum TestList)
In the expression: [minBound .. maxBound]
In an equation for `testLists': testLists = [minBound .. maxBound]
It gives me a possible fix but I don't understand what it means. can anyone explain it and tell me how to fix it.