[Haskell-beginners] How to avoid repeating a type restriction from a data constructor

gs voldermort at hotmail.com
Tue Apr 23 17:05:05 CEST 2013


In
http://code.accursoft.com/binding/src/c13ccbbec0ba8e326369ff2252863f20a891ef76/binding-core/src/Data/Binding/Simple.hs
there's a data constructor
    data Source v a = Variable v => Source {bindings :: v [Binding a], var
:: v a}
Source is used many times in this file and in
http://code.accursoft.com/binding/src/c13ccbbec0ba8e326369ff2252863f20a891ef76/binding-core/src/Data/Binding/List.hs,
and each time, I have to repeat the context Variable v. Is there any way to
avoid this redundancy?





More information about the Beginners mailing list