ghc-typelits-natnormalise icon indicating copy to clipboard operation
ghc-typelits-natnormalise copied to clipboard

Normalise GHC.TypeLits.Nat equations

Results 13 ghc-typelits-natnormalise issues
Sort by recently updated
recently updated
newest added

The issue and the repro are described around this comment in the GHC bug tracker: https://gitlab.haskell.org/ghc/ghc/-/issues/23923#note_536386 I'm cloning it here in hopes that perhaps here it'd be easier for the...

```hs {- cabal: build-depends: base, ghc-typelits-natnormalise -} {-# LANGUAGE AllowAmbiguousTypes, DataKinds, ExplicitForAll, TypeApplications, TypeFamilies, TypeOperators #-} {-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-} import Data.Type.Equality import GHC.TypeNats urk :: False :~: True...

bug

This ticket is moved here from https://gitlab.haskell.org/ghc/ghc/-/issues/23763. Repro with GHC 9.8.1-alpha1 and head.hackage (http://ghc.gitlab.haskell.org/head.hackage/): * clone https://github.com/Mikolaj/horde-ad/commit/e76ff6c2f2b1fc53a00c6b78f74cb1ab8b94790d * `cabal build` * you get ``` src/HordeAd/Core/AstSimplify.hs:1192:9: error: [GHC-64725] • Cannot satisfy:...

The plugin can't solve: `Expected: ShapeInt (((m6 + k1) + n14) + (n + k3)) Actual: ShapeInt ((((m6 + k1) + n14) + n) + k3)`. A longer fragment of...

I don't know if this is related to #65. Tested with ghc-9.4.3 and ghc-9.0.2 and with newest plugin in both cases. This snippet of larger code ``` build1VectorizeIndexVar :: forall...

Since we're dealing with natural numbers, which are by definition non-negative, we must be able to conclude `n~0` from `n

In the following little code snippet I have to functions, function "libFunc", which has a constraint i < d for two Typelits (e.g. indexing with an index i into some...

Using an intermediate type variable in your function and binding it to ` 2^n` prevents the deduction that it is greater or equal to 1. This reproducer: ```Haskell {-# LANGUAGE...

https://github.com/clash-lang/ghc-typelits-natnormalise/commit/2414721729a1f49dc4f7391433771138eeddd48d introduces a regression. I don't have a small reproducer but this is essentially what happens: If we have the following givens: fsk_akFr + fsk_akEb ~ fsk_akFt fsk_akDn - 1...

The code below: ```Haskell {- OPTIONS_GHC -fplugin GHC.TypeLits.Normalise -} import Clash.Prelude f :: forall n m. m ~ (n + 1) => Vec m Bool -> Bool f = undefined...