Re: [Haskell] Generic combination of generic types

2007-08-24 Thread Garrett Mitchener
I'm not familiar with modal logic, but if modalities stack, you might be able to do something like this. -- Garrett Mitchener {-# OPTIONS_GHC -fglasgow-exts #-} module Test where data L a = F | T | Atom Int | Neg (L a) | And (L a) (L a) | Or (L a) (L a) | M (L a) -- the modali

[Haskell] Generic combination of generic types

2007-08-23 Thread Rob Myers
Hi there, This is a question about combining data types in a generic way. I am using Haskell to write a first implementation of a new generic algorithm to decide a fairly large class of modal logics. Type classes provide an excellent way to generically define a modal language. In particular y