-- | /O(log n)/. Find the greatest key that is smaller or equal
-- to the given target key.   This \"floor\" key is returned,
 
-- | /O(log n)/. Find the smallest key that is greater or equal
-- to the given target key.   This \"ceiling\" key is returned,

It seems more intuitive to reverse the naming. The key parameter to lookupFloor is actually the ceiling, and the key returned is the greatest key less than or equal to the ceiling. Since there is no floor involved here, I would call the function lookupCeiling.

Regards,
Sean