This doesn't work because 'm' and 'S m' aren't equal, but they're also not NOT equal, so Haskell never gets past the first clause of IsConstPlus:
twitter.com/fancytypes/status/

@cyrridven yeah you're gonna wanna recurse all the way down to the base case

@lambdagrrl honestly, if Haskell allows me two write infinite types like 'S (S (S ...))' then why not infinite pattern matches?

@lambdagrrl I've been wanting to actually try and construct one, 'cuz I think it should be possible if GHC can be persuaded not to unroll 'type family Inf where Inf = S Inf' too much.

@lambdagrrl I mean, Haskell was fine. It's just that we're trying to turn a cute little Hindley-Milner type system into EVERY. TYPE. SYSTEM.

Follow

@cyrridven "actually, Haskell is the name of the language conforming to the Haskell 98 Report. the name of the language compiled by GHC is 'Haskell's Monster'"

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!