moduleAgda.TypeChecking.Rules.LHS.ProblemwhereimportControl.Monad.ErrorimportData.MonoidimportAgda.Syntax.CommonimportAgda.Syntax.LiteralimportAgda.Syntax.PositionimportAgda.Syntax.InternalimportAgda.Syntax.Internal.PatternimportqualifiedAgda.Syntax.AbstractasAimportAgda.TypeChecking.SubstituteimportAgda.Utils.PermutationtypeSubstitution=[MaybeTerm]typeFlexibleVars=[Nat]dataProblem'p=Problem{problemInPat::[NamedArgA.Pattern],problemOutPat::p,problemTel::Telescope}dataFocus=Focus{focusCon::QName,focusConArgs::[NamedArgA.Pattern],focusRange::Range,focusOutPat::OneHolePatterns,focusHoleIx::Int-- ^ index of focused variable in the out patterns,focusDatatype::QName,focusParams::[ArgTerm],focusIndices::[ArgTerm],focusType::Type-- type of variable we are splitting, kept for record patterns (Andreas, 2010-09-09)}|LitFocusLiteralOneHolePatternsIntTypedataSplitProblem=SplitProblemPart[Name](ArgFocus)(AbsProblemPart)-- ^ the [Name]s give the as-bindings for the focusdataSplitError=NothingToSplit|SplitPanicStringtypeProblemPart=Problem'()instanceRaise(Problem'p)whereraiseFrommkp=p{problemTel=raiseFrommk$problemTelp}renameFrommkp=p{problemTel=renameFrommk$problemTelp}-- | The permutation should permute @allHoles@ of the patterns to correspond to-- the abstract patterns in the problem.typeProblem=Problem'(Permutation,[ArgPattern])instanceErrorSplitErrorwherenoMsg=NothingToSplitstrMsg=SplitPanicinstanceMonoidp=>Monoid(Problem'p)wheremempty=Problem[]memptyEmptyTelProblemps1qs1tel1`mappend`Problemps2qs2tel2=Problem(ps1++ps2)(mappendqs1qs2)(abstracttel1tel2)