Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Geometry compiler error with polymorphic function #54

Open
sebastien opened this issue Dec 29, 2018 · 0 comments
Open

Geometry compiler error with polymorphic function #54

sebastien opened this issue Dec 29, 2018 · 0 comments

Comments

@sebastien
Copy link

This issue was mentioned by @doug-moen in the following thread: https://groups.google.com/forum/#!topic/curv/N99KRDfcmNU

The following code fails with a geometry compiler error:

let
rand1 x = x >> match [
    (x)   ->  frac(sin(x)*100000.0);
    (x,y) -> rand1(rand1(x) + rand1(y));
];
in
square >> colour ((x,y,z,t) -> sRGB.hue(rand1(x,y)))

and the error:

ERROR: Geometry Compiler: at field .colour: not a constant
at file "geom.curv":
2| rand1 x = x >> match [
                  ^^^^^^^
3|>    (x)   ->  frac(sin(x)*100000.0);
4|>    (x,y) -> rand1(rand1(x) + rand1(y));
5| ];
   ^ 
at file "geom.curv":
7| square >> colour ((x,y,z,t) -> sRGB.hue(rand1(x,y)))
                                           ^^^^^^^^^^  
at file "geom.curv":
7| square >> colour ((x,y,z,t) -> sRGB.hue(rand1(x,y)))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant