Permalink
Browse files

improve docs

  • Loading branch information...
1 parent 0afae16 commit 41d85c713873be917dee280b050a1e23b3558cc7 @mikeplus64 committed Dec 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/Data/Record.hs
View
6 src/Data/Record.hs
@@ -13,12 +13,18 @@ data Key k
key :: String -> Q Exp
key s = [| undefined :: Key $(litT . return . StrTyLit $ s) |]
+-- | See 'write'
+-- [set|x|] == write (undefined :: Key x)
set :: QuasiQuoter
set = QuasiQuoter { quoteExp = \s -> [| write $(key s) |], quoteType = undefined, quoteDec = undefined, quotePat = undefined }
+-- | See 'alter'
+-- > [alt|x|] == alter (undefined :: Key x)
alt :: QuasiQuoter
alt = QuasiQuoter { quoteExp = \s -> [| alter $(key s) |], quoteType = undefined, quoteDec = undefined, quotePat = undefined }
+-- | See 'access'.
+-- > [get|x|] == access (undefined :: Key x)
get :: QuasiQuoter
get = QuasiQuoter { quoteExp = \s -> [| access $(key s) |], quoteType = undefined, quoteDec = undefined, quotePat = undefined }

0 comments on commit 41d85c7

Please sign in to comment.