helper xs x index :: builtList index + 1 //line 63
else
helper xs x index min index + 1
The problem you are facing is that you are trying to pass a non-list of your helper function on line 65 ( min), trying to pass int listthe same parameter on line 63. Try replacing minwith [min]or min::[].
Edit:
, , (. ), helper xs x index index :: builtList, helper xs x index :: builtList index + 1. , , .. :: +, :
helper xs x (index :: builtList) (index + 1) //line 63
else
helper xs x index min (index + 1)