generics - Existentials and Scrap your Boilerplate -


I am writing an XML (serializer) serializer, text. Xml Lightweight and your boilerplate (et) scrap and so far I have got the code to work for "normal" ADT, but I am stuck in decrying the existence.

I found an existential data type

  data data box where databases :: (D Show, eC D, Data D) => D -> Data box  

and I am trying to compile it

  Example data data box where gfoldl kz (DataBox d) = z databox `KD guns Kzc = K (zDataBox) - Not rightConstost (Data Box D) = toConstr d Datatypeoff (Data Box D) = Datatype Off D  

But I can not understand how Gongold DataBox for .

error message is

  text / XML / generic HS: 274: 23: type variable `B 'in ambiguous barriers:` data in text / XML / generic HS 'Ek b' generated from the use of 'box': 274: 23-29 'XML / generic HS: 274: 23-29 arising out of' data box 'using' Kashmir 'on text / XML / generic HS Revenue generated 'Data B' Potential Quantity: Add a Type Signature A., who complain about the correct variable type (S)  

It is not able to understand the data type of b .

I'm also trying to implement Datacast 1 and Datasheet Ast2 but I think I can live without them (ie. Wrong implementation).

I think my questions are:

  1. Is it possible to add existence with your boilerplate scrap?
  2. If so: How do you apply the gun to an existential data type?

Is it possible to combine your boilerplate with grapes with scraps? ?

I think you will need to ask Haskell Cafe @ This is probably a research question.


Comments