Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- makeEncoder :: Name -> ExpQ
- makeConstructorsEncoder :: [Con] -> ExpQ
- makeMatchClause :: [Name] -> [Type] -> Con -> MatchQ
Documentation
makeEncoder :: Name -> ExpQ Source #
Make an Encoder for a given data type Usage: $(makeEncoder ''MyDataType) <: otherEncoders
makeConstructorsEncoder :: [Con] -> ExpQ Source #
makeMatchClause :: [Name] -> [Type] -> Con -> MatchQ Source #
Make the match clause for a constructor given - the list of all the encoder types - the constructor name - the constructor index in the list of all the constructors for the encoded data type T1 a0 a1 ... -> encodeConstructor ce o (FromConstructor names types cName fieldNames values)