I was able to parse function definition, but function call still is a
problem,
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3205482.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
On 4 October 2010 23:54, c8h10n4o2 wrote:
> By the way, there is a parser that returns [String] for my case?
>
If you are trying to parse strings (of alphaNum's) separated by commas, you
can use "many alphaNum" (or "many1 alphaNum" depending on what you want)
instead of simply using alphaNum. Th
I read the parsec documentation and saw my mistake.
By the way, there is a parser that returns [String] for my case?
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3198573.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com
On 4 October 2010 23:10, c8h10n4o2 wrote:
> And why
> b <- between (char ',') (char '=') (sepBy alphaNum (char ',') )
> does not return [String] ?
>
alphaNum :: Parser Char
sepBy :: Parser a -> Parser sep -> Parser [a]
sepBy alphaNum sepP :: Parser [Char] or Parser String but not Parser
[String]
And why
b <- between (char ',') (char '=') (sepBy alphaNum (char ',') )
does not return [String] ?
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3198511.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Ben Franksen wrote:
> The type checker tells you that you are using the same Map with different
> key types: at 52:17-19 the key has type [Hai], whereas at 47:16-18 it has
> type Hai.
>
> The latter is in your Func case:
s/latter/former/
___
Haskell-Ca
c8h10n4o2 wrote:
> The problem is there. A function in Hai would be function-name,
> arg1,argn=body.
> Func stores function name,arguments and body as Strings(I was thinking to
> put Func String String String).
> The parser func that I wrote so far try to parse a function definition,
> not a functi
The problem is there. A function in Hai would be function-name,
arg1,argn=body.
Func stores function name,arguments and body as Strings(I was thinking to
put Func String String String).
The parser func that I wrote so far try to parse a function definition, not
a function call.
But when I try to s
c8h10n4o2 wrote:
> No, it is not secret. I'm having trouble to define functions. Take a look
> at my code(please be gentle)
> http://haskell.1045720.n5.nabble.com/file/n3100036/hai1.hs hai1.hs
Can you explain in a few words what the Func constructor should represent
why it has three arguments? I a
No, it is not secret. I'm having trouble to define functions. Take a look at
my code(please be gentle)
http://haskell.1045720.n5.nabble.com/file/n3100036/hai1.hs hai1.hs
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3100036.html
Sent from the Has
10 matches
Mail list logo