<div dir="ltr"><div>> But it works on concrete types, not functions.<br><br></div>Isn't the problem type variables, not functions?<br><span style="font-family:monospace,monospace"><br>Prelude Data.Typeable> :set -XScopedTypeVariables<br>Prelude Data.Typeable> let fun x = case x of {Just (i::Int) -> i + 1; Nothing -> 0}<br>Prelude Data.Typeable> :t fun<br>fun :: Maybe Int -> Int<br>Prelude Data.Typeable> typeOf fun<br>Maybe Int -> Int</span><br><br></div>