T7619.hs 249 Bytes
Newer Older
Joachim Breitner's avatar
Joachim Breitner committed
1 2 3 4 5 6 7 8 9 10 11 12
{-# LANGUAGE TypeFamilies #-}
module Main where
data family Foo a

data instance Foo Int = FooInt Int Int

foo :: Foo Int -> Int
foo (FooInt a 0) = 0
foo (FooInt a b) = foo (FooInt a (b-1))

main :: IO ()
main = foo (FooInt 0 10000) `seq` return ()