[Haskell-cafe] New to Haskell, suggestions on code

Flavio Botelho fezsentido at gmail.com
Thu Jun 23 10:16:20 EDT 2005

Hi there, a professor gave us an assigment to make a FA -> RE translator in 
any language we chose to, i decided to bite the bullet and learn Haskell as 
have been wanting to for a long time.

The code seems to work ok, but i am wondering if someone more knowledgeable 
could give me advices over how i could have done it better/easier.

At many places i have put a Char type instead of an abstract one because some 
funcations were not working properly before and i wanted to be able to output 
things and so be able to see what was the problem. 
(Haskell doesnt seem a 'magic' function to output arbitrary structures? That 
would be quite helpful for debugging)

And probably it's better style to use $ instead of many parentheses as i did 
(i didnt know what $ was for at the time...)

The name of the file i made was:

I tried reused all i could find from Joao Saraiva's RE -> FA library. But iirc 
this was only the data definitions for NDFA, DFA, RE and the DFA->NDFA 

I am sending all the files attached (Fa2RegExp.hs + the library)

Flavio Botelho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1proj0482927.zip
Type: application/x-zip
Size: 63296 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20050623/77cbab8d/1proj0482927-0001.bin

More information about the Haskell-Cafe mailing list