packages feed

freesect 0.6 → 0.7

raw patch · 19 files changed

+145/−119 lines, 19 files

Files

000-readme view
@@ -6,7 +6,7 @@  Tested with Haskell Platforms 6.12.3 and 7.0.4. Testing has not been very extensive yet.-Will try to get a quickcheck harness into freesect-0.0.6.+Will try to get a quickcheck harness into freesect-0.0.8.  A patched version of haskell-src-exts is used. These patched modules are provisionally renamed HSE to avoid confusion.@@ -21,10 +21,12 @@  ./z -The script is hardcoded to use the S14.hs test file, but+The script is hardcoded to use the S25.hs test file, but you can easily adjust that. -Preprocessed outputs can be examined in ./ghc* directories.+Preprocessed outputs can be examined in ./ghc* directories, unless+you've unset the GHC_F option, in which case the outputs will be+in files ./Z_*.hs.  For more information, visit http://www.fremissant.net/freesect 
Doc/index.html view
@@ -1,6 +1,7 @@ <html> <head> <title>Free Sections : A Haskell Syntax Extension</title>+<meta http-equiv="Expires" content="Sat, 1 Jan 2000 08:00:00 GMT" /> <!--LINK HREF="base.css" REL="stylesheet" TYPE="text/css"--> <style type="text/css">/*<![CDATA[*/ body { font-family: "Ariel"; font-size: 17; }@@ -70,7 +71,7 @@ <h3 style="margin-top: 10px; margin-bottom: 0;">Haskell Syntax Extension</h3> <h5 style="margin-top: 10px; margin-bottom: 28px;">by Andrew Seniuk</h5> -<div style="color: #B52; font-size: 9pt; font-weight: bold; margin-left: 20px; margin-right: 20%; margin-bottom: 15px; margin-top: 10px;">The reader is strongly encouraged to navigate to <a href="http://www.fremissant.net/freesect">fremissant.net/freesect</a> as these documents are currently experiencing rapid growth and refinement.  The local files represent the best documentation available at packaging of this v.0.0.5 source distribution (March 11, 2012).</div>+<div style="color: #B52; font-size: 9pt; font-weight: bold; margin-left: 20px; margin-right: 20%; margin-bottom: 15px; margin-top: 10px;">The reader is strongly encouraged to navigate to <a href="http://www.fremissant.net/freesect">fremissant.net/freesect</a> as these documents are currently experiencing rapid growth and refinement.  The local files represent the best documentation available at packaging of this v0.7 source distribution (March 15, 2012).</div>  <i>Free sections</i> are syntactic sugar to extend the usual notion of  "section" in functional programming.@@ -84,28 +85,21 @@   f 4 True         -- Char -&gt; Float -&gt; String </pre> -By using wildcard symbols (<pre2>__</pre2>, a -double-underscore), any subset of values occurring in a RHS context can -be deferred, in the same spirit as partial function application.-Special brackets (<pre2>_[…]_</pre2>) are used to delimit -the lexical extent (or context) of the section, although these can -sometimes be omitted (details below).-The free section is then a function with arity at least equal to the -number of wildcards, and behaves as if a helper function had been -defined which shuffled the argument order of the functional expression, -turning it into a normal section.+By using wildcard symbols (<pre2>__</pre2>, a double-underscore), any subset of values occurring in a RHS context can be deferred, in the same spirit as partial function application.+When necessary, special brackets (<pre2>_[</pre2><pre3>&hellip;</pre3><pre2>]_</pre2>) are used to delimit the lexical extent (or context) of the section, although these can usually be omitted (details below).+The free section is then a function with arity at least equal to the number of wildcards, and behaves as if a helper function had been defined which shuffled the argument order of the functional expression, turning it into a normal section. <p> Philosophically, use of this sort of syntax promotes "higher-order programming", since any expression can so easily be made into a function, in numerous ways, simply by replacing parts of it with freesect wildcards. That this is worthwhile is demonstrated by the frequent usefulness of sections. <p>-Some examples, including illustrations of context inferencing:-<ul id="examples">-<li><pre2>_[ __ ]_ &lt;=&gt; ( __ ) &lt;=&gt; id</pre2></li>-<li><pre2>map&nbsp; _[ (+) __ 2 ]_&nbsp; [1,2,3]&nbsp;&nbsp; =&gt;&nbsp;&nbsp; [3,4,5]</pre2></li>-<li><pre2>map&nbsp;&nbsp; ( (+) __ 2 )&nbsp;&nbsp; [1,2,3]&nbsp;&nbsp; =&gt;&nbsp;&nbsp; [3,4,5]</pre2></li>-<li><pre2>zipWith $ f __ $ g __ z &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;=&gt;&nbsp;&nbsp; zipWith _[ f __ $ g __ z ]_</pre2></li>-</ul>-<p>+The <a href="http://www.fremissant.net/freesect/primitives.html">complete table</a> of Haskell expression translations probably forms the best set of examples I have to offer.+Some other examples, including illustrations of context inferencing:+<pre>+  map&nbsp; <pre3>_</pre3>[ (+) <pre3><pre3>__</pre3></pre3> 2 ]<pre3>_</pre3>&nbsp; [1,2,3]&nbsp;&nbsp;=&nbsp;&nbsp;[3,4,5]+  map&nbsp;&nbsp; ( (+) <pre3><pre3>__</pre3></pre3> 2 )&nbsp;&nbsp; [1,2,3]&nbsp;&nbsp;=&nbsp;&nbsp;[3,4,5]+  zipWith $ f <pre3><pre3>__</pre3></pre3> $ g <pre3><pre3>__</pre3></pre3> z &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;zipWith <pre3>_</pre3>[ f <pre3><pre3>__</pre3></pre3> $ g <pre3><pre3>__</pre3></pre3> z ]<pre3>_</pre3>+</pre>+ For a more complex example, consider a situation where some API provides you with the dreaded <pre2>dreadme</pre2> function, which you have need of using. The example is designed to show that you can really put the <pre2>__</pre2>'s anywhere on a RHS that an expression can go. @@ -116,13 +110,13 @@    data D a = D Int [a] -  v = map3  _[ dreadme tableA __ (repeat True,__) (D __ [(+),(*)]) ]_+  v = map3  ( dreadme tableA <pre3>__</pre3> (repeat True,<pre3>__</pre3>) (D <pre3>__</pre3> [(+),(*)]) )             [tableA,tableB]             [0..]             [-1,1] </pre> -FreeSect rewrites the RHS of <pre2>v</pre2> (where <pre2>fs0…fs2</pre2> must be fresh identifiers) to:+FreeSect rewrites the RHS of <pre2>v</pre2> (where <pre2>fs0</pre2><pre3>&hellip;</pre3><pre2>fs2</pre2> must be fresh identifiers) to:  <pre>  v = map3  (\ fs0 fs1 fs2 -&gt; dreadme tableA fs0 (repeat True,fs1) (D fs2 [(+),(*)]) )             [tableA,tableB]@@ -142,7 +136,7 @@                                else   filter' ps xs   map2 :: (a-&gt;b-&gt;c) -&gt; [a] -&gt; [b] -&gt; [c]   map2 f (x:xs) (y:ys) = (f x y) : map2 f xs ys-  map2' :: [a-&gt;a-&gt;a] -&gt; [a] -&gt; [a] -&gt; [[a]]+  map2' :: [a-&gt;b-&gt;c] -&gt; [a] -&gt; [b] -&gt; [[c]]   map2' (f:fs) xs ys = (map2 f xs ys) : map2' fs xs ys   map3 :: (a-&gt;b-&gt;c-&gt;d) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d]   map3 f (x:xs) (y:ys) (z:zs) = (f x y z) : map3 f xs ys zs@@ -178,60 +172,72 @@ </li><li>the lambda is longer overall, and prefaces the expression of interest with something like micro-boilerplate</li> </ul> -On the other hand, the lambda is more powerful and can achieve arbitrary permutations without further ado.+On the other hand, the lambda is more powerful:+<ul>+<li>it can achieve arbitrary permutations without further ado</li>+<li>it is more expressive when nesting is involved, because the variables are not anonymous</li>+</ul>  <h2>Implementation</h2> -The <a href="http://fremissant.net/freesect/freesect-0.0.5.tar.gz">implementation</a> seems to be working.+The <a href="http://www.fremissant.net/freesect/freesect-0.7.tar.gz">implementation</a> seems to be working. The <pre2>freesect</pre2> package can also be installed from <a href="http://hackage.haskell.org/package/freesect">Hackage</a>, for instance using <pre2>cabal-install</pre2>. I offer fair warning that I'm <i>not</i> a good Haskell coder, but this does demonstrate how a person of modest abilities can use <a href="http://hackage.haskell.org/package/syb">SYB</a> with <a href="http://hackage.haskell.org/package/haskell-src-exts">HSE</a> to create a robust Haskell syntax extension.  <h2>Default context inferencing</h2> -A default context is automatically applied when the <pre2>_[…]_</pre2> grouping syntax is omitted.+<b>Note</b>: The following policy is flawed as pointed out by <pre3>&lt;ski&gt;</pre3> on <pre3>#haskell</pre3>, since+<br />+<pre style="font-size: 12pt; font-weight: normal;">+  &lt;ski&gt; this clearly means that `(f __) a' (meaning `(\x -&gt; f x) a') is+        different from `f __ a' (meaning `\x -&gt; f x a')+</pre>++A default context is automatically applied when the <pre2>_[</pre2><pre3>&hellip;</pre3><pre2>]_</pre2> grouping syntax is omitted. Defining this default can be tricky, and a bit arbitrary, so for robust code it's best to use explicit bracketing.-As of v.0.0.5, when the <pre2>_[…]_</pre2> are omitted, the defaulting rules are as follows:+As of v0.6, when the <pre2>_[</pre2><pre3>&hellip;</pre3><pre2>]_</pre2> are omitted, the defaulting rules are as follows: The semilattice join of all unbacketed wildcards in a RHS are given context of the innermost enclosing parentheses or infix <pre2>$</pre2> operation. If no such parentheses or infix <pre2>$</pre2> are present, the whole RHS becomes the default context.-Some of the examples at the top of the page demonstrate these rules.+Some of the examples demonstrate these rules. One hopes that the default will result in a type error, should the inferred context differ from the intended. I haven't thought of any situation where more than one bracketing of freesect wildcards yield typeable expressions, but neither have I ruled it out.-A context inference policy based on typeability tests among various possible scopes would also be possible...+A context inference policy based on typeability tests among various possible scopes would also be possible, although probably ill-advised.  <h2>Background</h2> -There was <a href="http://fremissant.net/freesect/irc.html">discussion</a>+There was <a href="http://www.fremissant.net/freesect/irc.html">discussion</a>  about this on the <pre4>#haskell</pre4> IRC channel. Strangely, <pre4>&lt;eyebloom&gt;</pre4> suggested the same thing an hour after I had started making inquiries about how to go about writing an extension -- and this is the one I had in mind. It's an extraordinary coincidence, as I first sketched the idea in 2003, and had never seen it mentioned <i>per&nbsp;se</i>, beyond discussions of point-free and the like. (Despite <pre4>&lt;eyebloom&gt;</pre4> asking to be contacted if I wanted to work on this, my email was never answered; I didn't run off with their idea!) The principal example from that chat is described here. <br />-<pre style="font-weight: normal;">+<pre style="font-size: 12pt; font-weight: normal;">   &lt;dolio&gt; map (foo (g _) x) (h _)   &lt;dolio&gt; Matter of fact, what does "map (foo (g _) x) (h _)" mean? </pre> Given the present context inferencing policy, <pre>-  (map (foo (g _) x) (h _))  =&gt;  \ y z -&gt; map (foo (g y) x) (h z)+  map (foo (g <pre3>__</pre3>) x) (h <pre3>__</pre3>)  =  \ a b -&gt; map (foo (g a) x) (h b) </pre>-The outer parentheses might be necessary, depending on the larger context of the expression.-This interpretation might not be what the programmer intended, in which case at least a <pre2>$</pre2> is needed+Outer parentheses might also be necessary, depending on the larger context of the expression.+(The same is true for some of the others below, if the full expression extends further to the right.)+This interpretation may not be what the programmer intended, in which case at least a <pre2>$</pre2> is needed <pre>-  (map $ (foo (g __) x) (h __))  =&gt;  map ( \ y z -&gt; (foo (g y) x) (h z) )+  map $ (foo (g <pre3>__</pre3>) x) (h <pre3>__</pre3>)  =  map $ \ a b -&gt; (foo (g a) x) (h b) </pre>-Finally, if two separate free sections were intended, the programmer would need to use <pre2>_[…]_</pre2> bracketing for at least one of them+Finally, if two separate free sections were intended, the programmer would need to use <pre2>_[</pre2><pre3>&hellip;</pre3><pre2>]_</pre2> bracketing for at least one of them <pre>-       map  _[foo (g __) x]_   _[h __]_-  &lt;=&gt;  map   (foo (g __) x)    _[h __]_-  &lt;=&gt;  map  _[foo (g __) x]_    (h __)-  &lt;=&gt; (map  _[foo (g __) x]_  $  h __)+     map  <pre3>_</pre3>[foo (g <pre3>__</pre3>) x]<pre3>_</pre3>   <pre3>_</pre3>[h <pre3>__</pre3>]<pre3>_</pre3>+  =  map   (foo (g <pre3>__</pre3>) x)    <pre3>_</pre3>[h <pre3>__</pre3>]<pre3>_</pre3>+  =  map  <pre3>_</pre3>[foo (g <pre3>__</pre3>) x]<pre3>_</pre3>    (h <pre3>__</pre3>)+  =  map  <pre3>_</pre3>[foo (g <pre3>__</pre3>) x]<pre3>_</pre3>  $  h <pre3>__</pre3> </pre> all of which are rewritten by FreeSect to <pre>-  map (\y-&gt;foo (g y) x) (\z-&gt;h z)+  map (\a-&gt;foo (g a) x) (\b-&gt;h b) </pre>-This interpretation cannot by typed, since the second argument of <pre2>map</pre2> must be have kind <pre2>*</pre2>, while <pre2>\z-&gt;h&nbsp;z</pre2> has kind <pre2>*-&gt;*</pre2>.+This interpretation cannot by typed, since the second argument of <pre2>map</pre2> must be have kind <pre2>*</pre2>, while <pre2>\b-&gt;h&nbsp;b</pre2> has kind <pre2>*-&gt;*</pre2>.  <h2>Other details</h2> @@ -242,9 +248,7 @@ There is no danger of exporting these names inadvertently, as they never have top-level scope. Imported names which are in scope but never used will not incur conflicts. <p>-A few things don't work quite right yet.-Guarded RHS's are not yet handled.-Default free section contexts in <pre2>let</pre2> expressions need to be parenthesised.+A few things don't work quite right yet, such as list comprehensions. Work continues...  <h2>How to run it</h2>
Doc/irc.html view
@@ -1,6 +1,7 @@ <html> <head>-</style>+<title>FreeSect - #haskell discussion (Feb. 22, 2012)</title>+<meta http-equiv="Expires" content="Sat, 1 Jan 2000 08:00:00 GMT" /> </head> Feb. 22, 2012 -- some omissions and contractions of the literal logs.<br /><br /> <table>
FilesAndParsing.hs view
@@ -1,12 +1,12 @@ ---    Package:  freesect-0.6--- Executable:  freesect---     Author:  Andrew Seniuk <rasfar@gmail.com>---       Date:  March 11, 2012---    License:  BSD3 (./LICENCE)---   Synopsis:  Extend Haskell to support free sections---    Example:  zipWith (f __ b __ d) as bs---      Usage:  See accompanying files 000-readme and z+--     Package:  freesect-0.7+-- Description:  Extend Haskell to support free sections+--     Example:  zipWith (f __ b __ d) as cs+--      Author:  Andrew Seniuk <rasfar@gmail.com>+--        Date:  March 11, 2012+--     License:  BSD3 (./LICENCE)+--  Executable:  freesect+--       Usage:  See accompanying files 000-readme and z  {-# LANGUAGE CPP #-} 
Main.hs view
@@ -1,12 +1,12 @@ ---    Package:  freesect-0.6--- Executable:  freesect---     Author:  Andrew Seniuk <rasfar@gmail.com>---       Date:  March 11, 2012---    License:  BSD3 (./LICENCE)---   Synopsis:  Extend Haskell to support free sections---    Example:  zipWith (f __ b __ d) as bs---      Usage:  See accompanying files 000-readme and z+--     Package:  freesect-0.7+-- Description:  Extend Haskell to support free sections+--     Example:  zipWith (f __ b __ d) as cs+--      Author:  Andrew Seniuk <rasfar@gmail.com>+--        Date:  March 11, 2012+--     License:  BSD3 (./LICENCE)+--  Executable:  freesect+--       Usage:  See accompanying files 000-readme and z  {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-}  -- needed for some of the type sigs.
Makefile view
@@ -1,11 +1,11 @@ -# BINPATHNAME-/media/ramdisk/freesect: \+# >>BINPATHNAME<<+./dist/build/freesect/freesect: \ ./Main.hs ./FilesAndParsing.hs ./HSE.hs ./HSE/Annotated.hs ./HSE/Annotated/Build.hs ./HSE/Annotated/ExactPrint.hs ./HSE/Annotated/Fixity.hs ./HSE/Annotated/Simplify.hs ./HSE/Annotated/Syntax.hs ./HSE/Build.hs ./HSE/Comments.hs ./HSE/ExtScheme.hs ./HSE/Extension.hs ./HSE/Fixity.hs ./HSE/Lexer.hs ./HSE/ParseMonad.hs ./HSE/ParseSyntax.hs ./HSE/ParseUtils.hs ./HSE/Parser.hs ./HSE/Pretty.hs ./HSE/SrcLoc.hs ./HSE/Syntax.hs ./HSE/InternalParser.hs 	csh ile  # Needed because of use of CPP definitions across multiple source files.-# They are defined using -optP to GHC, so changes to those options in ./ile+# They are defined using -optP to GHC, so changes to those options in ./z # require recompilation of affected modules. ./Main.hs: ./z 	touch Main.hs
S14.hs view
@@ -7,7 +7,8 @@    data D = D Int String -  main = printList $ zipWith _[ f (__,b) $ D __ d ]_ as cs+  main = printList $ zipWith  ( f (__,b) $ D __ d )  as cs  -- now possible+--main = printList $ zipWith _[ f (__,b) $ D __ d ]_ as cs     where        f :: (Char,Float) -> D -> String        f (a,b) (D c d) = d ++ ( show ( b * fromIntegral (ord a + c) ) )
S15.hs view
@@ -3,11 +3,11 @@    module S15(main) where -  main = do putStrLn $ unlines $ map show [v1,v2,v3,v4,v5,v6,v7,v8,v9]+  main = do putStrLn $ unlines $ map show [v1,v2,v3,v4,v5,v6,v7,v8]+--main = do putStrLn $ unlines $ map show [v1,v2,v3,v4,v5,v6,v7,v8,v9] -  v0= (f __ y)-  v9= map (foo (g __) x) (h __)-  v8= _[ __ ]_ 5+--v9= map (foo (g __) x) (h __)+  v8= [ _[ __ ]_ 5 ]   v7= let f = (+) in zipWith f [1,2,3] [4,5,6]   v6= let f = ( (+) __ 2 ) in map f [1,2,3]   v5= let f = (+) __ 2 in map f [1,2,3]
S23.hs view
@@ -7,12 +7,12 @@   --   -- This module won't compile, but you can examine the preprocessed code. -  sectA = zipWith  ( f __ y __ )-  sectB = zipWith _[ f __ y __ ]_-  sectC = zipWith  $ f __ y __-  sectD = zipWith ( f __ ( g __ z ) ) xs-  sectE = zipWith ( f __ $ g __ z ) xs-  sectF = zipWith $ f __ $ g __ z xs-  sectG = zipWith $ f __ $ g __ z-  sectH = f __ $ g __ z+  v= zipWith  ( f __ y __ )+  v= zipWith _[ f __ y __ ]_+  v= zipWith  $ f __ y __+  v= zipWith ( f __ ( g __ z ) ) xs+  v= zipWith ( f __ $ g __ z ) xs+  v= zipWith $ f __ $ g __ z xs+  v= zipWith $ f __ $ g __ z+  v= f __ $ g __ z 
S24.hs view
@@ -2,7 +2,7 @@   {- # LANGUAGE FreeSections #-}  -- with GHC's -F you cannot...    -- Might as well test interaction with the pre-existing-  -- tuple section generalisation.+  -- tuple section generalisation.  (GHC knows about this one.)   {-# LANGUAGE TupleSections #-}    module S24 where@@ -50,18 +50,18 @@   v= _[ Ctor { f3 = __ } ]_ 2   -- EnumFrom Exp                 -- unbounded arithmetic sequence   v= _[ [__..] ]_-  v= _[ [__..] ]_ $ 3+  v= _[ [__..] ]_ 3   -- EnumFromTo Exp Exp           -- bounded arithmetic sequence-  v= _[ [__..__] ]_ $ 3 5+  v= _[ [__..__] ]_ 3 5   -- EnumFromThen Exp Exp         -- unbounded arithmetic sequence with stride-  v= _[ [__,__..] ]_ $ 3 5+  v= _[ [__,__..] ]_ 3 5   -- EnumFromThenTo Exp Exp Exp   -- bounded arithmetic sequence with stride-  v= _[ [__,__..__] ]_ $ 3 5 8+  v= _[ [__,__..__] ]_ 3 5 8   -- ListComp Exp [QualStmt]      -- ordinary list comprehension-  v= _[ [f __ x|x<-[1..3]] $ 2 ]_+  v= _[ [f __ x|x<-[1..3]] ]_ 2 {- still not working-  v= _[ [f  2 x|x<-  __  ] $ [1..3] ]_-  v= _[ [f __ x|x<-  __  ] $ 2 [1..3] ]_+  v= _[ [f  2 x|x<-  __  ] ]_ [1..3]+  v= _[ [f __ x|x<-  __  ] ]_ 2 [1..3] -}   -- ParComp  Exp [[QualStmt]]    -- parallel list comprehension --v= ??
S25.hs view
@@ -1,6 +1,9 @@    {- # LANGUAGE FreeSections #-}  -- with GHC's -F you cannot...-  {-# LANGUAGE TupleSections #-}  -- with GHC's -F you cannot...++  -- Might as well test interaction with the pre-existing+  -- tuple section generalisation.  (GHC knows about this one.)+  {-# LANGUAGE TupleSections #-}    module S25 where 
S26.hs view
@@ -1,10 +1,12 @@ -  {-# LANGUAGE FreeSections #-}  -- with GHC's -F you cannot...+  {- # LANGUAGE FreeSections #-}  -- with GHC's -F you cannot... +  -- Testing guarded RHS's which are finally supported.+   module S26 where    v x | x == 1     = g _[ a __ b ]_ __ c       | x == 2     = g _[ a __ b ]_ __ c-      | _[ __ == 2 ]_    = g _[ a __ b ]_ __ c+--    | _[ __ == 2 ]_ 3  = g _[ a __ b ]_ __ c  -- error "not RHS context" or so       | otherwise  = g _[ a __ b ]_ __ c 
+ S27.hs view
@@ -0,0 +1,11 @@+  {- # LANGUAGE FreeSections #-}  -- with GHC's -F you cannot...++  module S27 where++  v= f __ y++  v= a $ b __ c $ d++--v= [x|x<- __ ] [1..3]  -- XXX still a problem, but must be commented-out+--                       -- because otherwise freesect runtime error.+
cln view
@@ -1,8 +1,8 @@ #!/bin/csh -# CLNSCRIPT (don't remove this comment or change the two following lines)-#echo "Check script first, it uses rm..."-#exit 1+# >>CLNSCRIPT<<+ echo "Check script first, it uses rm..."+ exit 1  ## Temp file created by freesect (non GHC -F mode): rm -f Z_[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]* >&! /dev/null@@ -12,6 +12,9 @@  ## Test input's GHC-generated files: rm -f S[0-9][0-9].{o,hi} S[0-9][0-9] >&! /dev/null++## Regenerated with cabal sdist:+#rm -rf ./dist >&! /dev/null  ## FreeSect linked binary: #rm -f /media/ramdisk/freesect >&! /dev/null
freesect.cabal view
@@ -1,6 +1,6 @@ Name:                freesect-Version:             0.6-Synopsis:            A Haskell syntax extension for generalised sections.+Version:             0.7+Synopsis:            A Haskell syntax extension for generalised sections Description:     This package provides a preprocessor executable, \'freesect\',      which implements a generalisation of sections (\'free sections\')@@ -10,18 +10,17 @@ Homepage:            http://fremissant.net/freesect License:             BSD3 License-file:        LICENSE-Author:              Andrew Seniuk <rasfar@gmail.com>+Author:              Andrew Seniuk Maintainer:          Andrew Seniuk <rasfar@gmail.com>-bug-reports:         Please send email to the maintainer. Stability:           Provisional Category:            Language Build-type:          Custom Cabal-version:       >= 1.2.3 Extra-source-files:-  -- You may not make use of all of these ones:-  000-readme, Makefile, cln, freesect.sh, ile, z, zpack+  -- You might not make use of these ones:+  000-readme, Makefile, cln, freesect.sh, ile, z, zpack,   -- These are example modules containing free sections for testing:-  S14.hs, S15.hs, S23.hs, S24.hs, S25.hs, S26.hs+  S14.hs, S15.hs, S23.hs, S24.hs, S25.hs, S26.hs, S27.hs,   -- Snapshot of documentation; visit the homepage for up-to-date versions:   Doc/index.html, Doc/irc.html,   -- The rest are critical for building freesect:
freesect.sh view
@@ -1,11 +1,11 @@ #!/bin/sh -# RTSOPTS (do not remove this comment; the next line is automatically edited)+# >>RTSOPTS<< rtsopts="+RTS -K96m -RTS" -# BINPATHNAME (do not remove comment, or change the following two lines)- binpathname=/media/ramdisk/freesect-#binpathname=./dist/build/freesect/freesect+# >>BINPATHNAME<<+#binpathname=/media/ramdisk/freesect+ binpathname=./dist/build/freesect/freesect  $binpathname \    $rtsopts \
ile view
@@ -10,9 +10,9 @@    mkdir -p dist/build/freesect/freesect-tmp >&! /dev/null -# BINPATHNAME (do not remove comment, or change the following two lines)- set binpathname = /media/ramdisk/freesect-#set binpathname = ./dist/build/freesect/freesect+# >>BINPATHNAME<<+#set binpathname = /media/ramdisk/freesect+ set binpathname = ./dist/build/freesect/freesect    ghc --make \        -idist/build/freesect/freesect-tmp \
z view
@@ -10,10 +10,10 @@ if ( ${#argv} == 0 ) then   set test=S25 else if ( ${#argv} > 1 ) then-  shift   foreach i ( $* )-    source ./z+    source ./z $i   end+  exit else   set test=$1 endif@@ -102,9 +102,9 @@  echo freesect infiles=$infiles outfile=$outfile -# BINPATHNAME (do not remove comment, or change the following two lines)- set binpathname = /media/ramdisk/freesect-#set binpathname = ./dist/build/freesect/freesect+# >>BINPATHNAME<<+#set binpathname = /media/ramdisk/freesect+ set binpathname = ./dist/build/freesect/freesect  $binpathname \   $rtsopts \
zpack view
@@ -1,6 +1,6 @@ # -# Package with cabal, and attempt build in test dir ../TestPack.+# Package with cabal, and attempt build in test dir ./TestBuild.  # 1) We need to change the path to build the binary executable, #    from /media/ramdisk to . (dot).@@ -25,7 +25,7 @@ 'EOF' ed -s ./Makefile >&! /dev/null <<'EOF' /BINPATHNAME/-.+1s/..*/.\/.\/dist\/build\/freesect\/freesect: \\/+.+1s/..*/.\/dist\/build\/freesect\/freesect: \\/ wq 'EOF' ed -s ./cln >&! /dev/null <<'EOF'@@ -80,10 +80,10 @@ # 4) Set up the TestBuild dir.  set srcdir=$cwd-/bin/rm -rf ../TestBuild >&! /dev/null-mkdir ../TestBuild-cp -p dist/freesect-*.tar.gz ../TestBuild-cd ../TestBuild+/bin/rm -rf TestBuild >&! /dev/null+mkdir TestBuild+cp -p dist/freesect-*.tar.gz TestBuild+cd TestBuild tar zxf freesect-*.tar.gz cd freesect-*[0-9]