[
http://dev.sourcefabric.org/browse/LS-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19045#action_19045
]
Samuel Mimram commented on LS-592:
----------------------------------
Ok, so records seem to work right now (needs a bit more testing to be sure
though). However, before thinking of merging I would like to have the "."
notation for accessing fields of records (right now, it is r$field). This means
that we should use the dot as a record access everywhere, e.g. in "list.hd",
and not handle it as a character in the function name. I have added preliminary
functions in order for the migration to be easy. Right now, you can type
def math$add (x, y) = x + y end
def math$inv (x) = 1 / x end
and if you run this with liquidsoap -i, you will get
math : [add:((?A,?A)->?A)] where ?A is a number type
math : [inv:((int)->int);add:((?A,?A)->?A)] where ?A is a number type
i.e. math is a record to which are progressively added members (actually new
records are defined, each one masking the preceeding). It would be easy to
extend the mechanism for builtins, but we have a problem: currently (if I
understand well) the builtins come with type schemes (and not types). This
means that we have to handle properly type schemes with records. I am currently
thinking about this...
> Add support for extensible records
> ----------------------------------
>
> Key: LS-592
> URL: http://dev.sourcefabric.org/browse/LS-592
> Project: Liquidsoap
> Issue Type: New Feature
> Reporter: Samuel Mimram
> Priority: Major
>
> We should add objects in Liquidsoap in order to justify the "dot" notation,
> and a first step in this direction would be to add (extensible) records.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl