Help m understand...

f :: Void -> String
f _ = "WAT??"

f (error "Hey")

#haskell

Follow

@arialdo What do you want to understand? The function ignores its argument to produce String. It may as well be `f :: a -> String`.

The `error` argument isn't evaluated and so no actual errorirng happens.

@dpwiz I was not aware that Void was not completely void.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.