Skip to content

copilot-language - Unable to drop as many elements from Stream as prepended #607

@strikef

Description

@strikef

https://hackage.haskell.org/package/copilot-language-4.3/docs/Copilot-Language-Operators-Temporal.html#v:drop

The elements must be realizable at the present time to be able to drop elements. For most kinds of streams, you cannot drop elements without prepending an equal or greater number of elements to them first, as it could result in undefined samples.

Since the document states that prepending 'equal' number of elements suffices, I expected the following code to compile

prependedStream :: Stream Bool
prependedStream = [True, True] ++ false

droppedStream :: Stream Bool
droppedStream = drop 2 prependedStream

However, it fails to compile with the following error:

Copilot error: Drop index overflow!

Why is it that I'm not able to drop the exact same number of elements as I prepended?
Could it be a documentation issue or a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions