[Haskell-cafe] typeclasses considered unnecessary/the power of the @

Bardur Arantsson spam at scientician.net
Wed May 16 04:24:15 UTC 2018


On 2018-05-16 04:09, Anthony Clayden wrote:
> Haskell 98/2010 keeps a strict distinction between term-level syntax and
> tokens vs type-level.
> 
> With ExplicitTypeApplications that's being eased: there's a lightweight
> way to sneak a type expression into a term. And ghc's internal term
> language 'core' has had explicit type applications for many years.
> 
> Then consider a lightweight syntax using type applications in patterns
> to define typeclass instances by (pattern) 'matching' on types:
[--snip--]

An interesting post, but I don't see any mention of laws. This seems
like it could be an... issue.

(Not that we specify laws in the code anyway right now, but at least
there's some idea of a "thing" we can attach the laws to and where we
can document them.)

Regards,



More information about the Haskell-Cafe mailing list