Augmenting the "examples/simple" code with a Vec data type:
import Data.Nat (Nat(S, Z))
import Data.Vec.Lazy (Vec(VNil, (:::)))
data Input = Input
{ iInt32 :: C Int32,
iDouble :: C Double,
iVec :: Vec ('S ('S 'Z)) (C Int32)
}
deriving (Generic)
yields
simple/Main.hs:10:8: error:
• No instance for (Categorifier.C.CTypes.GArrays.GArrays
(categorifier-c-recursion-0.1:Categorifier.C.Recursion.HFix
Categorifier.C.CExpr.Types.Core.CExprF)
(Categorifier.C.CExpr.Cat.TargetOb.TargetOb
(Data.Vec.Lazy.Vec
('Data.Nat.S ('Data.Nat.S 'Data.Nat.Z))
(Categorifier.C.KTypes.C.C GHC.Int.Int32))))
arising from a use of ‘writeCFiles’
• In the expression:
writeCFiles "/tmp" "simple_example" fCategorified
In an equation for ‘main’:
main = writeCFiles "/tmp" "simple_example" fCategorified
|
10 | main = writeCFiles "/tmp" "simple_example" fCategorified
there appears to be GArrays instance here
Augmenting the "examples/simple" code with a
Vecdata type:yields
there appears to be
GArraysinstance here