Skip to content

Commit aaaa5af

Browse files
committed
Add deriving Show for outside changes.
1 parent ae680e5 commit aaaa5af

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/Jacobi.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ data Expr a = Sym !String
4343
| Prod [a]
4444
| UnOp !UOp !a
4545
| BinOp !BOp !a !a
46-
deriving ( Eq, Ord, Functor
46+
deriving ( Eq, Ord, Show, Functor
4747
, Foldable, Traversable
4848
)
4949
data BOp = Pow
@@ -198,9 +198,9 @@ evalConstant = \case
198198
Prod [] -> Just 1
199199
Prod es@(_:_) -> foldr1 (liftA2 (*)) es
200200
BinOp Pow e1 e2 -> liftA2 (**) e1 e2
201-
BinOp Sn e1 e2 -> fmap (\(x,_,_) -> x) $ liftA2 elljac_e e1 e2
202-
BinOp Cn e1 e2 -> fmap (\(_,x,_) -> x) $ liftA2 elljac_e e1 e2
203-
BinOp Dn e1 e2 -> fmap (\(_,_,x) -> x) $ liftA2 elljac_e e1 e2
201+
BinOp Sn e1 e2 -> fmap (\(x,_,_) -> x) $ liftA2 elljac_e e1 e2
202+
BinOp Cn e1 e2 -> fmap (\(_,x,_) -> x) $ liftA2 elljac_e e1 e2
203+
BinOp Dn e1 e2 -> fmap (\(_,_,x) -> x) $ liftA2 elljac_e e1 e2
204204
BinOp Diff _ _ -> Nothing
205205
BinOp Integral _ _ -> Nothing
206206
UnOp Sin e1 -> sin <$> e1
@@ -211,7 +211,7 @@ evalConstant = \case
211211
UnOp Ln _ -> Nothing
212212
Sym _ -> Nothing
213213
Const x -> Just x
214-
214+
215215
unsafeGetSubst :: Pattern Expr -> Subst -> ClassId
216216
unsafeGetSubst (NonVariablePattern _) _ = error "unsafeGetSubst: NonVariablePattern; expecting VariablePattern"
217217
unsafeGetSubst (VariablePattern v) subst = case IM.lookup v subst of

0 commit comments

Comments
 (0)