First heaskell approach (without graphivz).