Typeable
12345678910
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Typeable
askQuestion :: (Typeable a, Typeable b) => b -> a -> b
askQuestion b a = case cast a of
(Just x) -> x
Nothing -> b
main = getLine >>= (print . askQuestion "Error")
Haskell
INFO