Not sure if this was asked before, but suppose we have designed the transfer function of a mealy machine and a specific portion of it is generic and we want to get a function of type say (a -> Int -> a) to be called for that portion. In my mind, I just pass this function as a part of the states such as:
( (s , (a -> Int -> a)) -> i -> ((s , (a -> Int -> a), o)) --> the type of transfer function for mealy
And then when I call mealy I can define my function as a state. As an example:
This does not reach a normal form, I was wondering why this happens, and what ways do you recommend to fix it?
GHC: Parsing and optimising modules took: 0.925s
GHC: Loading external modules from interface files took: 0.000s
GHC: Parsing annotations took: 0.002s
Clash: Parsing and compiling primitives took 0.139s
GHC+Clash: Loading modules cumulatively took 1.348s
Clash: Compiling Example.HandshakeRV.topEntity
Clash.Normalize.Transformations(493): InlineNonRep: c$Example.HandshakeRV.hsSerial_ds[785] already inlined 50 times in:
Example.HandshakeRV.hsSerial[779]. The type of the subject is:
GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,,,)[3746994889972252680]
GHC.Types.Int[3674937295934324766]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Int[3674937295934324766]
GHC.Types.Bool[3674937295934324744])
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16
->
GHC.Types.Int[3674937295934324766]
-> Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16))
(GHC.Tuple.(,,)[3746994889972252678]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Bool[3674937295934324744]
GHC.Types.Bool[3674937295934324744])
Function Example.HandshakeRV.hsSerial[779] will not reach a normal form and compilation
might fail.
Run with '-fclash-inline-limit=N' to increase the inline limit to N.
Clash.Normalize.Transformations(493): InlineNonRep: c$Example.HandshakeRV.hsSerial_ds[785] already inlined 50 times in:
Example.HandshakeRV.hsSerial[779]. The type of the subject is:
GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,,,)[3746994889972252680]
GHC.Types.Int[3674937295934324766]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Int[3674937295934324766]
GHC.Types.Bool[3674937295934324744])
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16
->
GHC.Types.Int[3674937295934324766]
-> Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16))
(GHC.Tuple.(,,)[3746994889972252678]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Bool[3674937295934324744]
GHC.Types.Bool[3674937295934324744])
Function Example.HandshakeRV.hsSerial[779] will not reach a normal form and compilation
might fail.
Run with '-fclash-inline-limit=N' to increase the inline limit to N.
Clash.Normalize.Transformations(493): InlineNonRep: c$Example.HandshakeRV.hsSerial_ds[785] already inlined 50 times in:
Example.HandshakeRV.hsSerial[779]. The type of the subject is:
GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,,,)[3746994889972252680]
GHC.Types.Int[3674937295934324766]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Int[3674937295934324766]
GHC.Types.Bool[3674937295934324744])
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16
->
GHC.Types.Int[3674937295934324766]
-> Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16))
(GHC.Tuple.(,,)[3746994889972252678]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Bool[3674937295934324744]
GHC.Types.Bool[3674937295934324744])
Function Example.HandshakeRV.hsSerial[779] will not reach a normal form and compilation
might fail.
Run with '-fclash-inline-limit=N' to increase the inline limit to N.
Clash.Normalize.Transformations(493): InlineNonRep: c$Example.HandshakeRV.hsSerial_ds[785] already inlined 50 times in:
Example.HandshakeRV.hsSerial[779]. The type of the subject is:
GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,)[3746994889972252676]
(GHC.Tuple.(,,,)[3746994889972252680]
GHC.Types.Int[3674937295934324766]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Int[3674937295934324766]
GHC.Types.Bool[3674937295934324744])
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16
->
GHC.Types.Int[3674937295934324766]
-> Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16))
(GHC.Tuple.(,,)[3746994889972252678]
(Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16)
GHC.Types.Bool[3674937295934324744]
GHC.Types.Bool[3674937295934324744])
Function Example.HandshakeRV.hsSerial[779] will not reach a normal form and compilation
might fail.
Run with '-fclash-inline-limit=N' to increase the inline limit to N.
Clash: Normalization took 4.346s
<no location info>: error:
Clash.Netlist(332): Can't translate non-tycon type: Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16
->
GHC.Types.Int[3674937295934324766]
-> Clash.Sized.Internal.Signed.Signed[8214565720323786519] 16