
1 Oct
2009
1 Oct
'09
4:17 a.m.
Peter Verswyvelen wrote:
I guess this is related to the expression problem. Suppose I have a datatype
*data Actor = Ball ... | Paddle ... | Wall ...*
and a function
*move (Ball ...) = * *move (Paddle ...) = * *move (Wall ...) = *
in Haskell one must put *Actor* and *move* into a single file.
Just a nitpick: you don't have to put Actor and move into the same module. module A where data Actor = Ball | Paddle | Wall module B where import A (Actor) move Ball = ... move Paddle = ... move Wall = ... But that's probably not what you meant. Regards, apfelmus -- http://apfelmus.nfshost.com