I know it's somewhat evil (:P), but I was unable to implement the subsumption constraints (:<:) in a way that avoided it. It's there because I'm (ab)using the type-class system to do computation (specifically an O(n) search though long chain of coproducts for a specific constructor). E.g, determining Foo :<: Bar :+: Foo :+: Baz. There may be a way to rearrange the type level stuff to make it go away, perhaps with some new type extensions in 7.4 that I haven't studied extensively yet.
This is also a problem in Swierstra's original paper where he introduces this technique. In practice, it doesn't pose a problem, because you're not meant to define your own instances of :<: anyway, and you shouldn't care what order the constructors occur. Regards, Liam O'Connor On Sunday, 1 July 2012 at 6:37 PM, Krzysztof Skrzętnicki wrote: > Hello, > > This library looks very nice. Thank you for realeasing it! I realise it took > quite an effort to write it. > > Looking from examples on Github I noticed that you use > -XOverlappingInstances. Why do you need such extension? > > Best regards, > Krzysztof Skrzętnicki > > On Sun, Jul 1, 2012 at 10:17 AM, Liam O'Connor <[email protected] > (mailto:[email protected])> wrote: > > Hi all, > > > > wizards is an Haskell library designed for the quick and painless > > development of interrogative programs, which revolve around a "dialogue" > > with the user, who is asked a series of questions in a sequence much like > > an installation wizard. > > > > Everything from interactive system scripts, to installation wizards, to > > full-blown shells can be implemented with the support of wizards. > > > > It is developed transparently on top of a free monad (see Swierstra's > > excellent paper on this topic at > > http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf > > (http://www.cs.ru.nl/%7EW.Swierstra/Publications/DataTypesALaCarte.pdf)), > > which separates out the semantics of the program from the wizards > > interface. A variety of backends exist, including a full featured backend > > for Haskeline, a debug-friendly simpler implementation in terms of > > System.IO primitives, and a completely pure implementation modelled as a > > function from an input string to output. It is also possible to write your > > own backends, or extend the existing back-ends with new features. > > > > While both built-in IO backends operate on a console, there is no reason > > why wizards cannot also be used for making GUI wizard interfaces. > > > > The library is highly extensible - back-ends can be written or extended > > with the type system helpfully tracking what features are supported by > > which back-ends. > > > > Installation instructions and some educational examples are at the github > > page: > > > > https://github.com/liamoc/wizards > > > > Information on how to write backends or extend backends, as well as > > structured API documentation is available on Hackage: > > > > http://hackage.haskell.org/package/wizards > > > > (Or, you can just run cabal haddock to generate the documentation from the > > source). > > > > Regards, > > Liam O'Connor > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > [email protected] (mailto:[email protected]) > > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
