I have this function to create a list of lists, according to some rules i implemented, but it gives me an annoying error, i can't understand how to fix.
Here's the list it receives:
["3123","11254","790","86214","114125","36214"]
and the value is
num = 7
Here's the function:
create_list_of_lists :: Integral t => [t] -> t -> [t]
create_list_of_lists (x:xs) num = [x `div`z | x <- xs, z <- [1..num]]
When i compile it, i get no errors, but when i run it with this command:
create_list_of_lists ["3123","11254","790","86214","114125","36214"] 7
i get this errors:

What am i doing wrong ?
Integral [Char]; No instance forNum [Char]. The type[Char]does not have an instance forIntegralorNum, which tells you that you're probably passing in the wrong type. These error can also sometimes mean that you have the wrong constraints on your function, such as if you haveIntegralandFractional(these are obviously not compatible mathematically), but these issues are more rare.