Difference between revisions of "Diagrams/FAQ"

From HaskellWiki
Jump to navigation Jump to search
(begin diagrams FAQ page)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Diagrams frequently asked questions.
 
Diagrams frequently asked questions.
  +
  +
== Miscellaneous ==
   
 
=== Can I render a diagram to the screen and then know which part of the diagram a user has clicked on? ===
 
=== Can I render a diagram to the screen and then know which part of the diagram a user has clicked on? ===
   
 
Yes. See the user manual section on [http://projects.haskell.org/diagrams/manual/diagrams-manual.html#using-queries using queries].
 
Yes. See the user manual section on [http://projects.haskell.org/diagrams/manual/diagrams-manual.html#using-queries using queries].
  +
  +
=== When I try to compile, the linking phase hangs eating CPU and never finishes ===
  +
  +
It seems this can be caused on OS X by a mixture of 32- and 64-bit libraries. For example see [http://code.google.com/p/diagrams/issues/detail?id=71 this bug report]. Ensure that your GHC and your gtk libraries are either both 32-bit or both 64-bit.
  +
  +
== Error messages ==
  +
  +
=== Couldn't match type `V (Point R2)' with `R2' ===
  +
  +
This is due to a bug in GHC. As a workaround, you can simply add the import
  +
  +
import Diagrams.Core.Points
  +
  +
to your file. See also [http://projects.haskell.org/diagrams/manual/diagrams-manual.html#couldn-t-match-type-v-p2-with-r2 the user manual].
  +
  +
[[Category:FAQ]]

Revision as of 21:09, 3 January 2013

Diagrams frequently asked questions.

Miscellaneous

Can I render a diagram to the screen and then know which part of the diagram a user has clicked on?

Yes. See the user manual section on using queries.

When I try to compile, the linking phase hangs eating CPU and never finishes

It seems this can be caused on OS X by a mixture of 32- and 64-bit libraries. For example see this bug report. Ensure that your GHC and your gtk libraries are either both 32-bit or both 64-bit.

Error messages

Couldn't match type `V (Point R2)' with `R2'

This is due to a bug in GHC. As a workaround, you can simply add the import

import Diagrams.Core.Points

to your file. See also the user manual.