Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use :>! instead of :> for pattern matching Vecs #21

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

martijnbastiaan
Copy link
Collaborator

This is used to workaround (spurious) warnings GHC generates on newer versions. Example of such a warning:

example/Example.hs:170:1: error: [GHC-62161] [-Wincomplete-uni-patterns, Werror=incomplete-uni-patterns]
    Pattern match(es) are non-exhaustive
    In a pattern binding:
        Patterns of type ‘BusTag (DF dom Int) (Bwd (DF dom Int))
                          :-> BusTag
                                (Vec 1 (DF dom Int)) (Fwd (Vec 1 (DF dom Int)))’ not matched:
            _ :-> BusTagBundle (Cons _ _)
    |
170 | fanout = circuit $ \a -> do
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^...

src/CircuitNotation.hs Outdated Show resolved Hide resolved
This is used to workaround (spurious) warnings GHC generates on newer
versions. Example of such a warning:

    example/Example.hs:170:1: error: [GHC-62161] [-Wincomplete-uni-patterns, Werror=incomplete-uni-patterns]
        Pattern match(es) are non-exhaustive
        In a pattern binding:
            Patterns of type ‘BusTag (DF dom Int) (Bwd (DF dom Int))
                              :-> BusTag
                                    (Vec 1 (DF dom Int)) (Fwd (Vec 1 (DF dom Int)))’ not matched:
                _ :-> BusTagBundle (Cons _ _)
        |
    170 | fanout = circuit $ \a -> do
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^...
@martijnbastiaan martijnbastiaan merged commit 19b386c into master Feb 19, 2024
7 checks passed
@martijnbastiaan martijnbastiaan deleted the prevent-spurious-pattern-warnings branch February 19, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants