Revision d80e3485
b/htools/Ganeti/THH.hs | ||
---|---|---|
246 | 246 |
-- @ |
247 | 247 |
genToRaw :: Name -> Name -> Name -> [(String, Either String Name)] -> Q [Dec] |
248 | 248 |
genToRaw traw fname tname constructors = do |
249 |
sigt <- [t| $(conT tname) -> $(conT traw) |]
|
|
249 |
let sigt = AppT (AppT ArrowT (ConT tname)) (ConT traw)
|
|
250 | 250 |
-- the body clauses, matching on the constructor and returning the |
251 | 251 |
-- raw value |
252 | 252 |
clauses <- mapM (\(c, v) -> clause [recP (mkName c) []] |
Also available in: Unified diff