Debugging a compiler that output incorrect program is hard.
futhark developers use the strategy of type checking their IR after each pass to help debugging their compiler. They enabled type checking by default. This strategy forces them to think carefully about the semantics of their IR, though it does have a small (10%) performance overhead.