Running a compiled Haskell program: -
data figura = circulo float | rectangulo float float esredondo :: figura -> bool esredondo (circulo _) = true esredondo (rectangulo _ _) = false area :: figura -> float area (circulo r) = pi*r*r area (rectangulo h b) = h*b
i error : the functionmain' not defined in module `main'
if want create runnable executable, need define main :: io (), executed when programme run.
haskell
No comments:
Post a Comment