packages feed

leaky 0.1.6.0 → 0.1.7.0

raw patch · 14 files changed

+98/−158 lines, 14 filesdep ~seqaid

Dependency ranges changed: seqaid

Files

HTML/index.html view
@@ -2,13 +2,16 @@ <html> <head> <title>Leaky: Minimal robust Haskell space leak</title>+<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />+<meta http-equiv="Pragma" content="no-cache" />+<meta http-equiv="Expires" content="0" /> <link rel="stylesheet" href="style.css" /> </head> <body> -<div style="color: #F33; margin-top: 40px; font-size: 16pt;">+<!--div style="color: #F33; margin-top: 40px; font-size: 16pt;"> (Notes to self.)-</div>+</div-->  <script>document.location = "leaky.html";</script> 
HTML/leaky.html view
@@ -2,6 +2,9 @@ <html> <head> <title>Leaky: Minimal robust Haskell space leak</title>+<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />+<meta http-equiv="Pragma" content="no-cache" />+<meta http-equiv="Expires" content="0" /> <link rel="stylesheet" href="style.css" /> </head> <body>
HTML/output.html view
@@ -2,6 +2,9 @@ <html> <head> <title>Leaky : Output Under Seqaid</title>+<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />+<meta http-equiv="Pragma" content="no-cache" />+<meta http-equiv="Expires" content="0" /> <link rel="stylesheet" href="style.css" /> </head> <body>
README view
@@ -5,9 +5,9 @@ compiled -O2.  -leaky-min-cppd.hs  - a tiny Haskell program that leaks in GHC 7.8.3 -O2-leaky-min.hs       - like leaky-min-cppd.hs, with some alternatives-leaky.hs           - a similar but elaborated example, with .cabal flags+  leaky-min-cppd.hs  - a tiny Haskell program that leaks in GHC 7.8.3 -O2+  leaky-min.hs       - like leaky-min-cppd.hs, with some alternatives+  leaky.hs           - a similar but elaborated example, with .cabal flags   In addition to the source files, more information can be found@@ -65,14 +65,14 @@  If you have a version of the compiler that does not leak for the default variant of leaky, please let me know at rasfar@gmail.com,-on in the haskell-cafe thread+or on the reddit discussion: - http://www.reddit.com/r/haskell/comments/2pscxh/ann_deepseqbounded_seqaid_leaky/+  http://www.reddit.com/r/haskell/comments/2pscxh/ann_deepseqbounded_seqaid_leaky/ -announcing leaky.  Also, any discussion whatsoever is most welcome.+It's nice to share your thoughts.  -Sept. 20, 2014+Sept. 20, 2014 / Dec. 2014 Andrew Seniuk rasfar on #haskell 
− Types.hs
@@ -1,111 +0,0 @@-----------------------------------------------------------------------------------  -- XXX Note that -dcore-lint exposes a bug in GHC with this module,-  -- so we cannot have it on when Types.hs recompiles.-  -- Incidentally, this error happens with -O2 but not -O0...-  {-  OPTIONS_GHC -dno-core-lint #-}  -- nonesuch, unfortunately--  {-  OPTIONS_GHC -O2 #-}-  {-# OPTIONS_GHC -O0 #-}--  {-# LANGUAGE CPP #-}--  {-# LANGUAGE DeriveDataTypeable #-}-  {-# LANGUAGE DeriveGeneric #-}-  {-# LANGUAGE StandaloneDeriving #-}-----------------------------------------------------------------------------------  module Types where--  import Control.DeepSeq.Bounded-  import Control.DeepSeq.Generics----import Generics.SOP.TH-  import GHC.Generics ( Generic )-  import Data.Typeable ( Typeable )-  import Data.Data ( Data )--  import System.Random--  import Data.List ( foldl' )---#if 0-#if FORCING_STRATEGY == 4-  import Seqaid.Runtime ( seqaid )-#endif-#if FORCING_STRATEGY >= 5---import Seqaid.Runtime  -- comes in with Seqaid.TH-  import Seqaid.TH-#endif-#endif-----------------------------------------------------------------------------------  type State = TA--  doWork :: Num a => Blob a -> a-  doWork (Blob lst) = foldl' (+) 0 lst--  data Blob a = Blob [a]-    deriving (Show,Generic,Typeable,Data)--  instance (NFData a,Num a) => NFData (Blob a) where rnf x = force (doWork x) `seq` ()-  instance (NFData a,Num a) => NFDataN (Blob a) where rnfn n x = force (doWork x) `seq` ()-  instance (NFData a,Num a,Typeable a) => NFDataP (Blob a) where rnfp p x = force (doWork x) `seq` ()---- XXX Why exactly is this needed, when it wasn't needed when--- everything was in one module??...-#if 0-  {-# NOINLINE hackblah #-}-  hackblah :: IO StdGen-  hackblah = getStdGen-#else-  deriving instance Typeable StdGen-  instance NFData StdGen where rnf x = ()-  instance NFDataN StdGen where rnfn n x = ()-  instance NFDataP StdGen where rnfp p x = ()-#endif--#if 1-  -- (No strict fields.)-  data TA = A1 Int | A2 TB Int TC-  data TB = B1 | B2 TC | B3 Int TA TB-#if USE_STRICT_BLOB-  -- Note: I think Blob must NOT have a strictness bang (!).-  -- Later: I doubt it matters, the way doing Blob's now...-  data TC = C1 Int TC | C2 Int | C3 TC (Blob Int) ![Int] TC-#else-  data TC = C1 Int TC | C2 Int | C3 TC ![Int] TC-#endif-#else-  -- All Int fields strict (!):-  data TA = A1 !Int | A2 TB !Int TC-  data TB = B1 | B2 TC | B3 !Int TA TB-#if USE_STRICT_BLOB-  -- Note: I think Blob must NOT have a strictness bang (!).-  -- Later: I doubt it matters, the way doing Blob's now...-  data TC = C1 !Int TC | C2 !Int | C3 TC (Blob Int) ![Int] TC-#else-  data TC = C1 !Int TC | C2 !Int | C3 TC ![Int] TC-#endif-#endif--#if FORCING_STRATEGY >= 5-  -- LATER: XXX Exactly the opposite is true now; I have-  -- switched off the use of -fplugin-opt= flags, and am-  -- opting for the seqaidTH splice meta-call to signal-  -- to the plugin (via presence of SeqaidAnnIncludeList-  -- annotation) that the module is to be processed.-  --   If you leave this splice active, you get an error,-  -- at the present time (that's the reason for USE_SECOND_MODULE).-  -------  -- No need to comment this out when not in use; the TH code knows-  -- if the plugin is slated to run on a module or not.---seqaidTH-#endif----------------------------------------------------------------------------------
Types_explicit_SOP.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------    -- XXX Note that -dcore-lint exposes a bug in GHC with this module,-  -- so we cannot have it on when Types.hs recompiles.+  -- so we cannot have it on when this module recompiles.   -- Incidentally, this error happens with -O2 but not -O0...   {-  OPTIONS_GHC -dno-core-lint #-}  -- nonesuch, unfortunately @@ -44,7 +44,7 @@  ------------------------------------------------------------------------------- -  module Types where+  module Types_explicit_SOP where    import Control.DeepSeq.Bounded   import Control.DeepSeq.Generics
Types_no_SOP.hs view
@@ -1,11 +1,6 @@  ------------------------------------------------------------------------------- -  -- XXX Note that -dcore-lint exposes a bug in GHC with this module,-  -- so we cannot have it on when Types.hs recompiles.-  -- Incidentally, this error happens with -O2 but not -O0...-  {-  OPTIONS_GHC -dno-core-lint #-}  -- nonesuch, unfortunately-   {-  OPTIONS_GHC -O2 #-}   {-# OPTIONS_GHC -O0 #-} @@ -17,7 +12,7 @@  ------------------------------------------------------------------------------- -  module Types where+  module Types_no_SOP where    import Control.DeepSeq.Bounded   import Control.DeepSeq.Generics
leaky-full.hs view
@@ -228,7 +228,15 @@ #endif #endif -  import Types+#if FORCING_STRATEGY == 0+  import Types_no_SOP+#else+#if FORCING_STRATEGY <= 3+  import Types_explicit_SOP+#else+  import Types_no_SOP+#endif+#endif  --import Temp 
leaky.cabal view
@@ -1,6 +1,6 @@  name:                leaky-version:             0.1.6.0+version:             0.1.7.0 synopsis:            Robust space leak, and its strictification description:         Robust space leak, and its strictification, for testing <http://hackage.haskell.org/package/deepseq-bounded deepseq-bounded> and <http://hackage.haskell.org/package/seqaid seqaid>.                      .@@ -12,8 +12,8 @@ license-file:        LICENSE author:              Andrew G. Seniuk maintainer:          Andrew Seniuk <rasfar@gmail.com>-bug-reports:         Andrew Seniuk <rasfar@gmail.com>---bug-reports:       http://fremissant.net/leaky/trac+bug-reports:         http://fremissant.net/leaky/trac+---bug-reports:         Andrew Seniuk <rasfar@gmail.com> category:            Testing build-type:          Simple cabal-version:       >=1.10@@ -29,9 +29,14 @@      , leaky-full.hs     , leaky-full-incl-types.hs-    , Types_no_SOP.hs-    , Types_explicit_SOP.hs++--  , Types_no_SOP.hs+--  , Types_explicit_SOP.hs+     , seqaid.config+    -- oops...+    , seqaid.config_no_SOP+    , seqaid.config_explicit_SOP     , seqaid.config-full     , seqaid.config-full-incl-types --- , seqaid.config-full-no2ndmod@@ -126,11 +131,9 @@ -- -- XXX Get rid of this Temp one soon (just a wee experiment)!... --   other-modules:       Temp --- XXX Much later: I don't understand this;--- but you definitely need Types in other-modules!!---if flag(USE_STRICT_BLOB)---  other-modules:       Types-  other-modules:       Types+  other-modules:+      Types_no_SOP+    , Types_explicit_SOP    build-depends:      base == 4.*@@ -151,7 +154,12 @@    , generics-sop == 0.1.*    , template-haskell == 2.9.* -   , seqaid == 0.1.6.*+   -- XXX this is no good !! (co-evolving packages)+   -- I guess the best is to leave it unconstrained...+-- , seqaid == 0.1.7.*+   -- Hopefully this will simply install the latest one,+   -- which ought to be fine:+   , seqaid    if flag(OMNITYPIC)     build-depends:
leaky.hs view
@@ -228,7 +228,15 @@ #endif #endif -  import Types+#if FORCING_STRATEGY == 0+  import Types_no_SOP+#else+#if FORCING_STRATEGY <= 3+  import Types_explicit_SOP+#else+  import Types_no_SOP+#endif+#endif  --import Temp 
rough-fs-twiddling-guide.txt view
@@ -1,37 +1,50 @@ -Wed Dec 17 20:50:05 CST 2014- - trying to go over the FS=0..6 again now- - starting from a configuration for 6 (which is the default-   leaky distribution), will go back to 0 and work back up,-   noting what had to do- - the same seqaid.config can be used in all cases+Dec 17 / Dec 21, 2014 +This is (hopefully) instructions on how to exercise+the various FORCING_STRATEGY's.  I can't say I've+tested this very religiously.  Writing this document+helped me make a complicated procedure much simpler!+This document is hardly called for anymore.++Note that the same seqaid.config can be used in all cases.++Oops, need two seqaid.config's after all...++#if FORCING_STRATEGY == 0+  import Types_no_SOP+#else+#if FORCING_STRATEGY <= 3+  import Types_explicit_SOP+#else+  import Types_no_SOP+#endif+#endif+  - FS=0 (does no forcing)+    - cp seqaid.config_no_SOP seqaid.config     - leaky.cabal TURN_ON_SEQAID_PLUGIN flag must be False        - invoke cabal configure --flag=-TURN_ON_SEQAID_PLUGIN        - or, just edit the default in leaky.cabal   - FS=1 (rnf)-    - you need the Types.hs module to do it's own SOP deriving, so:-        cp Types_explicit_SOP.hs Types.hs+    - cp seqaid.config_explicit_SOP seqaid.config+    - no change needed from FS=0     - this would perform immesurably worse if we turned on USE_INFINITE_LIST-    - (and leaky.cabal TURN_ON_SEQAID_PLUGIN flag must still be False)   - FS=2 (rnfn)-    - no change needed from FS=1+    - no change needed from FS=0,1   - FS=3 (rnfp)-    - no change needed from FS=1,2+    - no change needed from FS=0,1,2   - FS=4 (manual seqaid)+    - cp seqaid.config_no_SOP seqaid.config     - leaky.cabal TURN_ON_SEQAID_PLUGIN flag must be True-    - need to uncomment the leaky.cabal plugin options (-fplugin and -F)-    - need to get non-explicit-SOP Types.hs in place:-        cp Types_no_SOP.hs Types.hs   - FS=5 (top-level RHS's)     - no change needed from FS=4   - FS=6 (seqaid.config type-directed harnessing)-    - no change needed from FS=4+    - no change needed from FS=4,5 
seqaid.config view
@@ -1,5 +1,5 @@ package    leaky module     Main   binds    duty-    types  Types.TA-instances  Types.TA, Types.TB, Types.TC+    types  Types_no_SOP.TA+instances  Types_no_SOP.TA, Types_no_SOP.TB, Types_no_SOP.TC
+ seqaid.config_explicit_SOP view
@@ -0,0 +1,5 @@+package    leaky+module     Main+  binds    duty+    types  Types_explicit_SOP.TA+instances  Types_explicit_SOP.TA, Types_explicit_SOP.TB, Types_explicit_SOP.TC
+ seqaid.config_no_SOP view
@@ -0,0 +1,5 @@+package    leaky+module     Main+  binds    duty+    types  Types_no_SOP.TA+instances  Types_no_SOP.TA, Types_no_SOP.TB, Types_no_SOP.TC