Skip to content

Workaround ghc-typelits-extra#68#185

Open
martijnbastiaan wants to merge 1 commit intomainfrom
workaround-ghc-typelits-extra-68
Open

Workaround ghc-typelits-extra#68#185
martijnbastiaan wants to merge 1 commit intomainfrom
workaround-ghc-typelits-extra-68

Conversation

@martijnbastiaan
Copy link
Member

See clash-lang/ghc-typelits-extra#68

This currently breaks compiles over at clash-cores. See clash-lang/clash-cores#56.

@martijnbastiaan martijnbastiaan force-pushed the workaround-ghc-typelits-extra-68 branch from 66c02ba to d5cdcd8 Compare January 7, 2026 08:58
@martijnbastiaan martijnbastiaan enabled auto-merge (squash) January 7, 2026 08:59
See clash-lang/ghc-typelits-extra#68

This currently breaks compiles over at `clash-cores`. See
clash-lang/clash-cores#56.
@martijnbastiaan martijnbastiaan force-pushed the workaround-ghc-typelits-extra-68 branch from d5cdcd8 to 6dd26ef Compare January 7, 2026 09:02
@martijnbastiaan martijnbastiaan enabled auto-merge (squash) January 7, 2026 09:02
(KnownNat dataWidth) =>
(1 <= dataWidth) =>
(1 <= headerBytes `DivRU` dataWidth) =>
-- \| XXX: The 'Constraint' equality is there to work around
Copy link
Member

@rowanG077 rowanG077 Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will force users to have both ((1 <= headerBytes DivRU dataWidth) ~ (() :: Constraint)) which is confusing. I think it's probably better to have a constraintImpliesUnitConstraint :: forall a. a => Dict (a ~ (() :: Constraint)) and apply that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, makes sense to me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked to Christiaan in the office btw, hence skipping the review. Glad you caught it though.

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