diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-01-31 12:43:39 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2019-02-02 18:06:12 -0800 |
commit | bf07847e45356024e10d1a325f015ac53544ea85 (patch) | |
tree | dcf55b0db9ff72eeeac16add251df55805c3ab5e | |
parent | bc683d664657dc2ed228b57a05344e1b0cfd8fa6 (diff) |
Fix some Hyperlinker test suite fallout
* Amend `ParserSpec` to match new Hyperlinker API
- pass in compiler info
- strip out null tokens
* Make `hypsrc-test` pass reliably
- strip out `local-*` ids
- strip out `line-*` ids from the `ClangCppBug` test
- re-accept output
-rw-r--r-- | haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs | 65 | ||||
-rw-r--r-- | haddock-test/src/Test/Haddock/Xhtml.hs | 10 | ||||
-rw-r--r-- | hypsrc-test/Main.hs | 13 | ||||
-rw-r--r-- | hypsrc-test/ref/src/ClangCppBug.html | 38 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Classes.html | 50 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Constructors.html | 24 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Identifiers.html | 26 | ||||
-rw-r--r-- | hypsrc-test/ref/src/LinkingIdentifiers.html | 8 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Literals.html | 6 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Operators.html | 42 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Polymorphism.html | 86 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Records.html | 36 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Types.html | 8 |
13 files changed, 226 insertions, 186 deletions
diff --git a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs index 4639253c..ff18cb40 100644 --- a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs +++ b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs @@ -1,22 +1,29 @@ +{-# LANGUAGE OverloadedStrings #-} module Haddock.Backends.Hyperlinker.ParserSpec (main, spec) where - import Test.Hspec import Test.QuickCheck -import qualified GHC +import GHC ( runGhc, getSessionDynFlags ) +import DynFlags ( CompilerInfo, DynFlags ) +import SysTools.Info ( getCompilerInfo' ) import Control.Monad.IO.Class +import Data.String ( fromString ) +import Data.ByteString ( ByteString ) +import qualified Data.ByteString as BS + import Haddock (getGhcDirs) import Haddock.Backends.Hyperlinker.Parser import Haddock.Backends.Hyperlinker.Types -withDynFlags :: (GHC.DynFlags -> IO ()) -> IO () +withDynFlags :: ((DynFlags, CompilerInfo) -> IO ()) -> IO () withDynFlags cont = do libDir <- fmap snd (getGhcDirs []) - GHC.runGhc (Just libDir) $ do - dflags <- GHC.getSessionDynFlags - liftIO $ cont dflags + runGhc (Just libDir) $ do + dflags <- getSessionDynFlags + cinfo <- liftIO $ getCompilerInfo' dflags + liftIO $ cont (dflags, cinfo) main :: IO () @@ -53,51 +60,60 @@ instance Arbitrary NoGhcRewrite where parseSpec :: Spec parseSpec = around withDynFlags $ do - it "is total" $ \dflags -> - property $ \src -> length (parse dflags "" src) `shouldSatisfy` (>= 0) + it "is total" $ \(dflags, cinfo) -> + property $ \src -> length (parse cinfo dflags "" (fromString src)) `shouldSatisfy` (>= 0) - it "retains file layout" $ \dflags -> - property $ \(NoGhcRewrite src) -> concatMap tkValue (parse dflags "" src) == src + it "retains file layout" $ \(dflags, cinfo) -> + property $ \(NoGhcRewrite src) -> + let orig = fromString src + lexed = BS.concat (map tkValue (parse cinfo dflags "" orig)) + in lexed == orig context "when parsing single-line comments" $ do - it "should ignore content until the end of line" $ \dflags -> + it "should ignore content until the end of line" $ \(dflags, cinfo) -> shouldParseTo "-- some very simple comment\nidentifier" [TkComment, TkSpace, TkIdentifier] + cinfo dflags - it "should allow endline escaping" $ \dflags -> + it "should allow endline escaping" $ \(dflags, cinfo) -> shouldParseTo "#define first line\\\nsecond line\\\nand another one" [TkCpp] + cinfo dflags context "when parsing multi-line comments" $ do - it "should support nested comments" $ \dflags -> + it "should support nested comments" $ \(dflags, cinfo) -> shouldParseTo "{- comment {- nested -} still comment -} {- next comment -}" [TkComment, TkSpace, TkComment] + cinfo dflags - it "should distinguish compiler pragma" $ \dflags -> + it "should distinguish compiler pragma" $ \(dflags, cinfo) -> shouldParseTo "{- comment -}{-# LANGUAGE GADTs #-}{- comment -}" [TkComment, TkPragma, TkComment] + cinfo dflags - it "should recognize preprocessor directives" $ \dflags -> do + it "should recognize preprocessor directives" $ \(dflags, cinfo) -> do shouldParseTo "\n#define foo bar" - [TkSpace, TkCpp] + [TkCpp] + cinfo dflags shouldParseTo "x # y" [TkIdentifier, TkSpace, TkOperator, TkSpace,TkIdentifier] + cinfo dflags - it "should distinguish basic language constructs" $ \dflags -> do + it "should distinguish basic language constructs" $ \(dflags, cinfo) -> do shouldParseTo "(* 2) <$> (\"abc\", foo)" @@ -105,6 +121,7 @@ parseSpec = around withDynFlags $ do , TkSpace, TkOperator, TkSpace , TkSpecial, TkString, TkSpecial, TkSpace, TkIdentifier, TkSpecial ] + cinfo dflags shouldParseTo @@ -114,6 +131,7 @@ parseSpec = around withDynFlags $ do , TkIdentifier, TkSpace, TkKeyword, TkSpace , TkIdentifier, TkSpace, TkOperator, TkSpace, TkIdentifier ] + cinfo dflags shouldParseTo @@ -124,9 +142,10 @@ parseSpec = around withDynFlags $ do , TkSpace, TkKeyword, TkSpace , TkIdentifier, TkSpace, TkGlyph, TkSpace, TkIdentifier ] + cinfo dflags - it "should parse do-notation syntax" $ \dflags -> do + it "should parse do-notation syntax" $ \(dflags, cinfo) -> do shouldParseTo "do { foo <- getLine; putStrLn foo }" [ TkKeyword, TkSpace, TkSpecial, TkSpace @@ -134,10 +153,11 @@ parseSpec = around withDynFlags $ do , TkIdentifier, TkSpecial, TkSpace , TkIdentifier, TkSpace, TkIdentifier, TkSpace, TkSpecial ] + cinfo dflags shouldParseTo - (unlines + (fromString $ unlines [ "do" , " foo <- getLine" , " putStrLn foo" @@ -146,7 +166,10 @@ parseSpec = around withDynFlags $ do , TkSpace, TkGlyph, TkSpace, TkIdentifier, TkSpace , TkIdentifier, TkSpace, TkIdentifier, TkSpace ] + cinfo dflags where - shouldParseTo :: String -> [TokenType] -> GHC.DynFlags -> Expectation - shouldParseTo str tokens dflags = map tkType (parse dflags "" str) `shouldBe` tokens + shouldParseTo :: ByteString -> [TokenType] -> CompilerInfo -> DynFlags -> Expectation + shouldParseTo str tokens cinfo dflags = [ tkType tok + | tok <- parse cinfo dflags "" str + , not (BS.null (tkValue tok)) ] `shouldBe` tokens diff --git a/haddock-test/src/Test/Haddock/Xhtml.hs b/haddock-test/src/Test/Haddock/Xhtml.hs index d4520100..6c19dbca 100644 --- a/haddock-test/src/Test/Haddock/Xhtml.hs +++ b/haddock-test/src/Test/Haddock/Xhtml.hs @@ -8,7 +8,7 @@ module Test.Haddock.Xhtml ( Xml(..) , parseXml, dumpXml - , stripLinks, stripLinksWhen, stripAnchorsWhen, stripFooter + , stripLinks, stripLinksWhen, stripAnchorsWhen, stripIdsWhen, stripFooter ) where import Data.Data ( Data(..), Typeable, eqT, (:~:)(..) ) @@ -62,6 +62,14 @@ stripAnchorsWhen p = | qName key == "name" && p val = attr { attrVal = "" } | otherwise = attr +stripIdsWhen :: (String -> Bool) -> Xml -> Xml +stripIdsWhen p = + processAnchors unname + where + unname attr@(Attr { attrKey = key, attrVal = val }) + | qName key == "id" && p val = attr { attrVal = "" } + | otherwise = attr + processAnchors :: (Attr -> Attr) -> Xml -> Xml processAnchors f = Xml . gmapEverywhere f . xmlElement diff --git a/hypsrc-test/Main.hs b/hypsrc-test/Main.hs index d3ab79a8..1963753d 100644 --- a/hypsrc-test/Main.hs +++ b/hypsrc-test/Main.hs @@ -15,14 +15,23 @@ import Test.Haddock.Xhtml checkConfig :: CheckConfig Xml checkConfig = CheckConfig { ccfgRead = parseXml - , ccfgClean = \_ -> strip + , ccfgClean = strip , ccfgDump = dumpXml , ccfgEqual = (==) `on` dumpXml } where - strip = stripAnchors' . stripLinks' . stripFooter + -- The whole point of the ClangCppBug is to demonstrate a situation where + -- line numbers may vary (and test that links still work). Consequently, we + -- strip out line numbers for this test case. + strip f | takeBaseName f == "ClangCppBug" + = stripAnchors' . stripLinks' . stripIds' . stripIds'' . stripFooter + | otherwise + = stripAnchors' . stripLinks' . stripIds' . stripFooter + stripLinks' = stripLinksWhen $ \href -> "#local-" `isPrefixOf` href stripAnchors' = stripAnchorsWhen $ \name -> "local-" `isPrefixOf` name + stripIds' = stripIdsWhen $ \name -> "local-" `isPrefixOf` name + stripIds'' = stripIdsWhen $ \name -> "line-" `isPrefixOf` name dirConfig :: DirConfig diff --git a/hypsrc-test/ref/src/ClangCppBug.html b/hypsrc-test/ref/src/ClangCppBug.html index 42d0cfc0..d03c92e1 100644 --- a/hypsrc-test/ref/src/ClangCppBug.html +++ b/hypsrc-test/ref/src/ClangCppBug.html @@ -11,7 +11,7 @@ ><span > </span - ><span id="line-2" + ><span id="" ></span ><span class="hs-keyword" >module</span @@ -26,12 +26,12 @@ ><span > </span - ><span id="line-3" + ><span id="" ></span ><span > </span - ><span id="line-4" + ><span id="" ></span ><span class="annot" ><a href="ClangCppBug.html#foo" @@ -52,7 +52,7 @@ ><span > </span - ><span id="line-5" + ><span id="" ></span ><span id="foo" ><span class="annot" @@ -78,12 +78,12 @@ ><span > </span - ><span id="line-6" + ><span id="" ></span ><span > </span - ><span id="line-7" + ><span id="" ></span ><span class="hs-comment" >-- Clang doesn't mind these:</span @@ -108,12 +108,12 @@ ><span > </span - ><span id="line-10" + ><span id="" ></span ><span > </span - ><span id="line-11" + ><span id="" ></span ><span class="annot" ><a href="ClangCppBug.html#bar" @@ -134,7 +134,7 @@ ><span > </span - ><span id="line-12" + ><span id="" ></span ><span id="bar" ><span class="annot" @@ -160,26 +160,26 @@ ><span > </span - ><span id="line-13" + ><span id="" ></span ><span > </span - ><span id="line-14" + ><span id="" ></span ><span class="hs-comment" >-- But it doesn't like this:</span ><span > </span - ><span id="line-15" + ><span id="" ></span ><span class="hs-pragma" >{-# RULES</span ><span > </span - ><span id="line-16" + ><span id="" ></span ><span class="annot" ><span class="hs-pragma" @@ -208,7 +208,7 @@ ><span > </span - ><span id="line-17" + ><span id="" ></span ><span class="annot" ><span class="hs-pragma" @@ -237,7 +237,7 @@ ><span > </span - ><span id="line-18" + ><span id="" ></span ><span > </span @@ -246,12 +246,12 @@ ><span > </span - ><span id="line-20" + ><span id="" ></span ><span > </span - ><span id="line-21" + ><span id="" ></span ><span class="annot" ><a href="ClangCppBug.html#qux" @@ -272,7 +272,7 @@ ><span > </span - ><span id="line-22" + ><span id="" ></span ><span id="qux" ><span class="annot" @@ -298,7 +298,7 @@ ><span > </span - ><span id="line-23" + ><span id="" ></span ></pre ></body diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html index dd1e6ebc..443d7f96 100644 --- a/hypsrc-test/ref/src/Classes.html +++ b/hypsrc-test/ref/src/Classes.html @@ -45,7 +45,7 @@ ></span ><span > </span - ><span id="local-6989586621679043524" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -182,7 +182,7 @@ ></span ><span > </span - ><span id="local-6989586621679043488" + ><span id="" ><span class="annot" ><span class="annottext" >bar :: Int -> Int @@ -214,7 +214,7 @@ forall a. a -> a ></span ><span > </span - ><span id="local-6989586621679043486" + ><span id="" ><span class="annot" ><span class="annottext" >baz :: Int -> (Int, Int) @@ -227,7 +227,7 @@ forall a. a -> a ></span ><span > </span - ><span id="local-6989586621679043485" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -280,7 +280,7 @@ forall a. a -> a </span ><span id="line-12" ></span - ><span id="local-6989586621679043484" + ><span id="" ><span class="hs-keyword" >instance</span ><span @@ -314,7 +314,7 @@ forall a. a -> a ></span ><span > </span - ><span id="local-6989586621679043481" + ><span id="" ><span class="annot" ><span class="annottext" >bar :: [a] -> Int @@ -346,7 +346,7 @@ forall (t :: * -> *) a. Foldable t => t a -> Int ></span ><span > </span - ><span id="local-6989586621679043479" + ><span id="" ><span class="annot" ><span class="annottext" >baz :: Int -> ([a], [a]) @@ -433,7 +433,7 @@ forall (t :: * -> *) a. Foldable t => t a -> Int ></span ><span > </span - ><span id="local-6989586621679043519" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -505,7 +505,7 @@ forall (t :: * -> *) a. Foldable t => t a -> Int ></span ><span > </span - ><span id="local-6989586621679043477" + ><span id="" ><span class="annot" ><a href="Classes.html#quux" ><span class="hs-identifier hs-var hs-var" @@ -516,7 +516,7 @@ forall (t :: * -> *) a. Foldable t => t a -> Int > </span ><span class="hs-special" >(</span - ><span id="local-6989586621679043476" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -531,7 +531,7 @@ forall (t :: * -> *) a. Foldable t => t a -> Int >,</span ><span > </span - ><span id="local-6989586621679043475" + ><span id="" ><span class="annot" ><span class="annottext" >y :: a @@ -644,7 +644,7 @@ forall a. Foo' a => [a] -> a ></span ><span > </span - ><span id="local-6989586621679043473" + ><span id="" ><span class="annot" ><a href="Classes.html#norf" ><span class="hs-identifier hs-var hs-var" @@ -756,7 +756,7 @@ forall a. Foo a => a -> Int >instance</span ><span > </span - ><span id="local-6989586621679043468" + ><span id="" ><span class="annot" ><a href="Classes.html#Foo%27" ><span class="hs-identifier hs-type" @@ -781,7 +781,7 @@ forall a. Foo a => a -> Int ></span ><span > </span - ><span id="local-6989586621679043465" + ><span id="" ><span class="annot" ><span class="annottext" >norf :: [Int] -> Int @@ -816,12 +816,12 @@ forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a </span ><span id="line-27" ></span - ><span id="local-6989586621679043464" + ><span id="" ><span class="hs-keyword" >instance</span ><span > </span - ><span id="local-6989586621679043460" + ><span id="" ><span class="annot" ><a href="Classes.html#Foo%27" ><span class="hs-identifier hs-type" @@ -852,7 +852,7 @@ forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a ></span ><span > </span - ><span id="local-6989586621679043459" + ><span id="" ><span class="annot" ><span class="annottext" >quux :: ([a], [a]) -> [a] @@ -917,7 +917,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043503" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -936,8 +936,8 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043505" - ><span id="local-6989586621679043506" + ><span id="" + ><span id="" ><span id="plugh" ><span class="annot" ><a href="Classes.html#plugh" @@ -1101,7 +1101,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043454" + ><span id="" ><span class="annot" ><span class="annottext" >plugh :: Either a a -> Either b b -> Either (a -> b) (b -> a) @@ -1122,7 +1122,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043453" + ><span id="" ><span class="annot" ><span class="annottext" >a :: a @@ -1208,7 +1208,7 @@ forall a b. a -> b -> a ></span ><span > </span - ><span id="local-6989586621679043451" + ><span id="" ><span class="annot" ><span class="annottext" >a :: a @@ -1298,7 +1298,7 @@ forall a b. a -> b -> a ></span ><span > </span - ><span id="local-6989586621679043450" + ><span id="" ><span class="annot" ><span class="annottext" >b :: b @@ -1384,7 +1384,7 @@ forall a b. a -> b -> a ></span ><span > </span - ><span id="local-6989586621679043449" + ><span id="" ><span class="annot" ><span class="annottext" >b :: b diff --git a/hypsrc-test/ref/src/Constructors.html b/hypsrc-test/ref/src/Constructors.html index 6cdf07db..970ec741 100644 --- a/hypsrc-test/ref/src/Constructors.html +++ b/hypsrc-test/ref/src/Constructors.html @@ -478,7 +478,7 @@ ></span ><span > </span - ><span id="local-6989586621679043545" + ><span id="" ><span class="annot" ><span class="annottext" >foo :: Foo @@ -491,7 +491,7 @@ ></span ><span > </span - ><span id="local-6989586621679043544" + ><span id="" ><span class="annot" ><span class="annottext" >n :: Int @@ -656,7 +656,7 @@ forall a. Num a => a -> a -> a >,</span ><span > </span - ><span id="local-6989586621679043540" + ><span id="" ><span class="annot" ><span class="annottext" >xs :: [Foo] @@ -731,7 +731,7 @@ forall a. Num a => a -> a -> a >,</span ><span > </span - ><span id="local-6989586621679043539" + ><span id="" ><span class="annot" ><span class="annottext" >xs :: [Foo] @@ -871,7 +871,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043535" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Norf @@ -896,7 +896,7 @@ forall a. HasCallStack => a > </span ><span class="hs-special" >(</span - ><span id="local-6989586621679043534" + ><span id="" ><span class="annot" ><span class="annottext" >f1 :: Foo @@ -923,7 +923,7 @@ forall a. HasCallStack => a >_</span ><span > </span - ><span id="local-6989586621679043533" + ><span id="" ><span class="annot" ><span class="annottext" >n :: Int @@ -946,7 +946,7 @@ forall a. HasCallStack => a >,</span ><span > </span - ><span id="local-6989586621679043532" + ><span id="" ><span class="annot" ><span class="annottext" >f2 :: Foo @@ -969,7 +969,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043531" + ><span id="" ><span class="annot" ><span class="annottext" >f3 :: Foo @@ -1111,7 +1111,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043529" + ><span id="" ><span class="annot" ><span class="annottext" >aux :: Foo -> Int @@ -1124,7 +1124,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043528" + ><span id="" ><span class="annot" ><span class="annottext" >fx :: Foo @@ -1232,7 +1232,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043530" + ><span id="" ><span class="annot" ><span class="annottext" >x' :: Int diff --git a/hypsrc-test/ref/src/Identifiers.html b/hypsrc-test/ref/src/Identifiers.html index 301761c1..5268031d 100644 --- a/hypsrc-test/ref/src/Identifiers.html +++ b/hypsrc-test/ref/src/Identifiers.html @@ -105,7 +105,7 @@ ></span ><span > </span - ><span id="local-6989586621679043592" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -118,7 +118,7 @@ ></span ><span > </span - ><span id="local-6989586621679043591" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -268,7 +268,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043588" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -281,7 +281,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043587" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -431,7 +431,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043586" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -444,7 +444,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043585" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -608,7 +608,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043583" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -782,7 +782,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043581" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -795,7 +795,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043580" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -808,7 +808,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043579" + ><span id="" ><span class="annot" ><span class="annottext" >z :: Int @@ -1397,7 +1397,7 @@ forall a b. (a -> b) -> a -> b ></span ><span > </span - ><span id="local-6989586621679043573" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -1425,7 +1425,7 @@ forall a b. (a -> b) -> a -> b ></span ><span > </span - ><span id="local-6989586621679043572" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -1453,7 +1453,7 @@ forall a b. (a -> b) -> a -> b ></span ><span > </span - ><span id="local-6989586621679043571" + ><span id="" ><span class="annot" ><span class="annottext" >z :: Int diff --git a/hypsrc-test/ref/src/LinkingIdentifiers.html b/hypsrc-test/ref/src/LinkingIdentifiers.html index 2ef590bd..52b20200 100644 --- a/hypsrc-test/ref/src/LinkingIdentifiers.html +++ b/hypsrc-test/ref/src/LinkingIdentifiers.html @@ -102,7 +102,7 @@ </span ><span id="line-9" ></span - ><span id="local-6989586621679043611" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -221,7 +221,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043609" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -357,7 +357,7 @@ forall a. Num a => a -> a -> a </span ><span id="line-13" ></span - ><span id="local-6989586621679043607" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -476,7 +476,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043606" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int diff --git a/hypsrc-test/ref/src/Literals.html b/hypsrc-test/ref/src/Literals.html index 62ea32dd..f0d05fbc 100644 --- a/hypsrc-test/ref/src/Literals.html +++ b/hypsrc-test/ref/src/Literals.html @@ -83,7 +83,7 @@ </span ><span id="line-7" ></span - ><span id="local-6989586621679043622" + ><span id="" ><span class="annot" ><a href="Literals.html#num" ><span class="hs-identifier hs-type" @@ -221,7 +221,7 @@ forall a. Num a => a -> a -> a </span ><span id="line-10" ></span - ><span id="local-6989586621679043618" + ><span id="" ><span class="annot" ><a href="Literals.html#frac" ><span class="hs-identifier hs-type" @@ -295,7 +295,7 @@ forall a. Num a => a -> a -> a </span ><span id="line-13" ></span - ><span id="local-6989586621679043616" + ><span id="" ><span class="annot" ><a href="Literals.html#list" ><span class="hs-identifier hs-type" diff --git a/hypsrc-test/ref/src/Operators.html b/hypsrc-test/ref/src/Operators.html index 403954cf..4d5693c2 100644 --- a/hypsrc-test/ref/src/Operators.html +++ b/hypsrc-test/ref/src/Operators.html @@ -31,7 +31,7 @@ </span ><span id="line-4" ></span - ><span id="local-6989586621679043657" + ><span id="" ><span class="annot" ><a href="Operators.html#%2B%2B%2B" ><span class="hs-operator hs-type" @@ -92,7 +92,7 @@ </span ><span id="line-5" ></span - ><span id="local-6989586621679043655" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [a] @@ -118,7 +118,7 @@ ></span ><span > </span - ><span id="local-6989586621679043654" + ><span id="" ><span class="annot" ><span class="annottext" >b :: [a] @@ -196,7 +196,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-7" ></span - ><span id="local-6989586621679043653" + ><span id="" ><span class="annot" ><a href="Operators.html#%24%24%24" ><span class="hs-operator hs-type" @@ -257,7 +257,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-8" ></span - ><span id="local-6989586621679043651" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [a] @@ -283,7 +283,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043650" + ><span id="" ><span class="annot" ><span class="annottext" >b :: [a] @@ -342,7 +342,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-10" ></span - ><span id="local-6989586621679043649" + ><span id="" ><span class="annot" ><a href="Operators.html#%2A%2A%2A" ><span class="hs-operator hs-type" @@ -416,7 +416,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043647" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [a] @@ -461,7 +461,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043646" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [a] @@ -482,7 +482,7 @@ forall a. [a] -> [a] -> [a] ><span class="hs-glyph hs-type" >:</span ></span - ><span id="local-6989586621679043645" + ><span id="" ><span class="annot" ><span class="annottext" >b :: [a] @@ -570,7 +570,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-14" ></span - ><span id="local-6989586621679043666" + ><span id="" ><span class="annot" ><a href="Operators.html#%2A%2F%5C%2A" ><span class="hs-operator hs-type" @@ -635,7 +635,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-15" ></span - ><span id="local-6989586621679043643" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [[a]] @@ -661,7 +661,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043642" + ><span id="" ><span class="annot" ><span class="annottext" >b :: [a] @@ -734,7 +734,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-17" ></span - ><span id="local-6989586621679043640" + ><span id="" ><span class="annot" ><a href="Operators.html#%2A%2A%2F%5C%2A%2A" ><span class="hs-operator hs-type" @@ -807,7 +807,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-18" ></span - ><span id="local-6989586621679043638" + ><span id="" ><span class="annot" ><span class="annottext" >a :: [[a]] @@ -833,7 +833,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043637" + ><span id="" ><span class="annot" ><span class="annottext" >b :: [[a]] @@ -961,9 +961,9 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-21" ></span - ><span id="local-6989586621679043633" - ><span id="local-6989586621679043634" - ><span id="local-6989586621679043635" + ><span id="" + ><span id="" + ><span id="" ><span class="annot" ><a href="Operators.html#%23.%23" ><span class="hs-operator hs-type" @@ -1044,7 +1044,7 @@ forall a. [a] -> [a] -> [a] </span ><span id="line-22" ></span - ><span id="local-6989586621679043631" + ><span id="" ><span class="annot" ><span class="annottext" >a :: a @@ -1070,7 +1070,7 @@ forall a. [a] -> [a] -> [a] ></span ><span > </span - ><span id="local-6989586621679043630" + ><span id="" ><span class="annot" ><span class="annottext" >b :: b diff --git a/hypsrc-test/ref/src/Polymorphism.html b/hypsrc-test/ref/src/Polymorphism.html index 91f8bd33..ec9c49e8 100644 --- a/hypsrc-test/ref/src/Polymorphism.html +++ b/hypsrc-test/ref/src/Polymorphism.html @@ -55,7 +55,7 @@ </span ><span id="line-8" ></span - ><span id="local-6989586621679043738" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#foo" ><span class="hs-identifier hs-type" @@ -155,7 +155,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043734" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -237,8 +237,8 @@ forall a. HasCallStack => a </span ><span id="line-14" ></span - ><span id="local-6989586621679043732" - ><span id="local-6989586621679043733" + ><span id="" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#bar" ><span class="hs-identifier hs-type" @@ -353,7 +353,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043729" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -363,7 +363,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043728" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -459,8 +459,8 @@ forall a. HasCallStack => a </span ><span id="line-20" ></span - ><span id="local-6989586621679043726" - ><span id="local-6989586621679043727" + ><span id="" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#baz" ><span class="hs-identifier hs-type" @@ -605,7 +605,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043723" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -615,7 +615,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043722" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -741,7 +741,7 @@ forall a. HasCallStack => a </span ><span id="line-26" ></span - ><span id="local-6989586621679043721" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#quux" ><span class="hs-identifier hs-type" @@ -772,7 +772,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043756" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -835,7 +835,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043719" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -848,7 +848,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043718" + ><span id="" ><span class="annot" ><span class="annottext" >f :: forall a. a -> a @@ -912,7 +912,7 @@ forall a. a -> a >forall</span ><span > </span - ><span id="local-6989586621679043716" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -942,7 +942,7 @@ forall a. a -> a >forall</span ><span > </span - ><span id="local-6989586621679043715" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1004,7 +1004,7 @@ forall a. a -> a ></span ><span > </span - ><span id="local-6989586621679043714" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -1017,7 +1017,7 @@ forall a. a -> a ></span ><span > </span - ><span id="local-6989586621679043713" + ><span id="" ><span class="annot" ><span class="annottext" >f :: forall a. a -> a @@ -1070,7 +1070,7 @@ forall a. a -> a </span ><span id="line-33" ></span - ><span id="local-6989586621679043712" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#num" ><span class="hs-identifier hs-type" @@ -1188,7 +1188,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043709" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1288,8 +1288,8 @@ forall a. HasCallStack => a </span ><span id="line-39" ></span - ><span id="local-6989586621679043707" - ><span id="local-6989586621679043708" + ><span id="" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#eq" ><span class="hs-identifier hs-type" @@ -1450,7 +1450,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043704" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1460,7 +1460,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043703" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1602,8 +1602,8 @@ forall a. HasCallStack => a </span ><span id="line-45" ></span - ><span id="local-6989586621679043701" - ><span id="local-6989586621679043702" + ><span id="" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#mon" ><span class="hs-identifier hs-type" @@ -1742,7 +1742,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043698" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1752,7 +1752,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043697" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1877,7 +1877,7 @@ forall a. HasCallStack => a </span ><span id="line-52" ></span - ><span id="local-6989586621679043696" + ><span id="" ><span class="annot" ><a href="Polymorphism.html#norf" ><span class="hs-identifier hs-type" @@ -1908,7 +1908,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043743" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -1989,7 +1989,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043694" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -2002,7 +2002,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043693" + ><span id="" ><span class="annot" ><span class="annottext" >f :: forall a. Ord a => a -> a @@ -2054,7 +2054,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043691" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -2084,7 +2084,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043690" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -2164,7 +2164,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043689" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -2177,7 +2177,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043688" + ><span id="" ><span class="annot" ><span class="annottext" >f :: forall a. Ord a => a -> a @@ -2234,7 +2234,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043686" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -2282,7 +2282,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043685" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -2346,7 +2346,7 @@ forall a. HasCallStack => a >forall</span ><span > </span - ><span id="local-6989586621679043683" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -2356,7 +2356,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043682" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -2446,7 +2446,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043681" + ><span id="" ><span class="annot" ><span class="annottext" >f :: a -> b @@ -2459,7 +2459,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043680" + ><span id="" ><span class="annot" ><span class="annottext" >x :: a @@ -2561,7 +2561,7 @@ forall a. HasCallStack => a ></span ><span > </span - ><span id="local-6989586621679043679" + ><span id="" ><span class="annot" ><span class="annottext" >y :: b diff --git a/hypsrc-test/ref/src/Records.html b/hypsrc-test/ref/src/Records.html index bc99cc56..5057b8a4 100644 --- a/hypsrc-test/ref/src/Records.html +++ b/hypsrc-test/ref/src/Records.html @@ -229,7 +229,7 @@ ></span ><span > </span - ><span id="local-6989586621679043799" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -242,7 +242,7 @@ ></span ><span > </span - ><span id="local-6989586621679043798" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -420,7 +420,7 @@ >=</span ><span > </span - ><span id="local-6989586621679043795" + ><span id="" ><span class="annot" ><span class="annottext" >Int @@ -450,7 +450,7 @@ >=</span ><span > </span - ><span id="local-6989586621679043794" + ><span id="" ><span class="annot" ><span class="annottext" >Int @@ -615,7 +615,7 @@ forall a. Num a => a -> a -> a >{</span ><span > </span - ><span id="local-6989586621679043790" + ><span id="" ><span class="annot" ><span class="annottext" >Int @@ -632,7 +632,7 @@ x :: Point -> Int >,</span ><span > </span - ><span id="local-6989586621679043789" + ><span id="" ><span class="annot" ><span class="annottext" >Int @@ -812,7 +812,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043786" + ><span id="" ><span class="annot" ><span class="annottext" >p :: Point @@ -825,7 +825,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043785" + ><span id="" ><span class="annot" ><span class="annottext" >d :: Int @@ -935,7 +935,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043784" + ><span id="" ><span class="annot" ><span class="annottext" >p :: Point @@ -948,7 +948,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043783" + ><span id="" ><span class="annot" ><span class="annottext" >d :: Int @@ -1118,7 +1118,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043781" + ><span id="" ><span class="annot" ><span class="annottext" >x :: Int @@ -1131,7 +1131,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043780" + ><span id="" ><span class="annot" ><span class="annottext" >y :: Int @@ -1144,7 +1144,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043779" + ><span id="" ><span class="annot" ><span class="annottext" >p :: Point @@ -1204,7 +1204,7 @@ forall a. Num a => a -> a -> a > </span ><span class="hs-special" >(</span - ><span id="local-6989586621679043777" + ><span id="" ><span class="annot" ><span class="annottext" >dx :: Int @@ -1219,7 +1219,7 @@ forall a. Num a => a -> a -> a >,</span ><span > </span - ><span id="local-6989586621679043776" + ><span id="" ><span class="annot" ><span class="annottext" >dy :: Int @@ -1271,7 +1271,7 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043778" + ><span id="" ><span class="annot" ><span class="annottext" >aux :: Point -> Point @@ -1284,8 +1284,8 @@ forall a. Num a => a -> a -> a ></span ><span > </span - ><span id="local-6989586621679043774" - ><span id="local-6989586621679043775" + ><span id="" + ><span id="" ><span class="annot" ><a href="Records.html#Point" ><span class="hs-identifier hs-type" diff --git a/hypsrc-test/ref/src/Types.html b/hypsrc-test/ref/src/Types.html index 1258b8c1..22012ad1 100644 --- a/hypsrc-test/ref/src/Types.html +++ b/hypsrc-test/ref/src/Types.html @@ -254,7 +254,7 @@ ></span ><span > </span - ><span id="local-6989586621679043815" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -264,7 +264,7 @@ ></span ><span > </span - ><span id="local-6989586621679043814" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -444,7 +444,7 @@ ></span ><span > </span - ><span id="local-6989586621679043811" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" @@ -454,7 +454,7 @@ ></span ><span > </span - ><span id="local-6989586621679043810" + ><span id="" ><span class="annot" ><a href="#" ><span class="hs-identifier hs-type" |