Open Wojocom opened 7 years ago
Hmm. Does it work if you add a type annotation, like
Here is a square :
''' {.diagram}
example = square 1 :: Diagram B
'''
?
When I try type annotation I get this
Error while interpreting
example = square 1 :: Diagram B
/tmp/Diagram1804289383846930886.hs:11:11:
Couldn't match type ‘V B’ with ‘V2’
In the expression: square 1 :: Diagram B
In an equation for ‘example’: example = square 1 :: Diagram B
Thank you for the quick response. Is there a way to have a look into /tmp/Diagram1804289383846930886.hs. It seems to get deleted.
BTW, compiling the following with GHC works:
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
example = square 1 :: Diagram B
main = mainWith example
Hmm, can you try instead doing
example = square 1 :: QDiagram Cairo V2 Double Any
?
gives following error message:
Error while interpreting
with demo.md containing:
Use following package versions: