From 94432ed19968157e2f07c35421fa63e97dbec85f Mon Sep 17 00:00:00 2001 From: Efe Ariaroo Date: Thu, 14 Apr 2016 21:29:59 +0100 Subject: [PATCH] Typo and grammar fix at the line that first explains expression quotations. --- 2011/2011-12-27-template-haskell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2011/2011-12-27-template-haskell.md b/2011/2011-12-27-template-haskell.md index cdd3cb2..bab2686 100644 --- a/2011/2011-12-27-template-haskell.md +++ b/2011/2011-12-27-template-haskell.md @@ -10,7 +10,7 @@ The essence of Template Haskell is to write Haskell code that generates new Hask Quotations can be thought of as syntactic sugar for generating ASTs. There are several different kinds of quotations, depending on the context we are working in. -* Expression quotations are used for generating regular Haskell expressions, and the have the syntax `[|expression|]`. So for example `[|1+2|]` is syntactic sugar for the infix expression `InfixE (Just (LitE (IntegerL 1))) (VarE GHC.Num.+) (Just (LitE (IntegerL 2)))`. +* Expression quotations are used for generating regular Haskell expressions, and they have the syntax `[|expression|]`. For example, `[|1+2|]` is syntactic sugar for the infix expression `InfixE (Just (LitE (IntegerL 1))) (VarE GHC.Num.+) (Just (LitE (IntegerL 2)))`. * Declaration quotations are used for generating top-level declarations for constants, types, functions, instances etc. and use the syntax `[d|declaration|]`. Example: `[d|x = 5|]` results in `[ValD (VarP f) (NormalB (LitE (IntegerL 5))) []]`. Note that the quotation can contain multiple declarations, so it evaluates to a list of declaration values.