Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wavewave/fficxx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.0.1
Choose a base ref
...
head repository: wavewave/fficxx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 19 commits
  • 49 files changed
  • 1 contributor

Commits on Aug 5, 2023

  1. ormolu formatting. ghc 9.6 as default. drop ghc 9.0 support (#211)

    upgrade ormolu-action with explict ormolu version.
    
    * flake update. remove unused packages
    * support ghc962
    * ormolu formatting
    * additional ormolu formatting
    * CI: ghc 9.6.2 as default and update ormolu-action
    * update cabal files
    * explicit version
    * further formatting
    wavewave authored Aug 5, 2023
    Configuration menu
    Copy the full SHA
    52f371d View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. Start migrating to direct GHC API use and ghc-exactprint (#212)

    The simplest HsProxy is migrated.
    For the time being, haskell-src-exts and ghc+ghc-exactprint will coexist and haskell-src-exts will be faded away. 
    
    * prepare for ghc-exactprint migration. use only Util.HaskellSrcExts functions except types.
    * explicit export
    * make proxy-test generatable (for temporary tests for ghc-exactprint codegen)
    * first try to generate code using ghc-exactprint
    * finally print as desired.
    * success in LANGUAGE pragma printing
    * mkImport implementation
    * mkFun, mkFunSig
    * further mkBind1
    * correct indentation doE and handling empty list
    * remove all s1
    * con, inapp, op, par, strE
    * ormolu format fix
    * ghc945 -> ghc962 in CI
    wavewave authored Aug 8, 2023
    Configuration menu
    Copy the full SHA
    cce2332 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. FFI module generation via ghc-exactprint (#213)

    * simplify imports
    * start using ghc-exactprint for HsFFI
    * mkForImpCcall
    * hsFFIFunType almost implemented. FFI import formatting
    * unfortunately, i had to resort to a dirty solution for foreign imports.
    * c2HsType, postProcess
    * generated HsFFI code works.
    * format
    wavewave authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    a2463e4 View commit details
    Browse the repository at this point in the history
  2. HsCast module migrated to ghc-exactprint (#214)

    Handling typeclass instance declaration with ghc-exactprint.
    
    * refactor out mkDeltaPos and mkEpaDelta
    * mkInstance implementation
    * migrate HsCast to ghc-exactprint
    * correct handling trailing commas.
    * generated code is compilable!
    * fix parentheses
    * ormolu format
    wavewave authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    83f70dc View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. RawType code generation via ghc-exactprint (#215)

    Separated out HsRawType out of HsFrontend.
    implemented mkData, mkNewtype, mkDeriving etc. so that RawType can be generated and tested.
    
    * separate out HsRawType
    * mkData, mkNewtype. HsRawType is almost converted.
    * now no missing part in HsRawType
    * mkDeriving
    * mkTypeFamInst
    * generated code formatting correctly. now it works!
    * ormolu
    wavewave authored Aug 10, 2023
    Configuration menu
    Copy the full SHA
    086e022 View commit details
    Browse the repository at this point in the history
  2. Explode HsFrontEnd module (#216)

    to HsCommon, HsInterface, HsImplementation, HsTopLevel
    
    * separate out HsInterface
    * separate out HsImplementation
    * remove warnings in separated modules
    * remove warnings in HsCast
    * rename remaining HsFrontEnd to HsTopLevel
    * HsCommon module separation
    * remove warnings
    wavewave authored Aug 10, 2023
    Configuration menu
    Copy the full SHA
    cf55d30 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. typeclass interface generation via ghc-exactprint (#217)

    HsInterface and HsImplementation is fully converted.
    Note: template member functions are disabled for now. will be reinstated in the following PRs.
    
    * mkClass
    * mkImportSrc
    * convert genHsFrontDecl
    * converted cxx2HsType, extractArgRetType', functionSignature', tyForall, qualTy
    * implemented mkPVarSig, pbind, letE, valBinds, toLocalBinds
    * now genHsFrontUpcastClass is converted.
    * HsInterface is fully converted
    * correct formatting. stdcxx is buildable with generated code!
    * mark old code using O, in HsImplementation
    * genImportInImplementation converted
    * genHsFrontInst converted
    * remove the old genExtraImport_ and genImportInCast_
    * accessorSignature converted
    * converted all functions in HsImplementation
    * remove old imports.
    * format fix
    wavewave authored Aug 11, 2023
    Configuration menu
    Copy the full SHA
    be4879d View commit details
    Browse the repository at this point in the history
  2. Move top-level template codegen to HsTopLevel (#218)

    Moved top-level template codegen to HsTopLevel, TMF codegen to HsImplementation and split HsTemplate to HsTH and HsTemplate.
    
    * move top-level template codegen to HsTopLevel
    * move template member functions to HsImplementation
    * separate out HsTemplate to HsTemplate and HsTH.
    wavewave authored Aug 11, 2023
    Configuration menu
    Copy the full SHA
    612ec49 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2023

  1. Template member function codegen via ghc-exactprint (#219)

    * implement tyTupleBoxed, pTuple, lamE, tupleE, bracketExp, typeBracket
    * now genTMFExp is converted modulo functionSignatureTMF'
    * implement cxx2hsType4Tmpl (old convertCpp2HS4Tmpl) and functionSignatureTMF
    * now genTMFExp is fully implemented.
    * finally, TMF function gen is implemented!
    * mkBindStmt
    * mkLetStmt
    * template member function generated code works!
    * simple test script. add hspec-discover to the devshell dep
    wavewave authored Aug 12, 2023
    Configuration menu
    Copy the full SHA
    67cbead View commit details
    Browse the repository at this point in the history
  2. Template and TH codegen via ghc-exactprint (#220)

    and now only top-level function generations are left.
    
    * HsTemplate!
    * convert genTmplImplementation
    * TH code gen successful!
    * fix further
    * remove old functionSignature..
    wavewave authored Aug 12, 2023
    Configuration menu
    Copy the full SHA
    671af5a View commit details
    Browse the repository at this point in the history
  3. Finally no more haskell-src-exts! (#221)

    * genImportInModule implemented.
    * ethingall, evar, eabs
    * top-level exports
    * upgrade all imports
    * genTopLevelDef. remove old code.
    * genTLTemplateInterface
    * genTLTemplateImplementation
    * Finally! it fully worked with the migrated functions.
    * remove haskell-src-exts!
    * ormolu format
    wavewave authored Aug 12, 2023
    Configuration menu
    Copy the full SHA
    f27d27b View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. First data-type support of C/C++ enums (#222)

    C/C++ enum is now translated to a Haskell data type.
    
    * introduce CPTEnum case.
    * remove old CEnum
    * Enum data type generation
    * Enum generation is using hsc2hs. --cc=c++ --ld=c++ option
    * build fix
    * format Enum-generated data type
    * introduce DeclGroup
    * standalone comment generation (for #include statement)
    * Enum instance generation (only succ/pred)
    * mkBind
    * fromEnum generation!
    * remove stale code
    * format fix
    wavewave authored Aug 14, 2023
    Configuration menu
    Copy the full SHA
    a1ce045 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. missing Castable instance for Ptr CBool and Ptr CFloat (#223)

    * missing Castable instance for Ptr CBool
    * missing Castable (Ptr CFloat) (Ptr CFloat)
    wavewave authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    3be050d View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Configuration menu
    Copy the full SHA
    59deb27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c06b4b View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. handle missing case of CPTEnum. (#228)

    Now int to enum type is explicitly casted.
    so on Haskell side, enum argument is still CInt, but on C++ side, it's explicitly casted by cast operator: (enum_type)
    wavewave authored Aug 26, 2023
    Configuration menu
    Copy the full SHA
    8019866 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. FFI safety is now explicitly given (#229)

    User should now specify unsafe/safe/interruptible explicitly.
    constructors and destructors are always unsafe (this should be taken granted. C++ library should not call Haskell back inside constructor/destructors). Accessor functions (getter/setter) are also unsafe.
    On the other hand, calling an instance of std::function (which is hard-coded in FFICXX.Runtime.Function.TH) should be unconditionally safe.
    
    * unsafe testing
    * introduce C FFI Safety
    * ordinary function safety is handled.
    * Safety in fficxx-runtime
    * template haskell gen now handles Safety
    * Add Safety parameter in TFun. and update stdcxx
    * update examples with Safety parameter
    * upgrade template TH code generation with FFISafety
    * calling std::function should be safe!
    wavewave authored Aug 28, 2023
    Configuration menu
    Copy the full SHA
    33e73b5 View commit details
    Browse the repository at this point in the history
  2. fix missing parentheses around types in haskell code generation (#230)

    The bugs were introduced when migrated from haskell-src-exts to ghc-exactprint.
    wavewave authored Aug 28, 2023
    Configuration menu
    Copy the full SHA
    c5f7502 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. Configuration menu
    Copy the full SHA
    a0808b2 View commit details
    Browse the repository at this point in the history
Loading