Skip to main content
gamedev.net
🔒 Locked

need help with haskell code

Started by fnm Sep 15, 2010 at 8:42 AM 0 replies 700+ views
Original Post
fnm
fnm
I'm trying to implement deformations in my sphere tracer. For some reason they dont work very well for me, so I looked for some code that implement them and I found this haskell program, which I intend to experiment with. Trying to compile it gives the following error:

rt.hs:18:24:
Couldn't match expected type Eval b' against inferred type ()'
In the first argument of parMap', namely rnf'
In the expression:
parMap
rnf (map (maybe (0, 0, 0) toRGB24 . rayTrace scene 100)) rays
In the definition of `colors':
colors = parMap
rnf (map (maybe (0, 0, 0) toRGB24 . rayTrace scene 100)) rays

The problem is I dont know nothing about haskell (nothing about functional programming), so can anybody help me make this program compile?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.