{-# LANGUAGE CPP #-}moduleAgda.Syntax.StrictwhereimportData.Generics(everything)importAgda.Syntax.CommonimportAgda.Syntax.InternalimportAgda.Syntax.Parser.TokensimportqualifiedAgda.Syntax.ConcreteasCimportqualifiedAgda.Syntax.Concrete.DefinitionsasC#include "../undefined.h"importAgda.Utils.Impossible-- | @force@ is the recursive @const 0@ function, to force Haskell to evaluate.classStrictawhereforce::a->IntinstanceStrictTermwhereforcet=casetofVar_ts->forcetsDef_ts->forcetsCon_ts->forcetsLam_t->forcetLit_->0Piab->force(a,b)Funab->force(a,b)Sorts->forcesMetaV_ts->forcetsDontCare->0instanceStrictTypewhereforce(Elst)=force(s,t)instanceStrictSortwhereforces=casesofTypen->forcenProp->0Lubs1s2->force(s1,s2)Sucs->forcesMetaS_as->forceasInf->0DLubs1s2->force(s1,s2)instanceStrictClauseBodywhereforce(Bodyt)=forcetforce(Bindb)=forcebforce(NoBindb)=forcebforceNoBody=0instanceStrictC.Exprwhereforcee=everything(+)(const1)einstanceStrictC.Declarationwhereforcee=everything(+)(const1)einstanceStrictC.Pragmawhereforcee=everything(+)(const1)einstanceStrictC.NiceDeclarationwhereforced=everything(+)(const1)dinstance(Stricta,Strictb)=>Strict(a,b)whereforce(x,y)=forcex+forceyinstanceStricta=>Strict(Arga)whereforce=force.unArginstanceStricta=>Strict[a]whereforce=sum.mapforceinstanceStricta=>Strict(Absa)whereforce=force.absBodyinstanceStrictTokenwhere-- TODO: This is just a dummy instance. Why can't we just use the-- NFData derivation provided by Drift?force=(`seq`0)infixr0$!!($!!)::Stricta=>(a->b)->a->bf$!!x=forcex`seq`fxstrict::Stricta=>a->astrictx=id$!!x