問題タブ [representable]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
69 参照

haskell - How to use the singletons library to define a HasRep instance for existentially quantified types?

I'd like to use existentially sized image windows for a couple of reasons:

  • I'd like to pack different size windows into the same list.
  • I'd like to make a Zip instance for my window type.

I'm using this code to do this:

#xA;

Now, I need to make a HasRep instance for my SomeWind type:

#xA;

I have a nagging hunch that I ought to be able to use the singletons library to help me replace the "???" above with a correct definition, but I can't figure out how.

Can anyone help?