Added View Pattern with a Pragma to use it as it is a GHC extension