39 lines
1.1 KiB
Haskell
39 lines
1.1 KiB
Haskell
{-# LANGUAGE CApiFFI #-}
|
|
{-# LANGUAGE DerivingVia #-}
|
|
{-# LANGUAGE MagicHash #-}
|
|
{-# LANGUAGE PatternSynonyms #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
{-# LANGUAGE UnboxedTuples #-}
|
|
{-# LANGUAGE UndecidableInstances #-}
|
|
{-# OPTIONS_GHC -Wno-unused-imports #-}
|
|
|
|
module GarnetRs.Raw where
|
|
|
|
-- TODO this causes HLS to panic, and isn't yet supported by Ormolu/Fourmolu
|
|
-- {-# LANGUAGE ExplicitLevelImports #-}
|
|
-- import HsBindgen.Runtime.LibC qualified
|
|
-- import splice Data.List
|
|
-- import splice Data.Text qualified as T
|
|
-- import splice Data.Tuple.Extra
|
|
-- import splice HsBindgen.TH
|
|
-- import splice Language.Haskell.TH
|
|
-- import splice System.Process
|
|
-- import splice Prelude
|
|
|
|
import Data.List
|
|
import Data.Text qualified as T
|
|
import Data.Tuple.Extra
|
|
import HsBindgen.Runtime.LibC qualified
|
|
import HsBindgen.TH
|
|
import Language.Haskell.TH
|
|
import System.Process
|
|
|
|
withHsBindgen
|
|
def
|
|
{ clang = def{extraIncludeDirs = [Pkg "rust/target/debug"]}
|
|
, fieldNamingStrategy = OmitFieldPrefixes
|
|
}
|
|
def
|
|
$ hashInclude "garnet_rs.h"
|