Skip to content

Commit

Permalink
Expose other-modules under the Internal namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Jan 30, 2022
1 parent da00338 commit a0dcc8d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions bench-show.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ library
hs-source-dirs: lib
exposed-modules: BenchShow
, BenchShow.Tutorial
other-modules: BenchShow.Analysis
, BenchShow.Common
, BenchShow.Graph
, BenchShow.Report
, BenchShow.Internal.Analysis
, BenchShow.Internal.Common
, BenchShow.Internal.Graph
, BenchShow.Internal.Report
default-language: Haskell2010
default-extensions:
OverloadedStrings
Expand Down
6 changes: 3 additions & 3 deletions lib/BenchShow.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ module BenchShow
, graph
) where

import BenchShow.Common
import BenchShow.Graph
import BenchShow.Report
import BenchShow.Internal.Common
import BenchShow.Internal.Graph
import BenchShow.Internal.Report
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{-# LANGUAGE TypeFamilies #-}

-- |
-- Module : BenchShow.Analysis
-- Module : BenchShow.Internal.Analysis
-- Copyright : (c) 2009-2014 Bryan O'Sullivan
-- (c) 2018 Composewell Technologies
--
Expand All @@ -16,7 +16,7 @@
-- Stability : experimental
-- Portability : GHC

module BenchShow.Analysis
module BenchShow.Internal.Analysis
( OutlierEffect(..)
, OutlierVariance(..)
, countOutliers
Expand Down
10 changes: 5 additions & 5 deletions lib/BenchShow/Common.hs → lib/BenchShow/Internal/Common.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- |
-- Module : BenchShow.Common
-- Module : BenchShow.Internal.Common
-- Copyright : (c) 2018 Composewell Technologies
--
-- License : BSD3
Expand All @@ -12,7 +12,7 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}

module BenchShow.Common
module BenchShow.Internal.Common
( Presentation(..)
, GroupStyle(..)
, FieldTick (..)
Expand Down Expand Up @@ -60,7 +60,7 @@ import System.FilePath ((</>))
import Text.CSV (CSV, parseCSVFromFile)
import Text.Read (readMaybe)

import BenchShow.Analysis
import BenchShow.Internal.Analysis

-------------------------------------------------------------------------------
-- Utilities
Expand Down Expand Up @@ -447,10 +447,10 @@ fraction :: (Fractional a, Num a, Ord a, Show a) => a -> a -> a
fraction v1 v2 =
let val = v2 / v1
in case val of
x | x <= 0 -> error $ "BenchShow.Common.fraction: negative: " ++ show x
x | x <= 0 -> error $ "BenchShow.Internal.Common.fraction: negative: " ++ show x
x | x < 1 -> negate (1 / x)
x | x >= 1 -> x
x -> error $ "BenchShow.Common.fraction: unhandled: " ++ show x
x -> error $ "BenchShow.Internal.Common.fraction: unhandled: " ++ show x

cmpTransformColumns :: ReportType
-> GroupStyle
Expand Down
8 changes: 4 additions & 4 deletions lib/BenchShow/Graph.hs → lib/BenchShow/Internal/Graph.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- |
-- Module : BenchShow.Graph
-- Module : BenchShow.Internal.Graph
-- Copyright : (c) 2018 Composewell Technologies
--
-- License : BSD3
Expand All @@ -12,7 +12,7 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}

module BenchShow.Graph
module BenchShow.Internal.Graph
(
graph
) where
Expand All @@ -25,7 +25,7 @@ import Data.Maybe (fromMaybe)
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams

import BenchShow.Common
import BenchShow.Internal.Common

-------------------------------------------------------------------------------
-- Benchmarking field specific handling
Expand Down Expand Up @@ -78,7 +78,7 @@ transformFractionValue ReportColumn{..} =
case val of
x | x >= 1 -> x - 1
x | x < (-1) -> x + 1
x -> error $ "BenchShow.Graph.transformFractionValue: unhandled: " ++ show x
x -> error $ "BenchShow.Internal.Graph.transformFractionValue: unhandled: " ++ show x
) colValues
, colAnalyzed = colAnalyzed
}
Expand Down
8 changes: 4 additions & 4 deletions lib/BenchShow/Report.hs → lib/BenchShow/Internal/Report.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- |
-- Module : BenchShow.Report
-- Module : BenchShow.Internal.Report
-- Copyright : (c) 2018 Composewell Technologies
--
-- License : BSD3
Expand All @@ -12,7 +12,7 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}

module BenchShow.Report
module BenchShow.Internal.Report
(
report
) where
Expand All @@ -24,8 +24,8 @@ import Statistics.Types (Estimate(..))
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import Text.Printf (printf)

import BenchShow.Common
import BenchShow.Analysis
import BenchShow.Internal.Common
import BenchShow.Internal.Analysis

multiplesToPercentDiff :: Double -> Double
multiplesToPercentDiff x = (if x > 0 then x - 1 else x + 1) * 100
Expand Down

0 comments on commit a0dcc8d

Please sign in to comment.