[Haskell-cafe] two type-level programming questions

Ryan Ingram ryani.spam at gmail.com
Thu Dec 4 18:31:38 EST 2008

Sort of.  I believe you can use type equality constraints to replace
the use of TypeCast; that is, in any code that looks like:

> instance TypeCast a HTrue => ...

you can write

> instance (a ~ HTrue) => ...

(at least, it has worked for me that way)

This at least makes me feel a bit more monadic (warm & fuzzy!) than
the indecipherable magic that is the declaration of

  -- ryan

On Thu, Dec 4, 2008 at 3:09 PM, Nicolas Frisby <nicolas.frisby at gmail.com> wrote:
> 1) Type families, associated types, synonyms... can anything replace
> the use of TypeCast for explicit instance selection? Section 2, bullet
> 4 of http://www.haskell.org/haskellwiki/GHC/AdvancedOverlap indicates
> a negative response. Any other ideas?
> 2) Any progress/options for kind polymorphism in instances?
> Thanks for your time.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list