[Haskell-beginners] "type" declarations: utterly transparent synonyms?

Silent Leaf silent.leaf0 at gmail.com
Fri Jun 3 16:44:50 UTC 2016


I'd like to be sure when one defines a type with "type", it truly merely
creates a synonym, and no matter what one could replace the left side by
the right side in the whole program, and vice versa, and it wouldn't change
a thing in the actual meaning, value of the program.

Eg if i define:
type In2 t = t -> t -> t
I can thereafter replace for any type t, any signature like
f :: t -> t -> t
with
f :: In2 t
then strictly no consequence other than visual in the source code, by me,
will occur.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160603/b34b4bec/attachment.html>


More information about the Beginners mailing list