Permalink
Browse files

changed 'literal' to 'value'

  • Loading branch information...
1 parent 1939210 commit 031c129e231783bc12c7243d50b2316a3d3865ae @shangaslammi shangaslammi committed Dec 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 2011/2011-12-27-template-haskell.md
@@ -113,7 +113,7 @@ Finally, we declare the `Show` instance itself with a declaration quotation.
As you can see, the Template Haskell language extension makes the `$` operator context sensitive. In order to use it as a function application operator (like in `map ($ x)`, it needs to be surrounded by space, otherwise it is interpreted as a splicing operator by Template Haskell (as in `$showFields`).
-Other than having to prefix the identifier with `$`, you can treat `showFields` just like any other list literal. Here we map over the list, and pass `x` (which is the record object we are trying to show) to each function in the list. This results in a list of strings, which we intercalate with the separator `", "`.
+Other than having to prefix the identifier with `$`, you can treat `showFields` just like any other list value. Here we map over the list, and pass `x` (which is the record object we are trying to show) to each function in the list. This results in a list of strings, which we intercalate with the separator `", "`.
Now we have a custom Show-macro that can be used to print out the fields of any record type.

0 comments on commit 031c129

Please sign in to comment.