File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import Control.Exception
15
15
import qualified Data.Sequence as S
16
16
import Data.Sequence (Seq , (|>) , (><) )
17
17
import Data.Maybe
18
+ import Data.Monoid
18
19
import GHC.Exts (toList )
19
20
20
21
-- | A handy miscellaneous function to linearly map over a range of numbers in a given number of steps
@@ -30,6 +31,11 @@ data Matplotlib = Matplotlib {
30
31
, mpRest :: Seq MplotCommand -- ^ Computations that follow the one that is pending
31
32
}
32
33
34
+ -- | Monoid instance for Matplotlib type
35
+ instance Monoid Matplotlib where
36
+ mempty = mp
37
+ mappend = (%)
38
+
33
39
-- | A maplotlib command, right now we have a very shallow embedding essentially
34
40
-- dealing in strings containing python code as well as the ability to load
35
41
-- data. The loaded data should be a json object.
You can’t perform that action at this time.
0 commit comments