Remix.run Logo
whateveracct 2 days ago

Actually, the IO monad in haskell desugars to

RealWorld -> (a, RealWorld)

Where RealWorld is a "token" that is just meant to be threaded through. You cannot create one yourself, so you have to be given one.

Thus, that function argument colors IO. Every PL feature is just an extension to System F.

jerf 2 days ago | parent [-]

As I said to another comment, this isn't a place for architecture astronautics or squinting until one thing looks like another. It's all assembler under the hood in the end and that language not only doesn't have color, it doesn't have types in any practical sense of the term. At the level of Haskell itself, IO is a color and IO is not a function argument. The compiled code is all assembler. The Haskell may itself be an interpreter for a language that has no color. Above it there is no color, below it it may be implementing something without colors, but at the level of Haskell itself, IO is a color.

tome 2 days ago | parent | next [-]

In Bluefin, IOE (which allows you to do I/O, i.e. what Haskell's IO also allows you to do) is an argument, and therefore not a color under your interpretation.

https://hackage.haskell.org/package/bluefin-0.0.7.0/docs/Blu...

mitxela 3 hours ago | parent [-]

You mean under TFA's interpretation?

tome 2 hours ago | parent [-]

What's the difference?

mitxela an hour ago | parent [-]

Person you replied to said colour is language specific, not preserved by compilation (or decompilation), and I think you'd agree with that.

whateveracct 2 days ago | parent | prev [-]

it is all assembly under the hood but it's also all lambda calculus under the hood