dsls with fold algebras

Download DSLs with fold algebras

If you can't read please download the document

Post on 27-Nov-2014




2 download

Embed Size (px)


This presentation shows how to use "fold algebras" to implement a toy DSL for paths


  • 1. Writing a DSL witha Fold-AlgebraScalaSyd

2. OverviewThe expression problemFold-algebrasFile pathsDSLs tips and tricksScala types 3. Ive had this problemResultFailure Success PendingConsole HtmlScreenshot?Pdf? 4. The Expression ProblemAdd(Lit(1), Lit(2)) 5. The Expression Problem 6. The Expression Problem 7. Solved in Java?!? 8. Data as an ADT 9. List as a fold 10. List as a fold 11. Data types encodingsList[A] = Nil + (A, List[A])F[A] -> ANil + (A, List[A]) -> A(Nil -> A, (A, List[A]) -> A) 12. A Fold-algebra for directoriesName Name Name Name 13. A Fold-algebra for directories 14. A DSL for directories 15. Whats in a name? 16. Whats in a name? 17. A DSL for directories 18. A DSL for directories 19. A DSL for directories 20. A Fold-algebra for files 21. A DSL for files 22. A DSL for files 23. A Fold-algebra for paths 24. A Fold-algebra for paths 25. A DSL for relative paths 26. A DSL for relative paths 27. A DSL for relative paths 28. A DSL for relative paths 29. A DSL for relative paths 30. A DSL for relative paths 31. ConclusionPapers! Play!Present at!3Ps