Quasiquotation - Paper discussion
From doing these activities students will
- Discuss Quasiquotation as a tool for extending the haskell compiler with custom concrete syntax
In class Announcements - 5 min (9:00 ~ 9:05)
Warm-up activity - 10 min (9:05 ~ 9:15)
Go over the answers to the homework questions
- The haskell compiler cannot type check C code
- Anti-quotation introduces potential type holes -- look at the example in the 3rd paragraph of section 4.
- Quasiquotation can guarantee syntactic correctness (wellformed C AST in the Haskell ADT representation).
- If you had a C type checker implemented in Haskell and didn't quote any C types, then you could potentially guarantee C type-safety.
Groups and Roles
Scribes
- Take notes for your group to contribute to the wiki page for the discussion
- A head scribe will go and write a summary on that page for an extra credit point
Managers
- Keep track of time
- Make a role ticket on the Reading repo for everyone in your group
Ambassadors
- Presents the unified thoughts of their group
- Talks with instructors at the end about meta class management
Small group discussion - 30 min (9:15 ~ 9:45)
What extra work must the user do when using quasiquotation as in this paper instead of quasiquotation as in the Template Haskell paper?
What are the advantages and disadvantages of implemting an Embedded DSL by providing a function compile that maps strings into host language code implementing the DSL program?
What are the advantages and disadvantages of implementing an Embedded DSL as a combinator library?
What are the advantages and disadvantages of implementing an Embedded DSL using quasiquotation vs. the approach taken in Slideshow?
What are the advantages and disadvantages of implementing a DSL using quasiquotation vs. developing a stand-alone DSL?
Large group discussion - 20min (9:45 ~ 10:05)
Reconvene and go over answers.
Cool-down activity - 10 min (10:05 ~ 10:15)
All scribes will get together to start their wiki write up to be finished
at latest a week from today.
All managers will get together and make tickets for the course.
This can include the tickets from their group discussions as mentioned above,
a ticket to follow up on the scribe write up, and any other issues they
think will be helpful.
All ambassadors will get together with Matthew and Kathleen and discuss how they think
the day went, how they think the pacing went, what they are looking forward to, any
worries they might have about the class, etc.
Class Dismissed
Wednesday hw due on coding designing (instancing) a monad for a datastructure. Bring laptops to Wednesday's class if you can.