+instance VariableSet (HConcat (HMap ApplyMentionedVarsOf es)) =>
+ MentionedVars (CommonSetOp es) where
+ type MentionedVarsOf (CommonSetOp es)
+ = HConcat (HMap ApplyMentionedVarsOf es)
+
+data TrendOp vn a
+ = Trend !(Variable vn) !a
+ | TrendNan !(Variable vn) !a
+ deriving (Show, Eq, Ord)
+instance (VarName vn, Expr a) => Expr (TrendOp vn a)
+instance (VarName vn, CommonExpr a) => CommonExpr (TrendOp vn a)
+instance (VarName vn, MentionedVars a) => MentionedVars (TrendOp vn a) where
+ type MentionedVarsOf (TrendOp vn a) = vn :*: MentionedVarsOf a
+
+data VariableShiftPredictOp ss w vn
+ = VariableShiftPredictAverage !ss !w !(Variable vn)
+ | VariableShiftPredictSigma !ss !w !(Variable vn)
+ deriving (Show, Eq, Ord)
+instance (ExprSet ss, Expr w, VarName vn)
+ => Expr (VariableShiftPredictOp ss w vn)
+instance (CommonExprSet ss, CommonExpr w, VarName vn)
+ => CommonExpr (VariableShiftPredictOp ss w vn)
+instance ( VarName vn
+ , VariableSet (MentionedVarsOf ss :++: MentionedVarsOf w)
+ ) => MentionedVars (VariableShiftPredictOp ss w vn) where
+ type MentionedVarsOf (VariableShiftPredictOp ss w vn)
+ = vn :*: (MentionedVarsOf ss :++: MentionedVarsOf w)