two type-level programming questions
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.
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 TypeCast/TypeCast'/TypeCast'' -- ryan On Thu, Dec 4, 2008 at 3:09 PM, Nicolas Frisby <nicolas.frisby@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@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
See slide 40 of "Weaing the Hair Shirt: A Retrospective on Haskell", Simon Peyton-Jones, POPL 2003 http://research.microsoft.com/Users/simonpj/papers/haskell-retrospective/ind... -- ryan On Thu, Dec 4, 2008 at 7:04 PM, Jason Dusek <jason.dusek@gmail.com> wrote:
More monadic?
-- _jsn
participants (3)
-
Jason Dusek -
Nicolas Frisby -
Ryan Ingram