--Alexey,
An (:) is a function from index (numeric) to a value.
I guess you are looking for a function getField which would do a job in this case. You can find a description of this function in prelude documentation.
To answer your second question – Ela parser is not currently exposed to Ela code (you can make it available by yourself if you wish).
From: ela...@googlegroups.com [mailto:ela...@googlegroups.com] On Behalf Of Tikhonov Alexey
Sent: Wednesday, March 13, 2013 11:34 AM
To: ela...@googlegroups.com
Subject: Re: Ela Platform 2013.1
Ok, I looked through and see that I can answer my questions on myself. Of course the indexer takes only numeric arguments and io functions are defined in the corresponding module io.ela.
13.03.2013, 13:21, "Tikhonov Alexey" <a.le...@ya.ru>:
Hi, Vasily!
Documentation claimed that one may declare a record with field name that is not a valid Ela identifier and then use indexer operator to access the element. Does it mean that the following example should work:
let r = {"String"=0}
in r:"String"
Actually it doesn't but may be I didn't get an idea what the indexer operator is. One more question Is there any inner mechanism implemented to read from / write to external files in Ela? For example to parse a file.
14.02.2013, 02:04, "vorov2" <ba...@voronkov.name>:
Ela Platform 2013.1 includes a new version of Ela (0.12.1) and a new version of standard library that provide a support for monadic programming in Ela including Haskell style "do" notation.An overview of this release is available here:http://elalang.net/docs/Article.aspx?p=whatsnew.htmDownload here:http://elalang.googlecode.com/files/ela-platform-2013.1.zip
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.
You mean integer division? There is a div function in standard library, in module number. You can take a look at this module and its docs. This module defines an Integral class that has both div and quot functions. So your code sample should be:
1 `div` 2
Alexey,
Actually this is a bug in string.format function (which is used internally by ‘test’ module).
For now you can apply a patch to ‘test’ module by replacing an existing assert function with the following definition (changes are highlighted in bold):
assert # private
assert =
{
eq = op' "eq" (==),
neq = op' "neq" (<>),
gt = op' "gt" (>),
lt = op' "lt" (<),
gte = op' "gte" (>=),
lte = op' "lte" (<=),
eqt = op' "eqt" (==) true,
eqf = op' "eqf" (==) false
}
where op' m op x y
| op x y = None
| else = Some (format ": Assert failed: {0} for {1} and {2}" m (show x) (show y))
I will include a fix with the next release.