[
http://dev.sourcefabric.org/browse/LS-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294#action_17294
]
Romain Beauxis commented on LS-551:
-----------------------------------
The issue seems to be around line 532 of lang_values.ml:
| List l ->
List.iter (check ~level ~env) l ;
let pos =
(* Attach the position of the first item in the list
* to the type of the list items. It gives more info with type errors
* when the items in the list are not compatible.
* WARNING This will become weird with real subtyping in the inference,
* because the type of elements will only be _a supertype_ of the type
* of the first item. *)
match l with e::_ -> e.t.T.pos | [] -> e.t.T.pos
in
let v = T.fresh_evar ~level ~pos in
e.t >: mk (T.List v) ;
List.iter (fun item -> item.t <: v) l
If I change the previous example to:
output.dummy(
fallback([fail(), strip_blank(sine()), sine()]),
fallible=true)
Then it works..
> fallback (and possibly other) refuses to start with a mixture of active and
> regular sources.
> --------------------------------------------------------------------------------------------
>
> Key: LS-551
> URL: http://dev.sourcefabric.org/browse/LS-551
> Project: Liquidsoap
> Issue Type: Bug
> Components: Liquidsoap
> Affects Versions: 1.0 beta
> Reporter: Romain Beauxis
> Priority: Blocker
>
> The following does not work:
> output.dummy(
> fallback([strip_blank(sine()), sine()]),
> fallible=true)
> I get:
> this value has type
> source(_)
> but it should be a subtype of (the type of the value at line 1, char 35-42)
> active_source(_)
> It is my understanding that there should be no technical reasons to prohibit
> this and so there must be something to do at the type-checking level..
--
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
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl