[
http://dev.sourcefabric.org/browse/LS-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723#action_17723
]
David Baelde commented on LS-551:
---------------------------------
Yes, it is possible to not declare strip_blank as active, this will avoid those
problems -- not the one that Martin had today, though. I can't think of any
major drawback of that solution.
Besides this, I don't see anything convincing. The problem is that our
algorithm is local but the problem needs less local insight: when I see an
active source, I can't know if it'll need to be subtyped to a normal one. We
could use insight from above, eg. say that an active source is always taken as
a normal source when inside a list, and this would solve the problem with strip
inside fallback, but make it impossible to build lists of active sources, wich
may be a problem for some people (Martin, quite likely)...
> Type inference doesn't perform enough subtyping
> -----------------------------------------------
>
> 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
> Assignee: David Baelde
> 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..
> Edit: The problem is that type inference guesses that this is a list of
> active_sources, but the second one isn't active; we need a constraint-based
> type inference algorithm to integrate subtyping in smarter ways, eg. delay
> the guess until we've seen all elements.
--
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
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl