cross product of lists

jefu jefu@cs20.eou.edu
Tue, 08 May 2001 09:33:10 -0700


This is not a class assignment - indeed I'm a professor who has used
haskell in classes (and is currently being fired for having done so - 
it seems teaching anything other than c++ is questionable).  

I'd like to have a program that will take a description of a regular
language and produce a list of strings in that language in order
of size.  If the lists are infinite (a* and the like) things work fine,
but when the lists are finite, things dont work.  

I have two programs that I've tried to use and both have been hacked
a bit in my process of experimentation so they're not the nicely
honed final product I'd like to have.  The first is based on my original
ideas but with some attempt to cajole the finite/infinite list problem 
- it still seems to me that this would be a good way to go if possible,
but I'm stumped.  It is at :  http://cs.eou.edu/jefu/reglang.hs

The second is built on the idea of remembering if a list is finite
or infinite and handling it accordingly.  This one manages to segfault
hugs and ghci also just quits about half the time (linux, redhat 7). 
This one is at : http://cs.eou.edu/jefu/nreglang.hs


Any suggestions ? 

jefu
-- 
jeff putnam -- jefu@eou.edu -- http://cs.eou.edu/~jefu