# [Haskell-cafe] Compiler stops at SpecConstr optimization

Ben Lippmeier benl at ouroborus.net
Fri Aug 30 02:19:25 CEST 2013

```On 30/08/2013, at 2:38 AM, Daniel Díaz Casanueva wrote:

> While hacking in one of my projects, one of my modules stopped to compile for apparently no reason. The compiler just freezes (like if it where in an infinite loop) while trying to compile that particular module. Since I had this problem I have been trying to reduce the problem as much as I could, and I came out with this small piece of code:
>
> > module Blah (foo) where
>
> > import Data.Vector (Vector)
> > import qualified Data.Vector as V
>
> > foo :: (a -> a) -> Vector a -> Vector a
> > foo f = V.fromList . V.foldl (\xs x -> f x : xs) []

Probably an instance of this one: