packages feed

HROOT 0.9.0.1 → 0.10.0.1

raw patch · 6 files changed

+189/−123 lines, 6 filesdep +HROOT-netdep −fficxxdep −fficxx-runtimedep −template-haskelldep ~HROOT-coredep ~HROOT-grafdep ~HROOT-histsetup-changed

Dependencies added: HROOT-net

Dependencies removed: fficxx, fficxx-runtime, template-haskell

Dependency ranges changed: HROOT-core, HROOT-graf, HROOT-hist, HROOT-io, HROOT-math, HROOT-tree

Files

+ CHANGES view
@@ -0,0 +1,60 @@+# Changelog for HROOT++## 0.10.0.1+- Use hackage-version of fficxx (#18)+- Generate docs in CI (#17)+- Update flake.nix with recent fficxx and ormolu format (#16)+- Update fficxx to support GHC 9.4 (#15)+- Add TMutex and test multithreading with GUI (#12)+- HROOT now uses common stdcxx (#11)+- idealized gas simulation (#10)+- Add TMarker and Range. Test 2D graphics using gas example (#9)+- HROOT generation and packing via nix (#8)+- Revive umbrella package generation (#7)+- Static files (Config.hs, Setup.lhs) and custom-setup dependency (#6)+- Modernize HROOT with fficxx 0.5.1 (#5)++## 0.9.0.1++## 0.9+- HROOT-tree+- HROOT only support ROOT > 6++## 0.8+- separate packages into HROOT-core, HROOT-hist, HROOT-io, HROOT-math, HROOT-graf and HROOT is now an umbrella package++## 0.7+- separate all class interfaces and implementation in different modules+- overhaul Existential++## 0.7.1+- support for static methods+- add TROOT++## 0.6.9+- implement almost all class methods of TLine, TAttLine, TAttMarker, TAttText and TAttPad++## 0.6.8+- implement almost all class methods of TH2, TH3, TFormula, TF1 and TGraph++## 0.6.7+- implement almost all TH1 class methods++## 0.6.6+- do not need OverlappingInstances, IncoherentInstances, UndecidableInstances++## 0.6.4+- add many TH2 class methods++## 0.6.3+- Implement Existential Types++## 0.6+- implement Deletable. delete method for every object+- refactor HROOT generated file names (Interface.hs, Implementation.hs, FFI.hs)++## 0.5.1+- support for delete++## 0.5.0+- initial preview release
Config.hs view
@@ -1,85 +1,92 @@ {-# LANGUAGE ScopedTypeVariables #-}  module Config where- -import Distribution.Simple-import Distribution.Simple.Setup+ import Distribution.PackageDescription+import Distribution.Simple import Distribution.Simple.LocalBuildInfo-+import Distribution.Simple.Setup import System.Exit import System.Process  config :: LocalBuildInfo -> IO (Maybe HookedBuildInfo)-config bInfo = do +config bInfo = do   (excode, out, err) <- readProcessWithExitCode "root-config" ["--glibs"] ""-  liboptset' <- case excode of -                  ExitSuccess -> do  -                    return . Just .  mkLibraryOptionSet . words $ out-                  _ -> do -                    putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." -                    return Nothing              -  (excode2,out2,err2) <- readProcessWithExitCode "root-config" ["--incdir"] ""-  incdir' <- case excode2 of -               ExitSuccess -> do  -                 return . Just . head . words $ out2-               _ -> do -                 putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." -                 return Nothing+  liboptset' <- case excode of+    ExitSuccess -> do+      return . Just . mkLibraryOptionSet . words $ out+    _ -> do+      putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation."+      return Nothing+  (excode2, out2, err2) <- readProcessWithExitCode "root-config" ["--incdir"] ""+  incdir' <- case excode2 of+    ExitSuccess -> do+      return . Just . head . words $ out2+    _ -> do+      putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation."+      return Nothing   let Just lib = library . localPkgDescr $ bInfo       buildinfo = libBuildInfo lib-  let (r :: Maybe HookedBuildInfo) = case liboptset' of +  let (r :: Maybe HookedBuildInfo) = case liboptset' of+        Nothing -> Nothing+        Just liboptset ->+          case incdir' of             Nothing -> Nothing-            Just liboptset -> -              case incdir' of -                Nothing -> Nothing -                Just incdir -> -                  let hbi = emptyBuildInfo { extraLibs = extraLibs buildinfo -                                                         ++ libs liboptset-                                           , extraLibDirs = libdirs liboptset -                                           , includeDirs = incdir : includeDirs buildinfo-                                           }-                  in Just (Just hbi, []) -  return r -+            Just incdir ->+              let hbi =+                    emptyBuildInfo+                      { extraLibs =+                          extraLibs buildinfo+                            ++ libs liboptset,+                        extraLibDirs = libdirs liboptset,+                        includeDirs = incdir : includeDirs buildinfo+                      }+               in Just (Just hbi, [])+  return r -data LibraryOptionSet = LibraryOptionSet { -  libs :: [String], -  libdirs :: [String], -  libopts :: [String]-} deriving Show+data LibraryOptionSet = LibraryOptionSet+  { libs :: [String],+    libdirs :: [String],+    libopts :: [String]+  }+  deriving (Show) -data LibraryOption = Lib String -                   | Dir String-                   | Opt String -                   deriving Show+data LibraryOption+  = Lib String+  | Dir String+  | Opt String+  deriving (Show)  mkLibraryOptionSet :: [String] -> LibraryOptionSet-mkLibraryOptionSet strs = let opts = libraryOptions strs-                          in  foldr f (LibraryOptionSet [] [] []) opts -  where f x (LibraryOptionSet l d o) = case x of-                                         Lib st -> LibraryOptionSet (st:l) d o -                                         Dir st -> LibraryOptionSet l (st:d) o -                                         Opt st -> LibraryOptionSet l d (st:o) --libraryOptions :: [String] -> [LibraryOption] -- LibraryOptionSet -libraryOptions = map f -  where f x = let r = parseLibraryOptionClassifier x-              in  case r of -                    Left msg -> error (show msg)-                    Right result -> result+mkLibraryOptionSet strs =+  let opts = libraryOptions strs+   in foldr f (LibraryOptionSet [] [] []) opts+  where+    f x (LibraryOptionSet l d o) = case x of+      Lib st -> LibraryOptionSet (st : l) d o+      Dir st -> LibraryOptionSet l (st : d) o+      Opt st -> LibraryOptionSet l d (st : o) +libraryOptions :: [String] -> [LibraryOption] -- LibraryOptionSet+libraryOptions = map f+  where+    f x =+      let r = parseLibraryOptionClassifier x+       in case r of+            Left msg -> error (show msg)+            Right result -> result -parseLibraryOptionClassifier :: String -> Either String LibraryOption +parseLibraryOptionClassifier :: String -> Either String LibraryOption parseLibraryOptionClassifier [] = Left "empty option"-parseLibraryOptionClassifier str@(x:xs) = +parseLibraryOptionClassifier str@(x : xs) =   case x of-    '-' -> if null xs -             then Left "parse error"-             else let (y:ys) = xs-                  in  case y of-                        'L' -> Right (Dir ys)-                        'l' -> Right (Lib ys)-                        _ -> Right (Opt str)-    _ -> Right (Opt str) -+    '-' ->+      if null xs+        then Left "parse error"+        else+          let (y : ys) = xs+           in case y of+                'L' -> Right (Dir ys)+                'l' -> Right (Lib ys)+                _ -> Right (Opt str)+    _ -> Right (Opt str)
HROOT.cabal view
@@ -1,38 +1,41 @@-Name:                HROOT-Version:     0.9.0.1-Synopsis:    Haskell binding to the ROOT data analysis framework-Description:         HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT. ROOT(http://root.cern.ch) is an object-oriented program and library developed by CERN for physics data analysis.-Homepage:       http://ianwookim.org/HROOT-license: LGPL-2.1-license-file: LICENSE-Author:              Ian-Woo Kim-Maintainer:  Ian-Woo Kim <ianwookim@gmail.com>-Category:       Graphics, Statistics, Math, Numerical-Tested-with:    GHC >= 7.6-Build-Type:  Custom-cabal-version:  >=1.10+Cabal-version: 3.0+Name:          HROOT+Version:       0.10.0.1+Synopsis:      Haskell binding to the ROOT data analysis framework+Description:+  HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT.+  ROOT(http://root.cern.ch) is an object-oriented program and library+  developed by CERN for physics data analysis.+Homepage:      https://wavewave.github.io/HROOT+license:       LGPL-2.1-or-later+license-file:  LICENSE+Author:        Ian-Woo Kim+Maintainer:    Ian-Woo Kim <ianwookim@gmail.com>+Category:      Graphics, Statistics, Math, Numerical+Tested-with:   GHC == 9.0.2 || == 9.2.4 || == 9.4.2  Extra-source-files:-                       Config.hs--+  CHANGES+  Config.hs+Build-Type: Custom+custom-setup+  setup-depends: Cabal < 4, base > 4 && < 5, process +Source-repository head+  type:     git+  location: https://github.com/wavewave/HROOT  Library   default-language: Haskell2010   hs-source-dirs: src   ghc-options:  -Wall -funbox-strict-fields -fno-warn-unused-do-bind -fno-warn-orphans -fno-warn-unused-imports-  ghc-prof-options: -caf-all -auto-all-  cc-options: -std=c++14-  Build-Depends:      base>4 && < 5, fficxx >= 0.3, fficxx-runtime >= 0.3, template-haskell,HROOT-core,HROOT-hist,HROOT-math,HROOT-tree,HROOT-graf,HROOT-io+  cxx-options: -std=c++17+  Build-Depends: base > 4 && < 5, HROOT-core == 0.10.0.1, HROOT-graf == 0.10.0.1, HROOT-hist == 0.10.0.1, HROOT-io == 0.10.0.1, HROOT-math == 0.10.0.1, HROOT-net == 0.10.0.1, HROOT-tree == 0.10.0.1   Exposed-Modules:                        HROOT-   Other-Modules:-   extra-lib-dirs: -  extra-libraries:    stdc++ +  extra-libraries:    +  Include-dirs:+  pkgconfig-depends:    Install-includes:--  C-sources:--+  Cxx-sources:
+ Setup.hs view
@@ -0,0 +1,27 @@+import Distribution.Simple+import Distribution.Simple.Setup+import Distribution.PackageDescription+import Distribution.Simple.LocalBuildInfo+import Config++myconfigHook = simpleUserHooks { confHook = hookfunction }++hookfunction x y = do+  binfo <- confHook simpleUserHooks x y+  r_pbi <- config binfo+  let pkg_descr = localPkgDescr binfo++  let newbinfo = case r_pbi of+                   Just pbi ->  binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }+                   Nothing -> do+                     let r_lib = library pkg_descr+                     case r_lib of+                       Just lib ->+                         let binfo2 = libBuildInfo lib+                             newlib = lib { libBuildInfo = binfo2 { cSources = [] }}+                          in  binfo { localPkgDescr = pkg_descr { library = Just newlib }}+                       Nothing -> error "some library setting is wrong."+--   putStrLn (show (localPkgDescr newbinfo))+  return newbinfo++main = defaultMainWithHooks myconfigHook
− Setup.lhs
@@ -1,33 +0,0 @@-#! /usr/bin/env runhaskell-  -> import Distribution.Simple-> import Distribution.Simple.Setup-> import Distribution.PackageDescription-> import Distribution.Simple.LocalBuildInfo->-> import Config->-> myconfigHook = simpleUserHooks { confHook = hookfunction } ->-> hookfunction x y = do ->   binfo <- confHook simpleUserHooks x y ->   r_pbi <- config binfo->   let pkg_descr = localPkgDescr binfo->   ->   let newbinfo = case r_pbi of ->                    Just pbi ->  binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }->                    Nothing -> do ->                      let r_lib = library pkg_descr ->                      case r_lib of->                        Just lib ->  ->                          let binfo2 = libBuildInfo lib->                              newlib = lib { libBuildInfo = binfo2 { cSources = [] }}  ->                          in  binfo { localPkgDescr = pkg_descr { library = Just newlib }}  ->                        Nothing -> error "some library setting is wrong." -> --   putStrLn (show (localPkgDescr newbinfo))->   return newbinfo->  ->-> main = defaultMainWithHooks myconfigHook->-
src/HROOT.hs view
@@ -4,6 +4,7 @@ , module HROOT.Graf , module HROOT.IO , module HROOT.Math+, module HROOT.Net , module HROOT.Tree ) where @@ -12,6 +13,7 @@ import HROOT.Graf import HROOT.IO import HROOT.Math+import HROOT.Net import HROOT.Tree