Permalink
Browse files

Versão inicial.

  • Loading branch information...
marcotmarcot committed Nov 14, 2012
0 parents commit e70c2c51f4c73f9347df2f96c62216f9d45798bb
Showing with 1,227 additions and 0 deletions.
  1. +13 −0 .gitignore
  2. +31 −0 abstract.tex
  3. +3 −0 agradecimentos.tex
  4. +1 −0 dedicatoria.tex
  5. +104 −0 marcot.bib
  6. +1,040 −0 marcot.tex
  7. +35 −0 resumo.tex
@@ -0,0 +1,13 @@
+*~
+*.aux
+*.bbl
+*.blg
+*.lof
+*.log
+*.lot
+*.out
+*.toc
+*.bst
+*.cls
+*.dtx
+*.ins
@@ -0,0 +1,31 @@
+The Haskell module system aims for simplicity and has a notable
+advantage of being easy to learn and use. However, type class
+instances in Haskell are always exported and imported between
+modules. This breaches uniformity and simplicity of the module system
+and introduces practical problems. Instances created in different modules can
+conflict with each other, and can make it impossible to import two
+modules that contain the same instance definitions if this instance is used. Because of
+this, it is very incovenient to define two distinct instances of the same type class
+for the same type in a program. The
+definition of instances in modules where neither the data type nor the type class are
+defined, called orphan instances, became a bad practice. Only
+these instances can cause conflicts since, if instances are
+defined in the same module of the type or of the type class, only
+one instance can possibly exist for each pair of class and type.
+
+In this dissertation we present and discuss a solution to these problems that
+simply allows control over importation and exportation of instances between
+modules, through a small change in the language. The solution is
+presented in two versions. The final version, more consistent, is not
+compatible with Haskell, that is, Haskell programs may not work
+with this change. The intermediate version, on the other hand, brings the
+benefits of the proposal while being compatible with Haskell, but it is
+less consistent. In order to avoid very long
+names for instances in module importation and exportation control lists, we propose another small change in the language to make it possible
+to give shorter names to instances.
+
+We also show how a formal specification of the module system must be
+adapted to include our proposal. As the formal specification didn't
+handle instances in general, we first adapt this specification to handle instances, and then show how our proposal can be formally specified.
+
+\keywords{Type class instances, Modules, Haskell}
@@ -0,0 +1,3 @@
+I would like to thank everyone that, in some way, contributed to the development
+of this dissertation. They are Lucília Camarão, Rafael Almeida, Gláuber Cabral,
+Atze Dijkstra, Fernando Pereira and specially my advisor Carlos Camarão.
@@ -0,0 +1 @@
+I dedicate this work to my wife, Ifé.
@@ -0,0 +1,104 @@
+@INPROCEEDINGS{formal,
+ author = {I. Diatchki and M. Jones and T. Hallgren},
+ title = {A formal specification of the Haskell 98 module system},
+ booktitle = {Proc. of the 2002 Haskell Workshop},
+ year = {2002}}
+
+@ARTICLE{scoped,
+ author = {A. Dijkstra and others},
+ title = {Modelling Scoped Instances with Constraint Handling Rules},
+ note = {\url{http://www.cs.uu.nl/wiki/bin/viewfile/Ehc/ModellingScopedInstancesWithConstraintHandlingRules?rev=1.1;filename=20070406-2213-icfp07-chr-locinst.pdf}},
+ publisher = {Universiteit Utrecht},
+ year = {2007}
+}
+
+@INPROCEEDINGS{modular,
+ author = {D. Dreyer and others},
+ title = {Module Type Classes},
+ booktitle = {SIGPLAN Notices},
+ pages = {63-70},
+ year = {2007},
+ volume = {42},
+ number = {1}
+}
+
+@INPROCEEDINGS{tch,
+ author = {C. V. Hall and others},
+ title = {Type classes in Haskell},
+ booktitle = {ACM Transactions on Programming Languages and Systems},
+ volume = {18},
+ number = {2},
+ pages = {109-138},
+ year = {1996}
+}
+
+@TECHREPORT{named,
+ author = {W. Kahl and J. Scheffczyk},
+ title = {Named Instances for Haskell Type Class},
+ booktitle = {Preliminary Proc. of the 2001 ACM SIGPLAN Haskell Workshop},
+ number = {UU-CS-2001-62},
+ year = {2001},
+ institution = {Universiteit Utrecht}
+}
+
+@INPROCEEDINGS{claims,
+ author = {S. Markstrum},
+ title = {Staking Claims: A History of Programming Language Design Claims and Evidence (A Positional Work in Progress)},
+ booktitle = {Proc of the Workshop on Evaluation and Usability of Programming Languages and Tools},
+ year = {2010}
+}
+
+@book{report,
+ editor = {S. Marlow},
+ title = {Haskell 2010: Language Report},
+ note = {\url{http://www.haskell.org/onlinereport/haskell2010/}},
+ year = {2010}
+}
+
+@TECHREPORT{sml,
+ author = {R. Milner and M. Tofte and R. Harper},
+ title = {The Definition of Standards ML, version 2},
+ number = {ECS-LFCS-88-62},
+ institution = {Edinburgh University, Computer Science Dept.},
+ year = {1988}
+}
+
+@TECHREPORT{scala,
+ author = {M. Odersky and others},
+ title = {An overview of the Scala programming language},
+ number = {IC/2004/64},
+ institution = {École Polytechnique Fédérale de Lausanne},
+ year = {2004}
+}
+
+@INPROCEEDINGS{tc,
+ author = {S. {Peyton Jones} and M. Jones and E. Meijer},
+ title = {Type classes: An exploration of the design space},
+ booktitle = {Haskell Workshop},
+ year = {1997}
+}
+
+@BOOK{pierce,
+ author = {B. C. Pierce},
+ title = {Types and Programming Languages},
+ publisher = {The MIT Press},
+ year = {2002}
+}
+
+@INPROCEEDINGS{wadler,
+ author = {P. Wadler and S. Blott},
+ title = {How to make ad-hoc polymorphism less ad hoc},
+ booktitle = {Proc of the 16th ACM Symposium on Principles of Programming Languages},
+ pages = {60-76},
+ year = {1989}
+}
+
+@INPROCEEDINGS{history,
+ author = {P. Hudak and others},
+ year = {2007},
+ title = {A history of {Haskell}: Being lazy with class},
+ booktitle = {HOPL-III: Proc. 3rd ACM SIGPLAN Conf. History of Programming Languages},
+ publisher = {ACM Press},
+ address = {San Diego, CA, USA},
+ pages = {1-55}
+}
Oops, something went wrong.

0 comments on commit e70c2c5

Please sign in to comment.