Safe Haskell | None |
---|
- class IsConvertableToIGC c => RunWith c where
- runSimple :: Eq a => (IGC a -> IGC a) -> IpeDrawing a -> IpeDrawing a
- runSimple' :: (IGC a -> b) -> IpeDrawing a -> b
- runSimpleIO :: (Eq a, Coordinate a) => (IGC a -> IGC a) -> FilePath -> IO (IpeDrawing a)
- runSimpleIO' :: (Eq a, Coordinate a) => (IGC a -> IGC a) -> FilePath -> FilePath -> IO ()
Documentation
class IsConvertableToIGC c => RunWith c whereSource
A class expressing that we can run a computation on the data stored in this part of the ipe drawing. A minimum implementation implements replaceIGC and extend.
replaceIGC :: Eq a => IGC a -> c a -> c aSource
given a IGC, replace whatever I'm storing with the contents of the IGC
extend :: Eq a => IGC a -> c a -> c aSource
add everything from the given IGC to whatever I'm storing allready.
runAndReplace :: Eq a => (IGC a -> IGC a) -> c a -> c aSource
Given a function, run the function on my contents, and replace my contents with the results.
runWith :: Eq a => (IGC a -> IGC a) -> c a -> c aSource
Given a function, run the computation on my contents, and replace my contents with te results.
runAndExtend :: Eq a => (IGC a -> IGC a) -> c a -> c aSource
Given a function, run the computation on my contents, and store the result together with the stuff I'm allready storing.
runSimple :: Eq a => (IGC a -> IGC a) -> IpeDrawing a -> IpeDrawing aSource
shorthand to run a computation on a given drawing, and extend the input drawing with the results
runSimple' :: (IGC a -> b) -> IpeDrawing a -> bSource
Run a computation on an Ipe drawing
runSimpleIO :: (Eq a, Coordinate a) => (IGC a -> IGC a) -> FilePath -> IO (IpeDrawing a)Source
Load an drawing from a file path, and run the given computation on it.
runSimpleIO' :: (Eq a, Coordinate a) => (IGC a -> IGC a) -> FilePath -> FilePath -> IO ()Source
runSimpleIO' f inPath outPath runs loads a drawing from inPath, runs function f on it, extending the drawing with the result. The resulting drawing is stored in as outPath.