NAR utilities in haskell