Вы не после того, что ошибка типа вы получите, но я предполагаю, что это что-то вроде этого:
Prelude> let x = 2
Prelude> let y = 7
Prelude> [1 .. (logBase x y)]
<interactive>:1:7:
No instance for (Floating Integer)
arising from a use of `logBase' at <interactive>:1:7-17
Possible fix: add an instance declaration for (Floating Integer)
In the expression: (logBase x y)
In the expression: [1 .. (logBase x y)]
In the definition of `it': it = [1 .. (logBase x y)]
Проблема заключается в том, что:
Prelude> :t logBase
logBase :: (Floating a) => a -> a -> a
возвращает тип в перемещаемом классе , тогда как другие переменные в вашей программе (1, 'x', 'y') являются интегральными.
Предполагаю, что вам нужна последовательность целых чисел?
Prelude> :set -XNoMonomorphismRestriction
Prelude> let x = 2
Prelude> let y = 42
Prelude> [1 .. truncate (logBase x y)]
[1,2,3,4,5]
Использовать усечение, клей или пол.