News for hackers. Stuff that matters.
Re:An Introduction to Type Level Programming in Haskell by iamevn on Thursday September 09, 2021 @07:10PM (#28475797)
> in a lot of cases, those types that I wrote will be replaced by more dynamic representation (e.g. strings) at some point. I would love to see a type system that lets me subtype string, restrict the domain, and automatically (with some hints from the programmer) get functions on my type based on string functions the compiler can prove would result in my type.

I've only seen type systems that work like this on numbers, and usually only a very few integers at that.

Re:An Introduction to Type Level Programming in Haskell by jkhdigital on Thursday September 09, 2021 @09:26PM (#28476757)
The formal notion of subtype seems to be getting some solid research attention; see e.g. https://drops.dagstuhl.de/opus/volltexte/2021/13888/pdf/LIPI...

Hopefully we see these ideas make their way into functional languages soon.