Assignment 4: Regular Expression Analysis in Haskell Solution