You don't post what type error you get, but I imagine it is something like this:
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)]
The problem is that:
Prelude> :t logBase
logBase :: (Floating a) => a -> a -> a
returns a type in the Floating class, while other variables in your program (1, 'x', 'y') are of integral type.
I presume you want a sequence of Integers?
Prelude> :set -XNoMonomorphismRestriction
Prelude> let x = 2
Prelude> let y = 42
Prelude> [1 .. truncate (logBase x y)]
[1,2,3,4,5]
Use truncate, celing or floor.