blob: d64073952b8c86a54c736969fa714bf8698ba0e9 (
plain)
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 ()
|