Refactor use of checkPattern.
Refactor use of checkPattern.

HIPERFIT/futhark,diku-dk/futhark,ihc/futhark,diku-dk/futhark,ihc/futhark,diku-dk/futhark,diku-dk/futhark,ihc/futhark,HIPERFIT/futhark,HIPERFIT/futhark,diku-dk/futhark