Over the past year I've been porting the C++/GLSL examples from Jason L. McKesson's Learning Modern 3D Graphics Programming into Haskell using a peculiar OpenGL library called GPipe.
GPipe [github] [hackage] is Tobias Bexelius' framework for expressing OpenGL buffers, uniforms, vertex shaders, fragment shaders, and draw-calls in normal pure Haskell code. His framework elegantly models the entire graphics pipeline and hides most of the some 250 state-mutation functions that comprise the OpenGL C API.
I started off with no experience using either Haskell or OpenGL. Initially it seemed that I had fread more than I could fit in my brainbuffer, but after an embarrassing amount of re-reading documentation and re-writing the same tutorials repeatedly, I think I understand enough to share. Last week I completed Tutorial 6, in which you create an articulated robotic arm. For a seasoned Haskeller this might've been easy, but I still felt proud.
Today I've published the first 6 ports on GitHub. I'm making a second pass to clean the code up, and then I'll continue to delve into the unknown of functional graphics programming!
Clone me, beautiful: gltut_haskell-gpipe