[Haskell-cafe] [ghc-proposals/cafe] Partially applied type families

David Menendez dave at zednenem.com
Wed May 24 16:02:47 UTC 2017


On Wed, May 24, 2017 at 3:13 AM, Anthony Clayden
<anthony_clayden at clear.net.nz> wrote:
>
> > On Wed May 24 02:33:46 UTC 2017, Richard Eisenberg wrote:
>
> > I agree here, but it's a bit subtler.
> > We aren't confused when we see
> >
> > > f [] = False
> > > f _  = True
>
> Oh, yes I think a lot of people are confused.
> I think they expect the second equation
> is equivalent to:
>
> > f (x:xs) = True
>
> Maybe even
>
> > f ~(x:xs) = True
>
> But in the presence of bottom,
> that's a dangerous delusion.

I would argue those are equivalent. To get to the second equation, you
would have had to reject the first equation, so at that point you
already know the argument isn’t bottom.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>


More information about the Haskell-Cafe mailing list