diff options
Diffstat (limited to '')
-rw-r--r-- | cwality-maps/Substitute.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cwality-maps/Substitute.hs b/cwality-maps/Substitute.hs index 65e8fc3..ccab272 100644 --- a/cwality-maps/Substitute.hs +++ b/cwality-maps/Substitute.hs @@ -53,7 +53,12 @@ trivial :: t -> b -> ([a], t) trivial = const . ([],) instance {-# OVERLAPS #-} Substitutable A.Value where - substitute = trivial + substitute (A.Object fields) params = + second A.Object $ traverse (`substitute` params) fields + substitute (A.String str) params = + second A.String $ substitute str params + substitute other params = ([], other) + instance Substitutable Int where substitute = trivial |