Skip to content
Tinkering around with staged metaprogramming
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
src
test
.gitignore
ChangeLog.md
LICENSE
README.md
Setup.hs
package.yaml
stack.yaml

README.md

staged

A repo for playing with staged metaprogramming in Haskell.

Links:

https://www.youtube.com/watch?v=AzJVFkm42zM&t=1995s

http://mpickering.github.io/posts/2019-02-14-stage-3.html

https://github.com/mpickering/three-level

http://okmij.org/ftp/meta-programming/index.html

https://www.nowpublishers.com/article/Details/PGL-038

https://markkarpov.com/tutorial/th.html

SPJ talk https://www.cl.cam.ac.uk/events/metaprog2016/Template-Haskell-Aug16.pptx

interesting error handling stuff.

Tim Sheard lecture web.cecs.pdx.edu/~sheard/course/AdvancedFP/notes/StagingInHaskell.pdf

GHC manual section https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#th-usage

staged interpeters

quotations splice - turns

lifting - cross stage persistance thorugh serialization?

typed template haskell as of ghc 7.8. Two levels only? no polymorphic lift.

Not necessarily connected, but often occur together - tagless final tagless final makes a dsl by replacing every constructor of your dsl data type by a method in a typeclass data FreeNum a = Add FreeNum FreeNum | Sub FreeNum | Pure a | Times FreeNum FreeNum | data FreeMonoid a = MAppend FreeMonoid FreeMonoid | Mempty | Pure a

->

class Num class Monoid etc.

sometimes your dsl includes binding forms, in which case everything gets a little more confusing.

The template haskell dump is in the .stack-work folder deep down dist/x86/Cabal/build/ src or exectutable in .dump-splices files

You can’t perform that action at this time.