úÎNŽFîF      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE,Equation solver and calculator ā la metafont(c) Kristof Bastiaensen, 2015BSD-3kristof@resonata.beunstableghcNone+036BFX,NA monad for solving equations. Basicly just a state and exception monad over  and .fA monad transformer for solving equations. Basicly just a state and exception monad transformer over  and .An error type for <, = and /:iThe equation was reduced to the redundant equation `0 == 0`, which means it doesn't add any information.The equation was reduced to the impossible equation `a == 0` for nonzero a, which means the equation is inconsistent with previous equations.9The variable is defined but dependend an other variables.The variable is not defined.ŽThis hidden datatype represents a system of equations. It contains linear dependencies on variables as well as nonlinear equations. The following terminology is used from metafont:known variable/: A variable who's dependency is just a number.dependend variable7: A variable which depends linearly on other variables.independend variable: any other variable.A  dependend# variable can only depend on other  independend§ variables. Nonlinear equations will be simplified by substituting and evaluating known variables, or by reducing some trigonometric equations to linear equations.F An angular function of the form c + n*sin(theta + alpha) where theta, and n are linear terms, alpha and c are constants.8A linear expression of several variables. For example:  2*a + 3*b + 2 would be represented as LinExpr 2 [(a, 2), (b, 3)]. LA mathematical expression of several variables. Several Numeric instances (G, H and I,) are provided, so doing calculations over   is more convenient. cA simplified datatype representing an expression. This can be used to inspect the structure of a  , which is hidden.'+The expression contains the given variable.( Convert an   to a  .):evaluate a simple expression using the given substitution.*+Make a expression from a simple expression.+6Evaluate the expression given a variable substitution.,$Create an expression from a constant-$Create an expression from a variable.An empty system of equations./addEquation d e: Add the equation e = 0 to the system d.0ĢEliminate an variable from the equations. Returns the eliminated equations. Before elimination it performs substitution to minimize the number of eliminated equations. Important;: this function is still experimental and mostly untested.12Return True if the variable is known or dependend.27Return all dependend variables with their dependencies.3Return all known variables.4mReturn the value of the variable, or a list of variables it depends on. Only linear dependencies are shown.5Return all nonlinear equations e_i, where e_i = 0.6>Show all variables and equations. Useful in combination with E.7AGet the dependencies from a state monad. Specialized version of J.83Return the value of the variable or throw an error.9Monadic version of 1.:Monadic version of 4.;Monadic version of 0.<(Make the expressions on both sides equal=qMake the pairs of expressions on both sides equal. No error is signaled if the equation for one of the sides is  Redundant" for example in (x, 0) == (y, 0).>Succeed even when trowing a  error.?run the solver.@aReturn the result of solving the equations, or throw the error as an exception. Monadic version.AIReturn the result of solving the equations or an error. Monadic version.BIRun the solver and return the dependencies or an error. Monadic version.COReturn the result of solving the equations, or throw the error as an exception.D7Return the result of solving the equations or an error.E7Run the solver and return the dependencies or an error.K@A simple String wrapper, which will print formulas more cleanly.”LMNOFPQRSTUVW X  !"#$%YZ[&\]^'_`a(bc)*+d,-efghijklmnopqrstuvwxyz.{|}~/€‚0ƒ„…†‡123456789:;<=>?@ABCDEˆ‰Š‹ŒŽ‘’K“”•–—F  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF   "! #%$ -,+*()'./043152<=78:9;>?DEC6&AB@rLMNOFPSRQTUVW X  "! #%$YZ[&\]^'_`a(bc)*+d,-efghijklmnopqrstuvwxyz.{|}~/€‚0ƒ„…†‡123456789:;<=>?@ABCDEˆ‰Š‹ŒŽ‘’K“”•–—<=˜        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIGJKGLMNOPQ RSTUVWXYZ[ \]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š› mfsolve-0.3.0 Math.MFSolveMFSolver MFSolverTDepError RedundantEqInconsistentEq UnknownVar UndefinedVar DependenciesLinExprExpr SimpleVar SimpleExprConstVarSEUnSEBinUnaryOpAtanAcoshAsinhAcosAsinSinhTanAtanhCoshCosLogExpSignumRecipAbsSinBinaryOpMulAdd runSolverThasVartoSimple evalSimple fromSimpleevalExpr makeConstant makeVariablenoDeps addEquation eliminate varDefined dependendVars knownVarsgetKnown nonlinearEqsshowVars dependenciesgetValue varDefinedM getKnownM eliminateM====&=ignore runSolver unsafeSolveT evalSolverT execSolverT unsafeSolve evalSolver execSolver LinearMapbaseGHC.NumNum GHC.FloatFloatingGHC.Real Fractional mtl-2.2.1Control.Monad.State.Classget$fShowSimpleVarTrigEq2TrigEq NonLinExprSinExpMulExpUnaryAppTrigTerm AmplitudePhasePeriodLinearEConstELConst withParens addSimpleseHasVar linToSimple trigToSimplenonlinToSimpleevalBinevalUnzeroTermtrigExpr nonlinExprisConstlinVarsaddLinaddExprmerge addTrigTerms addTrigTermtermIsMultiple compareTerm compareBy mulLinExpr mulConstTrig mulLinTrigmulExprsinExprunExpr substVarLinsubstVarNonLin substVarTrigsubst simpleSubst trigToExpr trig2ToExpraddEqsselectsubstDepaddEq0 deleteDep reArrange reArrangeTrigelimTrigdmodsplitMax$fShowDepError$fShowDependencies$fFloatingExpr$fFractionalExpr $fNumExpr $fShowUnaryOp$fShowBinaryOp$fShowSimpleExpr$fMonadTransMFSolverT $fShowExpr$fExceptionDepError$fHashableSimpleVar$fHashableExpr$fHashableUnaryOp$fHashableNonLinExpr$fHashableLinExpr