[Haskell-cafe] Eta Reduction
haskell at nand.wakku.to
Wed Apr 2 20:32:36 UTC 2014
On Wed, 2 Apr 2014 09:51:46 -0400, Edward Kmett <ekmett at gmail.com> wrote:
> We're not storing the instance as a slot in the constructor, so this isn't.
> data Foo a where
> Foo :: Seq a => Int -> a -> Foo a
> or equivalently
> data Foo a = Seq a => Foo !Int !a
Why not? Say we define Seq to something like
> type family Seq (a :: *) :: Constraint where
> Seq (a -> b) = 1 ~ 0
> Seq t = ()
What would be the drawback in this scenario?
More information about the Haskell-Cafe