[
http://dev.sourcefabric.org/browse/LS-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19227#action_19227
]
Romain Beauxis commented on LS-592:
-----------------------------------
Another issue:
let () =
let t = Lang.univ_t 1 in
add_builtin "record.has" ~cat:Liq
~descr:"record.has(x,\"foo\") is true if field foo is defined in record x."
["",Lang.record_t ~t [],None,None;
"",Lang.string_t,None,None] Lang.bool_t
(fun p ->
let l = Lang.to_record (Lang.assoc "" 1 p) in
let s = Lang.to_string (Lang.assoc "" 2 p) in
Lang.bool (List.mem_assoc s l))
# record.has;;
- : ([, ?A],string)->bool = <fun>
# record.has([foo = 1],"foo");;
- : bool = true
# record.has;;
- : ([foo:int],string)->bool = <fun>
> 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
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl