[Haskell-cafe] Hiding type variables from the signature?

Ignat Insarov kindaro at gmail.com
Tue May 31 10:06:41 UTC 2022


Alright, I managed to circumvent this problem by adding more type classes with
functional dependencies.

Problematic version, for reference:
https://gist.github.com/kindaro/6056f753bcf356ced96b817fee72533c/335e4399f50c74da59e033c2c4fa3551a2e6491e

Current version:
https://gist.github.com/kindaro/6056f753bcf356ced96b817fee72533c/b556f85589a8e12d104a2cc6a46a917679128735

```Haskell
fmapz
  :: forall peels seed seed'.
  Functors seed seed' peels
  => (seed -> seed') -> Dress seed peels -> Dress seed' peels
fmapz function = stretch . fmap @(Squeezed peels) function . squeeze
```

— Much more better!


More information about the Haskell-Cafe mailing list