import Text.ParserCombinators.ReadP -- or the parser lib of your choice
import Data.Char
...
macP = count 16 (satisfy isHexDigit)