The code
rayTraceP (p2 (0, 0)) (r2 (1, 0)) (circle 1)
causes the error message
Could not deduce: V a0 ~ V2
from the context: (Traced a, TrailLike a, Transformable a,
V a ~ V2)
bound by the inferred type for βitβ:
forall a.
(Traced a, TrailLike a, Transformable a, V a ~ V2) =>
Maybe (Point (V a) (N a))
at <interactive>:1:1-44
The type variable βa0β is ambiguous
I can't figure out why this happens. It seems that rayTraceP is used similarly in the manual.
I use diagrams-cairo-1.4.1 .
This kind of error is usually caused by ambiguous types during type inference, and can be fixed by adding one or more type signatures. In this case I think the problem is most likely that it can't figure out what type the 'circle 1' call should have. If you show all the code I could give some better advice about where to add a type signature.
See section 5.5 of the user manual for more info: https://diagrams.github.io/doc/manual.html#tips-and-tricks