{-# LANGUAGE PatternGuards #-}moduleAgda.Utils.SuffixwhereimportData.ChardataSuffix=NoSuffix|PrimeInt|IndexIntnextSuffixNoSuffix=Prime1nextSuffix(Prime_)=Index0-- we only use single primes in generated namesnextSuffix(Indexi)=Index$i+1suffixView::String->(String,Suffix)suffixViews|(ps@(_:_),s')<-span(=='\'')rs=(reverses',Prime$lengthps)|(ns@(_:_),s')<-spanisDigitrs=(reverses',Index$read$reversens)|otherwise=(s,NoSuffix)wherers=reversesaddSuffix::String->Suffix->StringaddSuffixsNoSuffix=saddSuffixs(Primen)=s++replicaten'\''addSuffixs(Indexi)=s++showi