Counting dashes in numbers
Take items directly from the thing, without indexing:

x = [arr !! digitToInt i | i &lt;- input]


And prefer where over let: (where is so much more common than let, it is easier to read as you see the general picture before the details.)

newFunction input = sum [arr !! digitToInt i | i &lt;- input]
  where
    arr = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6]


arr is a bad name, I would prefer dashesInDigits

assert should be more general (take f as argument) and written using guards.