I understand that Haskell tries to do something more beneficial than simply throwing an error when one does division by zero
test :: Int -> Int -> String
test a b = case a/b of
Infinity -> "fool"
x -> Show x
However i was told my ghc that Infinity
is not a data constructor. What is it actually and how can i make use of it? I don't want to simply check b
for 0