[Haskell-cafe] Re: Typing with co/contra-variance.

apfelmus apfelmus at quantentunnel.de
Thu Apr 3 11:16:40 EDT 2008


Ben Lippmeier wrote:
> If I write an expression:
>  (if .. then 23 else "Erk")
> 
> In Haskell this would be an error, but perhaps I can assign it the type 
> 'Top' (or 'Any') and then use reflection ala Data.Dynamic to inspect the 
> type of this object at runtime and cast it back to something useful...
>
> can someone point me to a good paper?

I have absolutely no clue about the subject, but I would start a 
"bibliographic paper chase" with

   Philip Wadler, Robby Findler. Well-typed programs can't be blamed.
   http://homepages.inf.ed.ac.uk/wadler/topics/links.html#blame-icfp
   Talk slides from Bay FP meeting:
     http://bayfp.org/talks/slides/philip_wadler_1_jan_08_bayfp.pdf


Regards,
apfelmus



More information about the Haskell-Cafe mailing list