Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created September 7, 2010 11:53
Show Gist options
  • Save snoyberg/568215 to your computer and use it in GitHub Desktop.
Save snoyberg/568215 to your computer and use it in GitHub Desktop.
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH.Syntax
main = $(return $(return $ InfixE
(Just $
(ConE $ mkName "VarE") `AppE`
((VarE $ mkName "mkName") `AppE` (LitE $ StringL "putStrLn")))
(ConE $ mkName "AppE")
(Just $
(ConE $ mkName "LitE") `AppE`
((ConE $ mkName "StringL") `AppE` (LitE $ StringL "Yo dawg")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment