I expected the following code to complain about a missing KnownNat constraint for halfBatchSize (the one commented out). Instead it seems to have thrown the plugin into an infinite loop (I can keep on increasing the number of iterations with any effect).
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-}
module Test where
import Clash.Prelude
test
:: ( KnownNat batchSize
-- , KnownNat halfBatchSize
, (halfBatchSize * 2) ~ batchSize
)
=> proxy halfBatchSize
-> Integer
test = natVal
I expected the following code to complain about a missing
KnownNat
constraint forhalfBatchSize
(the one commented out). Instead it seems to have thrown the plugin into an infinite loop (I can keep on increasing the number of iterations with any effect).