Skip to content

Instantly share code, notes, and snippets.

@reinh
Forked from sgrif/render.hs
Created May 2, 2014 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinh/5fac07623800a4856eeb to your computer and use it in GitHub Desktop.
Save reinh/5fac07623800a4856eeb to your computer and use it in GitHub Desktop.
class Renderable a where
render :: a -> IO ()
newtype Rectangle = Rectangle { width :: Double, height :: Double }
instance Renderable Rectangle where
render = undefined
newtype Circle = Circle { radius :: Double }
instance Renderable Circle where
render = undefined
renderEverything :: ??? -- Need to render an unknown number of renderables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment