ghclive-0.1.0.1: cache/Helper.hs
module Helper where
{-
hint requires that setTopLevelModules be given only interpreted modules
Thus this file exists to import Diagrams and Blaze and still be interpreted
-}
import Diagrams.Backend.SVG
import Diagrams.Prelude
import Network.Web.GHCLive.Display
import Text.Blaze.Internal
import Prelude
spike :: Trail R2
spike = fromOffsets . map r2 $ [(1,3), (1,-3)]
burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike
colors = cycle [aqua, orange, deeppink, blueviolet, crimson, darkgreen]
example :: Diagram Diagrams.Backend.SVG.SVG R2
example = lw 1.0 . mconcat . zipWith lc colors . map stroke . explodeTrail origin $ burst
starburst = renderDia SVG (SVGOptions "output.file" (Dims 200 200)) example
dia :: Diagram Diagrams.Backend.SVG.SVG R2 -> Diagram Diagrams.Backend.SVG.SVG R2
dia = id