Austin Seipp avatar Austin Seipp committed f1e3d4b

Prep for release on hackage.

Signed-off-by: Austin Seipp <mad.one@gmail.com>;

Comments (0)

Files changed (8)

 *.o
 *.hi
 *~
-tests/NonTerminating
-dist
+dist*
+tests/*.o
+tests/*.hi
+tests/Traced
+Original author: Max Bolingbroke
+Maintainer: Austin Seipp <mad.one@gmail.com>

LICENSE

-Copyright (c) 2008-2011, Maximilian Bolingbroke, Austin Seipp
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted
-provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of
-      conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of
-      conditions and the following disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
-      endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+The Glasgow Haskell Compiler License
+
+Copyright 2002, The University Court of the University of Glasgow.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+- Neither name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
+GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+# GHC plugin for making functions strict.
+
+This plugin gives an example of defining a compiler plugin for
+GHC. You mark functions with the `Strictify` annotation and GHC makes
+the function strict (by recursively expanding non-recursive let
+bindings into case bindings.)
+
+[travis-ci.org](http://travis-ci.org) results: [![Build Status](https://secure.travis-ci.org/thoughtpolice/strict-ghc-plugin.png?branch=master)](http://travis-ci.org/thoughtpolice/strict-ghc-plugin)
+
+[Homepage][main page].
+
+# Installation
+
+Install the latest version of the plugin from Hackage (requires GHC 7.4.1):
+
+    $ cabal install strict-ghc-plugin
+
+# Join in
+
+File bugs in the GitHub [issue tracker][].
+
+Master [git repository][gh]:
+
+* `git clone https://github.com/thoughtpolice/strict-ghc-plugin.git`
+
+There's also a [BitBucket mirror][bb]:
+
+* `git clone https://bitbucket.org/thoughtpolice/strict-ghc-plugin.git`
+
+# Authors
+
+See [AUTHORS.txt](https://raw.github.com/thoughtpolice/strict-ghc-plugin/master/AUTHORS.txt).
+
+# License
+
+BSD3. See `LICENSE.txt` for terms of copyright and redistribution.
+
+[main page]: http://thoughtpolice.github.com/strict-ghc-plugin
+[issue tracker]: http://github.com/thoughtpolice/strict-ghc-plugin/issues
+[gh]: http://github.com/thoughtpolice/strict-ghc-plugin
+[bb]: http://bitbucket.org/thoughtpolice/strict-ghc-plugin
 
 import Control.Monad
 import Data.Generics
-import Data.Maybe
 
 import Strict.Annotation
 
   return $ guts { mg_binds = newBinds }
 
 strictifyFunc :: ModGuts -> CoreBind -> CoreM CoreBind
-strictifyFunc guts x@(NonRec b e) = do 
-  b <- shouldStrictify guts b
-  case b of
+strictifyFunc guts x@(NonRec b _) = do 
+  b' <- shouldStrictify guts b
+  case b' of
     True -> everywhereM (mkM strictifyExpr) x
     False -> return x
 strictifyFunc guts x@(Rec bes) = do

strict-ghc-plugin.cabal

-Name:           strict-ghc-plugin
-Version:        0.1
-License:        BSD3
-License-File:   LICENSE
-Synopsis:       Turn Haskell into a strict language with a compiler plugin
-Description:    This library allows you to annotate top-level function definitions, and the compiler will make them strict functions as opposed to lazy - you can turn Haskell into a strict language!
-Cabal-Version:  >= 1.10
-Build-Type:     Simple
-Author:         Max Bolingbroke <batterseapower@hotmail.com>
-Maintainer:     Austin Seipp <as@hacks.yi.org>
-Homepage:       http://github.com/thoughtpolice/strict-ghc-plugin
-Bug-reports:    https://github.com/thoughtpolice/strict-ghc-plugin/issues
+name:                strict-ghc-plugin
+version:             0.0
+synopsis:            Compiler plugin for making Haskell strict
+description:
+  This plugin gives an example of defining a compiler plugin for
+  GHC. You mark functions with the `Strictify` annotation and GHC
+  makes the function strict (by recursively expanding non-recursive
+  let bindings into case bindings.)
+homepage:            http://thoughtpolice.github.com/strict-ghc-plugin
+bug-reports:         http://github.com/thoughtpolice/strict-ghc-plugin/issues
+license:             BSD3
+license-file:        LICENSE.txt
+copyright:           Copyright (c) the GHC authors
+author:              The GHC authors
+maintainer:          Austin Seipp <mad.one@gmail.com>
+category:            Compiler Plugin
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:         GHC == 7.4.1
+
+extra-source-files:
+  AUTHORS.txt README.md
+  tests/*.hs tests/Makefile
 
 source-repository head
   type: git
   location: https://github.com/thoughtpolice/strict-ghc-plugin.git
 
-Library
-    Exposed-Modules:
-        Strict.Plugin
-        Strict.Annotation
-    Other-Modules:
-        Strict.Pass
-    Build-Depends:
-        base,
-        syb,
-        ghc >= 7.2
-    default-language: Haskell98
+library
+  exposed-modules:
+    Strict.Plugin
+    Strict.Annotation
+  other-modules:
+    Strict.Pass
+  build-depends:
+    base         >= 4,
+    ghc          >= 7.4,
+    syb
+
+  ghc-options:        -Wall -O2 -funbox-strict-fields
+                      -fwarn-tabs
+  default-extensions: CPP
+  default-language:   Haskell2010
+all:
+	ghc -O2 -fforce-recomp -fplugin Strict.Plugin NonTerminating
+clean:
+	rm -f *.o *.hi NonTerminating
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.