Commit 2063a102 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Fix name collision due to static-canvas

parent d9a607fb
...@@ -23,10 +23,10 @@ getUniqueName = do ...@@ -23,10 +23,10 @@ getUniqueName = do
putMVar uniqueCounter val' putMVar uniqueCounter val'
return $ pack $ "ihaskellStaticCanvasUniqueID" ++ show val return $ pack $ "ihaskellStaticCanvasUniqueID" ++ show val
data Canvas = Canvas { width :: Int, height :: Int, canvas :: CanvasFree () } data Canvas = Canvas { canvasWidth :: Int, canvasHeight :: Int, canvas :: CanvasFree () }
instance IHaskellDisplay Canvas where instance IHaskellDisplay Canvas where
display cnv = do display cnv = do
name <- getUniqueName name <- getUniqueName
let script = buildScript' (width cnv) (height cnv) name (canvas cnv) let script = buildScript' (canvasWidth cnv) (canvasHeight cnv) name (canvas cnv)
return $ Display [html $ unpack $ toLazyText script] return $ Display [html $ unpack $ toLazyText script]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment