Commits

Anonymous committed dcaf3f3

Adding struct as a FunctionArg instance

Export StructFields from Core/Types so it can be used in CodeGen.

Comments (0)

Files changed (2)

LLVM/Core/CodeGen.hs

 instance FunctionArgs (IO ())            (FA ())            ()            where apArgs _ _ g = g
 instance (Pos n, IsPrimitive a) =>
          FunctionArgs (IO (Vector n a))  (FA (Vector n a))  (Vector n a)  where apArgs _ _ g = g
+instance StructFields as =>
+         FunctionArgs (IO (Struct as))   (FA (Struct as))   (Struct as)   where apArgs _ _ g = g
 instance (IsType a) => 
          FunctionArgs (IO (Ptr a))       (FA (Ptr a))       (Ptr a)       where apArgs _ _ g = g
 instance FunctionArgs (IO (StablePtr a)) (FA (StablePtr a)) (StablePtr a) where apArgs _ _ g = g

LLVM/Core/Type.hs

 module LLVM.Core.Type(
     -- * Type classifier
     IsType(..),
+    -- * StructFields classifier
+    StructFields,
     -- ** Special type classifiers
     Nat,
     Pos,