hscolour 1.19 → 1.20
raw patch · 3 files changed
+14/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- LICENCE-GPL +2/−1
- Language/Haskell/HsColour/Anchors.hs +10/−0
- hscolour.cabal +2/−2
LICENCE-GPL view
@@ -2,7 +2,8 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc.- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA+ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Language/Haskell/HsColour/Anchors.hs view
@@ -79,6 +79,7 @@ identifier st t@((Keyword,"newtype"):stream) = getConid stream identifier st t@((Keyword,"type"):stream) = getConid stream identifier st t@((Keyword,"class"):stream) = getConid stream+identifier st t@((Keyword,"instance"):stream)= getInstance stream identifier st t@((Comment,_):(Space,"\n"):stream) = identifier st stream identifier st stream = Nothing @@ -141,6 +142,15 @@ context stream@((Keyglyph,"=>"):_) = stream context (_:stream) = context stream context [] = []++-- the anchor name for an instance is just the entire instance head, minus+-- any extra context clause+getInstance = Just . unwords . ("instance":) . words . concat . map snd+ . trimContext . takeWhile (/=(Keyword,"where"))+ where+ trimContext ts = if (Keyglyph,"=>") `elem` ts+ then tail . dropWhile (/=(Keyglyph,"=>")) $ ts+ else ts -- simple implementation of a string lookup table. -- replace this with something more sophisticated if needed.
hscolour.cabal view
@@ -1,6 +1,6 @@ Name: hscolour-Version: 1.19-Copyright: 2003-2011 Malcolm Wallace, University of York; 2006 Bjorn Bringert+Version: 1.20+Copyright: 2003-2012 Malcolm Wallace; 2006 Bjorn Bringert Maintainer: Malcolm Wallace Author: Malcolm Wallace Homepage: http://code.haskell.org/~malcolm/hscolour/