ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)
Fellow Haskelleers, I'm pleased to report that I feel I have now completed the first milestone in my GSoC project for haskell-src-exts: Full Code Support. This means I feel ready to take that scary leap that means to drop the safe 0.x version numbering (experimental) and finally make the first stable release, version 1.0.0. But before I take that leap I want the library to be thoroughly tested, so I can with confidence say that it truly *is* stable. Therefore, I hereby announce the release on hackage of haskell-src-exts-0.5.2, which I consider (almost) a release candidate for 1.0.0. * Via cabal: cabal install haskell-src-exts * On Hackage: http://hackage.haskell.org/package/haskell-src-exts-0.5.2 * Via darcs: darcs get http://code.haskell.org/haskell-src-exts I would be delighted if as many as possible would consider testing it on their code, even those of you who feel that you may not have any immediate use of the library, just to cover as much code base as possible in the hunt for potential bugs and misfeatures. Testing it is really easy, four simple steps:
cabal install haskell-src-exts [...] ghci [...] Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFile "YourFileHere.(l)hs"
If you get a parse error on a file that you feel should have been accepted, let me know! If the parser gives you an AST result for a file that you feel it shouldn't have accepted, let me know! Here's the bug tracker: http://trac.haskell.org/haskell-src-exts/report/1 The reason I say it is "almost" a release candidate is that while I consider the functionality to be in place, I will tidy up the exports, add a few more convenient functions to export, and add a lot of documentation, before I make the actual release. If you have a request for a particularly conventient function to add to the list of exports from the package, it's thus not too late to get it into 1.0.0. :-) What's cool in haskell-src-exts-0.5.2: ============================ * Support for all syntactic extensions supported by GHC, with two exceptions: UnicodeSyntax and NewQualifiedOperators. These will likely be added in the next feature release. Exclusive support for the newly registered XmlSyntax and RegularPatterns extensions. No support (yet) for Hugs-specific extensions (RestrictedTypeSynonyms, ExtensibleRecords, HereDocuments). No support for CPP. Also does not support the GHC-specific relaxation of layout in do-blocks, which is an unregistered extension (that should be registered!). * Support for parametrising the parsing on what extensions it should recognise. With no extensions given, it assumes Haskell98. Note that 'parseFile' will look for language pragmas in your source file to decide what extensions to use when parsing. If you want to be explicit, you can use 'parseFileWithExts', or 'parseFileWithMode' that lets you set a few other things as well. I intend to add some convenient names of extension groups, such as 'ghcExtensions' and 'glasgowExts', this is one area where I would particularly welcome suggestions. * Support for correct fixities of infix operators. By default it uses the fixities defined in the Prelude, as well as in the current document (including local let-bound fixities). Use 'parseFileWithMode' to set a different set of fixities. Language.Haskell.Exts.Fixity defines preludeFixities and baseFixities (all fixities defined in the base package), as well as combinators for defining your own sets. Much thanks to Neil Mitchell for the meat of this code. * No (known) bugs! :-) Special note for users of HaRP/HSP: I've uploaded a new version of hsx, hsx-0.5.0, that works with haskell-src-exts-0.5.2. There is one known bug in this version though, it cannot handle 'proc' entities from the Arrows extensions, I'm still considering how to fix that. In the mean time you can use it just fine, as long as your files don't contain any 'proc' blocks (which the old version couldn't handle anyway). Cheers and happy Haskelling, /Niklas
* Via cabal: cabal install haskell-src-exts
Thanks a lot to Brian Lewis for catching the first bug - cabal install doesn't even work for 0.5.2! The problem is that the cabal test machinery can't find the Language.Haskell.Exts modules, unless haskell-src-exts is already installed first... At any rate: I'm pleased to announce haskell-src-exts-0.5.3! Everything else from above still applies. :-) Cheers, /Niklas
On Jun 17, 2009, at 12:43 AM, Niklas Broberg wrote:
Testing it is really easy, four simple steps:
cabal install haskell-src-exts [...] ghci [...] Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFile "YourFileHere.(l)hs"
This script may even simplify testing of large code bases: ------- #! /usr/bin/env runhaskell
import System import System.IO import Data.Char import Language.Haskell.Exts
import Prelude hiding ( catch ) import Control.Exception ( catch, SomeException )
main = getArgs >>= mapM_ parse where parse file = do hSetBuffering stdout NoBuffering putStr $ file ++ ": " catch (parseFile file >>= putStr . check) $ \e -> print (e :: SomeException) where check (ParseOk _) = replicate (2+length file) '\b' check (ParseFailed loc msg) = unlines [err] where err = msg ++ " at " ++ show (srcLine loc) ++ ":" ++ show (srcColumn loc)
After making it executable you can run it as shell script and pass names of Haskell files -- (something like) this will check all Haskell files (literate or not) in your home directory: find ~ -name "*hs" | xargs parse-haskell.lhs Cheers, Sebastian -- Underestimating the novelty of the future is a time-honored tradition. (D.G.)
Hi all,
This means I feel ready to take that scary leap that means to drop the safe 0.x version numbering (experimental) and finally make the first stable release, version 1.0.0. But before I take that leap I want the library to be thoroughly tested, so I can with confidence say that it truly *is* stable. Therefore, I hereby announce the release on hackage of haskell-src-exts-0.5.2, which I consider (almost) a release candidate for 1.0.0.
I have just uploaded haskell-src-exts-0.5.4 to hackage, which is 1.0.0 rc2. Thanks a lot to those who tested the previous version, and please continue to test and report! Changes in 0.5.4: ================== Three fixed bugs: * BangPatterns are now parsed correctly in function bindings. * Single-item class contexts are now accepted with parenthesis around them (doh!). * The haddock documentation (paltry as it is) can now be built. Thanks a lot to Brian Lewis for the patch, which rearranges my commented guard clause. Haddock apparently didn't like the '{- | guard = ...' line... One new feature: * The parseFileX family of functions now all recognize and act on LANGUAGE pragmas (previously only parseFile did). There is now also an extra field in the ParseMode called 'ignoreLanguagePragmas', which defaults to False. Set it to True if you really want parseFile et al to disregard LANGUAGE pragmas. (Note that you can always use the simple 'parse' function that doesn't try to be clever at all.) Cheers, /Niklas
I have just uploaded haskell-src-exts-0.5.4 to hackage, which is 1.0.0 rc2. Thanks a lot to those who tested the previous version, and please continue to test and report!
Another day, another release candidate. Please see haskell-src-exts-0.5.5, 1.0.0 rc3. Thanks a lot to all reports, and please keep up the good work! Changes in 0.5.5: ================ * BangPatterns are now correctly handled everywhere (I think - tricksy little imps they are). I would like to put out a special call for tests of files that use bang patterns, in particular if they appear in "strange" locations inside patterns. * TypeFamilies now implies KindSignatures, as in GHC. * Chained contexts, e.g. foo :: Eq a => Show a => a, are now handled correctly. * . is no longer considered a reserved operator but a special operator when explicit forall is enabled, which means Prelude.. now parses correctly. * Parenthesised patterns inside list patterns no longer require RegularPatterns enabled. * List expressions are no longer translated to tuple expressions by the fixity mangler (yes, it did that)... Cheers, /Niklas
Hi all,
Another day, another release candidate. Please see haskell-src-exts-0.5.5, 1.0.0 rc3. Thanks a lot to all reports, and please keep up the good work!
Here we go again. Please have a look at haskell-src-exts-0.5.6, or 1.0.0 rc4. Thanks again for the reports, they're all truly invaluable. Changes in 0.5.6: =================== One major addition: * Support for relaxed layout in do-blocks! Yes, I caved in, after I got enough reports about it. Two stupid bugs fixed: * MagicHash ConId lexemes can now be followed by things other than space characters (like closing brackets: foo :: (Int#)). * ctypes (i.e. types with contexts and forall-quantifiers) can now appear inside tuples and lists if the proper extensions are on. Cheers, /Niklas
Dear all, I'm pleased to announce to you haskell-src-exts-0.5.7, which is truly the first *real* release candidate for 1.0.0. By real, I mean that I could consider releasing it in this state. It is feature complete, fully documented, and has no remaining known bugs. But before I do, I'd like to run it past you all one final time. Please help me test it! Via cabal: cabal install haskell-src-exts Via darcs: darcs get http://code.haskell.org/haskell-src-exts On hackage: http://hackage.haskell.org/package/haskell-src-exts-0.5.7 Changes from 0.5.6: ===================== Two small bug fixes: * Fixed a bug in the parser productions that made SCC pragmas virtually unusable. Note that this fix includes a change in the AST for expressions. * Fixed a bug in the fixity mangler where some subexpressions were left out. Three new "features": * The partial 'unParseOk' is removed in favor of the total 'fromParseOk', which throws an error if the parse failed. * Defined 'glasgowExts' as the set of extensions enabled by GHC's -fglasgow-exts. You might typically want to use it together with 'parseFileWithExts', to get -fglasgow-exts as a default (since haskell-src-exts doesn't take OPTIONS_GHC pragmas into account). * Complete haddock documentation for the whole package. Please, help me one last time! :-) Cheers and thanks, /Niklas
participants (2)
-
Niklas Broberg -
Sebastian Fischer