[Haskell-cafe] How to deal with a translator???

2006-02-12 Thread Huong Nguyen
Hello all, Now I am trying on a simple translator module. This module needs to translate an input string( this string represent a formula) as follows: (x^2 - 5x + 4=0) /\ (x^3 - 5>0) -> x>3 And I want the output string represent a formula like: (x^2 - 5x + 4=0) /\ (x^3 - 5>0) IMPLIES x>

Re: [Haskell-cafe] Generic parser without GADTs

2005-10-16 Thread Huong Nguyen
Hi all, You are talking about parsing and data type, so I want to ask you a question relating to my data type. I have a data types and a function as follows: \begin{code} data Type a = C1     {  x :: [String]     ,y :: Type a}     | C2 {x1 :: String}     | C3 {y1 :: Bool} deriving S

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-16 Thread Huong Nguyen
Thanks all of your for your time and your interesting examples. Now I can see that my problem is parsing a String. I am new in Haskell, so, I start to study parsing and how to create a parser from beginning. I start with an example from the book as follows: %The parser item fails if the input is e

[Haskell-cafe] Newbie question on Haskell type

2005-10-13 Thread Huong Nguyen
Hi all,   I want to write a small functionto test whether an input is a String or not. For example,   isString::(Show a) =>a ->Bool This function will return True if the input is a string and return False if not   Any of you have idea about that? Thanks in advance __

[Haskell-cafe] XMLParse module

2005-09-27 Thread Huong Nguyen
Hello all, I am reading XMLParse module http://www.germane-software.com/repositories/public/StatusReport/trunk/hxml-0.2/XMLParse.hs But, I am not clear about the purpose of this module and the function of two functions: parseInstance = unfoldr (pRun instanceItem) . pcdataModeparseDTD = foldl (\a b

[Haskell-cafe] Newbie question: how to run HaXML in Unix

2005-09-22 Thread Huong Nguyen
Hello everybody, This seems so simple question, but I did not find the solution. HaXML is installed. Do you know how I can run HaXML in Linux/Unix (which command I should write). Thank you. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:/

[Haskell-cafe] How to call ICS from Haskell

2005-09-14 Thread Huong Nguyen
Hello everybody,   Do you know how to call ICS (Integrated Canonizer and Solver: www.icansolve.com) or PVS (Prototype Verification System) from Haskell ?   Thank you in advance. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

[Haskell-cafe] Newbie question about Read strings in a line of File

2005-07-26 Thread Huong Nguyen
Hello everybody, Now I am writing a module to handles messages of a system. The messages are stored in a file. The content of each line of the file likes this: 1001 001 Error message 1 1001 002 Error message 2 1002 00