Live data from Hacker News

A primer on the cruel, tacit laws of type-level programming in Haskell

aymannadeem.com

61–69 of 69 posts

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#63

Kinds in Haskell seem to be evolving in the direction of controlling the representation of datatypes in memory. * (also called Type) is the kind of types whose values are "lifted": they can be lazy computations which might cause an infinite loop, throw an exception, and so on. There are also kinds for types whose values are "unlifted", meaning they really correspond to actual values in memory, not lazy thunks. Right…

I'm not sure that "evolving" is the right phrase - unlifted types have always been a part of low-level (generally compiler-specific) Haskell.

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#64
post #3

Holy 6MB 2,046px × 1,416px image, Batman!

Yep. Multiples of them totalling 35.4MB of pointless, bandwidth-sucking stupidity.

a testimony on the need to train people to think about memory with lazy fp ?

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#65

Earlier quoted context omitted.

Yep. Multiples of them totalling 35.4MB of pointless, bandwidth-sucking stupidity.

a testimony on the need to train people to think about memory with lazy fp ?

If by that you mean lazily as in functional programming, I don't see that would help.

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#66

Earlier quoted context omitted.

a testimony on the need to train people to think about memory with lazy fp ?

If by that you mean lazily as in functional programming, I don't see that would help.

OK, I get it finally. Bit thick today! Upvoted.

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#67
post #50

There seems to be a nigh-irresistible urge for people, when explaining type systems, to pick examples that are absolutely useless. None of the types in the theme here make much sense. They are arbitrary. The contribution to writing a robust program is questionable and they don't do much to explain concepts. May as well stick with classic "Goats are mammals; that should be enough to get you going with OOP" examples, a…

That's a problem with the domain itself. Type system examples can be two of: short, concrete, well-motivated. Short concrete examples don't have time for motivation; concrete well-motivated examples require lots of text (or else are unreadable); and short well-motivated examples are forced to be highly abstract.

There's no substitute for actually encountering a real-world problem which makes you want/need type-level programming. The article makes the sensible choice of not trying to invent one for you. I don't think it should be bemoaned for that.

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#68

Earlier quoted context omitted.

If by that you mean lazily as in functional programming, I don't see that would help.

OK, I get it finally. Bit thick today! Upvoted.

no worries, humorous comments are not the first expectation on HN

have a nice day

Re: A primer on the cruel, tacit laws of type-level programming in Haskell

#69

Kinds in Haskell seem to be evolving in the direction of controlling the representation of datatypes in memory. * (also called Type) is the kind of types whose values are "lifted": they can be lazy computations which might cause an infinite loop, throw an exception, and so on. There are also kinds for types whose values are "unlifted", meaning they really correspond to actual values in memory, not lazy thunks. Right…

Can't you just add bang patterns, use deepseq or use the strict/strictdata extension?
Post reply on HN