[Haskell-cafe] Propositional logic implementation

Andrew Wagner wagner.andrew at gmail.com
Sat Jan 10 19:44:50 EST 2009


Nice Idea, though I don't know that I want something that extensive. I was
more looking for whether there was a better way I could define the algebraic
data type.

On Sat, Jan 10, 2009 at 6:04 PM, Miguel Mitrofanov <miguelimo38 at yandex.ru>wrote:

> Look at SYB (Data.Data, Data.Generics.*). For example, your "symbols"
> function can be rewritten as
>
> symbols :: Sentence -> [Symbol]
> symbols s = nub $ listify (const True) s
>
> "true" is not that simple, because this code is NOT boilerplate - each
> alternative is valuable by itself.
>
>
> On 10 Jan 2009, at 23:56, Andrew Wagner wrote:
>
>  All,
>> Is there some better way to do this? It seems like a lot of boilerplate.
>> Thanks!
>>
>> http://hpaste.org/13807#a1
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090110/f7c8ac5d/attachment.htm


More information about the Haskell-Cafe mailing list