I want to associate _ with coerce yet I can't give a type signature to it.
Is there any trickery to get around that ?
import Data.Coerce
ok :: ()
ok =
let a = _ "hi"
in let a :: String = __ "Hi"
in ()
where
_ = undefined
__ :: Coercible a b => a -> b
__ = coerce
ko =
let a = _ "hi"
in let a :: String = __ "Hi"
in ()
where
__ = undefined
_ :: Coercible a b => a -> b. -- Invalid type signature: _ :: ... Should be of form <variable> :: <type>parser
_ = coerce