Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Are you 1337 enough

Name: Anonymous 2008-09-23 22:37

This code does not compile.
Only the 1337est h4x0rz know the fix.

Name: Anonymous 2008-09-24 0:04

zomfg haskell!!! O_O

Name: Anonymous 2008-09-24 0:42

Fixed it.

class SuperClass a where
  set :: a -> a -> ()

instance SuperClass (Float,Float) where
  set (x,y) = () where _x = x; _y = y

class ChildClass (SuperClass a) where
  set :: a -> ()

instance ChildClass Int where
  set s = ()

main = do kid::ChildClass Int
          set 1.0 2.0
          return ()

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List