A function determining intervals of values greater than threshold
(You can skip right to TL;DR for a simpler approach)

Your function actually determines the indices of list elements that are above a threshold. In Haskell, when you have a list, an index is not the idiomatic way to represent its items. What do you want with those indices?

Agreed, your version is hard to read. For another approach, I start with

intervalsT :: [Bool] -&gt; [(Int, Int]


and notice that the group function might come in handy to collect subsequent equal elements.

*Main&gt; group [True,True,False,False,True]
[[True,True],[False,False],[True]]


mapping length will result in [2,2,1], which is a step closer to the indices. To turn [a,b,c] into [0,a ,a+b, a+b+c], the function scanl' is perfect:

*Main&gt; scanl' (+) 0 [2,2,1]
[0,2,4,5]


which we can zip with its own tail. But wait! We lost information whether something is above or below threshold.
zip it again with the grouped Bools, filter based on the bools, throw away the bools. This yields:

TL;DR

intervals p = intervalsT . map (&gt;p)
intervalsT :: [Bool] -&gt; [(Int,Int)]
intervalsT xs = let grouped = group xs
                    idx = scanl' (+) 0 . map length $ grouped
                    ivs = zip idx (map (subtract 1) $ tail idx)
                 in map snd $ filter fst $ zip (map head grouped) ivs