Designing flexible machine learning pipelines can be tricky, especially when you are constrained to using off-the-shelf ML frameworks. Formation found itself in this situation last year, when it needed to build an MVP pipeline for solving contextual bandit problems. In this experience report I'll describe a several useful design patterns from the Haskell world, and show how we used them to create safe and flexible interfaces that support both TensorFlow and Vowpal Wabbit models. Along the way, we’ll survey a variety of Haskell's language features, from the very abstract to the very low-level, and see how they come together in a real-world application.