User loginNavigation |
archivesInference of Polymorphic RecursionIn the following (Haskell) example, the type annotation on f :: a -> (Int, a)
f x = (g True, x)
g True = 0
g False = fst (f 'a') + fst (f 0)
main = do
print (fst (f True))
I can understand why in general, but I wonder if we could just decide to generalize arbitrarily in the order that declarations appear so that in this case the type of Thanks |
Browse archivesActive forum topics |
Recent comments
1 day 23 hours ago
2 days 8 min ago
3 days 4 hours ago
3 days 8 hours ago
3 days 10 hours ago
3 days 10 hours ago
4 weeks 3 days ago
5 weeks 5 hours ago
10 weeks 1 day ago
10 weeks 2 days ago