Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --various imports go here,
- data Record1' = Record1' {_name :: String}
- data Record2' = Record2' {_name :: String}
- fillBlanks :: String -> DecsQ
- fillBlanks input = wrangle ''(mkName x ++ ') defWrangleOpts{
- fieldLabelModifier = (\label -> x ++ ' ++ uppercaseFirst (init label)),
- typeNameModifier = (\name -> head name)}
- uppercaseFirst [] = []
- uppercaseFirst (c:cs) = toUpper c : cs
- fmap fillBlanks ["Record1", "Record2"]
- a = Record1{"Charlie"}
- print record1Name a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement