aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md6
-rw-r--r--haddock-api/haddock-api.cabal4
-rw-r--r--haddock-api/resources/html/solarized.css42
-rw-r--r--haddock-api/src/Haddock.hs52
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker.hs55
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs237
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs386
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs276
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs36
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs98
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs134
-rw-r--r--haddock-api/src/Haddock/Interface.hs55
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs39
-rw-r--r--haddock-api/src/Haddock/Types.hs14
-rw-r--r--haddock-api/src/Haddock/Utils.hs8
-rw-r--r--haddock.cabal2
-rw-r--r--hypsrc-test/ref/src/CPP.html197
-rw-r--r--hypsrc-test/ref/src/ClangCppBug.html306
-rw-r--r--hypsrc-test/ref/src/Classes.html1652
-rw-r--r--hypsrc-test/ref/src/Constructors.html1268
-rw-r--r--hypsrc-test/ref/src/Identifiers.html1485
-rw-r--r--hypsrc-test/ref/src/LinkingIdentifiers.html572
-rw-r--r--hypsrc-test/ref/src/Literals.html433
-rw-r--r--hypsrc-test/ref/src/Operators.html1540
-rw-r--r--hypsrc-test/ref/src/Polymorphism.html3047
-rw-r--r--hypsrc-test/ref/src/PositionPragmas.html172
-rw-r--r--hypsrc-test/ref/src/Records.html1346
-rw-r--r--hypsrc-test/ref/src/Types.html1022
-rw-r--r--hypsrc-test/src/ClangCppBug.hs21
-rw-r--r--hypsrc-test/src/LinkingIdentifiers.hs14
-rw-r--r--hypsrc-test/src/PositionPragmas.hs12
31 files changed, 9402 insertions, 5129 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 5a9e0d31..bb5e845b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,12 @@
* Support inline markup in markdown-style links (#875)
+ * The hyperlinker backend has been re-engineered to use HIE files
+ and display type annotations on expressions (#977)
+
+ * The hyperlinker backend lexer is now more incremental, faster, and
+ more memory efficient (#977)
+
## Changes in version 2.22.0
* Make `--package-version` optional for `--hoogle` (#899)
diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal
index 2a94c5f5..a4dea01f 100644
--- a/haddock-api/haddock-api.cabal
+++ b/haddock-api/haddock-api.cabal
@@ -59,6 +59,7 @@ library
, directory
, filepath
, ghc-boot
+ , ghc-boot-th
, transformers
hs-source-dirs: src
@@ -97,7 +98,6 @@ library
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
Haddock.Backends.Hyperlinker
- Haddock.Backends.Hyperlinker.Ast
Haddock.Backends.Hyperlinker.Parser
Haddock.Backends.Hyperlinker.Renderer
Haddock.Backends.Hyperlinker.Types
@@ -130,7 +130,6 @@ test-suite spec
Haddock
Haddock.Backends.Hoogle
Haddock.Backends.Hyperlinker
- Haddock.Backends.Hyperlinker.Ast
Haddock.Backends.Hyperlinker.Renderer
Haddock.Backends.Hyperlinker.Utils
Haddock.Backends.LaTeX
@@ -187,6 +186,7 @@ test-suite spec
, directory
, filepath
, ghc-boot
+ , ghc-boot-th
, transformers
build-tool-depends:
diff --git a/haddock-api/resources/html/solarized.css b/haddock-api/resources/html/solarized.css
index e83dc5ec..0146eedd 100644
--- a/haddock-api/resources/html/solarized.css
+++ b/haddock-api/resources/html/solarized.css
@@ -53,3 +53,45 @@ a:link, a:visited {
a:hover, a.hover-highlight {
background-color: #eee8d5;
}
+
+span.annot{
+ position:relative;
+ color:#000;
+ text-decoration:none
+ }
+
+span.annot:hover{z-index:25; background-color:#ff0}
+
+span.annot span.annottext{
+ display: none;
+ border-radius: 5px 5px;
+
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
+
+ position: absolute;
+ left: 1em; top: 2em;
+ z-index: 99;
+ margin-left: 5;
+ background: #FFFFAA;
+ border: 2px solid #FFAD33;
+ padding: 0.8em 1em;
+}
+
+span.annot:hover span.annottext{
+ display:block;
+}
+
+/* This bridges the gap so you can mouse into the tooltip without it disappearing */
+span.annot span.annottext:before{
+ content: "";
+ position: absolute;
+ left: -1em; top: -1em;
+ background: #FFFFFF00;
+ z-index:-1;
+ padding: 2em 2em;
+}
diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs
index 2bae60e7..358e5c3a 100644
--- a/haddock-api/src/Haddock.hs
+++ b/haddock-api/src/Haddock.hs
@@ -39,6 +39,7 @@ import Haddock.Version
import Haddock.InterfaceFile
import Haddock.Options
import Haddock.Utils
+import Haddock.GhcUtils (modifySessionDynFlags, setOutputDir)
import Control.Monad hiding (forM_)
import Data.Foldable (forM_, foldl')
@@ -66,6 +67,8 @@ import qualified GHC.Paths as GhcPaths
import Paths_haddock_api (getDataDir)
import System.Directory (doesDirectoryExist)
#endif
+import System.Directory (getTemporaryDirectory)
+import System.FilePath ((</>))
import Text.ParserCombinators.ReadP (readP_to_S)
import GHC hiding (verbosity)
@@ -164,6 +167,15 @@ haddockWithGhc ghc args = handleTopExceptions $ do
-- bypass the interface version check
let noChecks = Flag_BypassInterfaceVersonCheck `elem` flags
+ -- Create a temporary directory and redirect GHC output there (unless user
+ -- requested otherwise).
+ --
+ -- Output dir needs to be set before calling 'depanal' since 'depanal' uses it
+ -- to compute output file names that are stored in the 'DynFlags' of the
+ -- resulting 'ModSummary's.
+ let withDir | Flag_NoTmpCompDir `elem` flags = id
+ | otherwise = withTempOutputDir
+
unless (Flag_NoWarnings `elem` flags) $ do
hypSrcWarnings flags
forM_ (warnings args) $ \warning -> do
@@ -171,7 +183,7 @@ haddockWithGhc ghc args = handleTopExceptions $ do
when noChecks $
hPutStrLn stderr noCheckWarning
- ghc flags' $ do
+ ghc flags' $ withDir $ do
dflags <- getDynFlags
forM_ (optShowInterfaceFile flags) $ \path -> liftIO $ do
@@ -202,6 +214,15 @@ haddockWithGhc ghc args = handleTopExceptions $ do
-- Render even though there are no input files (usually contents/index).
liftIO $ renderStep dflags flags sinceQual qual packages []
+-- | Run the GHC action using a temporary output directory
+withTempOutputDir :: Ghc a -> Ghc a
+withTempOutputDir action = do
+ tmp <- liftIO getTemporaryDirectory
+ x <- liftIO getProcessID
+ let dir = tmp </> ".haddock-" ++ show x
+ modifySessionDynFlags (setOutputDir dir)
+ withTempDir dir action
+
-- | Create warnings about potential misuse of -optghc
warnings :: [String] -> [String]
warnings = map format . filter (isPrefixOf "-optghc")
@@ -221,8 +242,9 @@ withGhc flags action = do
let handleSrcErrors action' = flip handleSourceError action' $ \err -> do
printException err
liftIO exitFailure
+ needHieFiles = Flag_HyperlinkedSource `elem` flags
- withGhc' libDir (ghcFlags flags) (\_ -> handleSrcErrors action)
+ withGhc' libDir needHieFiles (ghcFlags flags) (\_ -> handleSrcErrors action)
readPackagesAndProcessModules :: [Flag] -> [String]
@@ -444,14 +466,10 @@ readInterfaceFiles name_cache_accessor pairs bypass_version_check = do
-- | Start a GHC session with the -haddock flag set. Also turn off
-- compilation and linking. Then run the given 'Ghc' action.
-withGhc' :: String -> [String] -> (DynFlags -> Ghc a) -> IO a
-withGhc' libDir flags ghcActs = runGhc (Just libDir) $ do
- dynflags <- getSessionDynFlags
- dynflags' <- parseGhcFlags (gopt_set dynflags Opt_Haddock) {
- hscTarget = HscNothing,
- ghcMode = CompManager,
- ghcLink = NoLink
- }
+withGhc' :: String -> Bool -> [String] -> (DynFlags -> Ghc a) -> IO a
+withGhc' libDir needHieFiles flags ghcActs = runGhc (Just libDir) $ do
+ dynflags' <- parseGhcFlags =<< getSessionDynFlags
+
-- We disable pattern match warnings because than can be very
-- expensive to check
let dynflags'' = unsetPatternMatchWarnings $
@@ -482,11 +500,19 @@ withGhc' libDir flags ghcActs = runGhc (Just libDir) $ do
parseGhcFlags dynflags = do
-- TODO: handle warnings?
- let flags' = filterRtsFlags flags
- (dynflags', rest, _) <- parseDynamicFlags dynflags (map noLoc flags')
+ let extra_opts | needHieFiles = [Opt_WriteHie, Opt_Haddock]
+ | otherwise = [Opt_Haddock]
+ dynflags' = (foldl' gopt_set dynflags extra_opts)
+ { hscTarget = HscNothing
+ , ghcMode = CompManager
+ , ghcLink = NoLink
+ }
+ flags' = filterRtsFlags flags
+
+ (dynflags'', rest, _) <- parseDynamicFlags dynflags' (map noLoc flags')
if not (null rest)
then throwE ("Couldn't parse GHC options: " ++ unwords flags')
- else return dynflags'
+ else return dynflags''
unsetPatternMatchWarnings :: DynFlags -> DynFlags
unsetPatternMatchWarnings dflags =
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker.hs b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
index 8f0c4b67..5ef7d9bb 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE OverloadedStrings #-}
module Haddock.Backends.Hyperlinker
( ppHyperlinkedSource
, module Haddock.Backends.Hyperlinker.Types
@@ -8,15 +9,24 @@ module Haddock.Backends.Hyperlinker
import Haddock.Types
import Haddock.Utils (writeUtf8File)
import Haddock.Backends.Hyperlinker.Renderer
+import Haddock.Backends.Hyperlinker.Parser
import Haddock.Backends.Hyperlinker.Types
import Haddock.Backends.Hyperlinker.Utils
-
-import Text.XHtml hiding ((</>))
+import Haddock.Backends.Xhtml.Utils ( renderToString )
import Data.Maybe
import System.Directory
import System.FilePath
+import HieTypes ( HieFile(..), HieASTs(..) )
+import HieBin ( readHieFile )
+import Data.Map as M
+import FastString ( mkFastString )
+import Module ( Module, moduleName )
+import NameCache ( initNameCache )
+import UniqSupply ( mkSplitUniqSupply )
+import SysTools.Info ( getCompilerInfo' )
+
-- | Generate hyperlinked source for given interfaces.
--
@@ -27,10 +37,10 @@ ppHyperlinkedSource :: FilePath -- ^ Output directory
-> FilePath -- ^ Resource directory
-> Maybe FilePath -- ^ Custom CSS file path
-> Bool -- ^ Flag indicating whether to pretty-print HTML
- -> SrcMap -- ^ Paths to sources
+ -> M.Map Module SrcPath -- ^ Paths to sources
-> [Interface] -- ^ Interfaces for which we create source
-> IO ()
-ppHyperlinkedSource outdir libdir mstyle pretty srcs ifaces = do
+ppHyperlinkedSource outdir libdir mstyle pretty srcs' ifaces = do
createDirectoryIfMissing True srcdir
let cssFile = fromMaybe (defaultCssFile libdir) mstyle
copyFile cssFile $ srcdir </> srcCssFile
@@ -39,17 +49,39 @@ ppHyperlinkedSource outdir libdir mstyle pretty srcs ifaces = do
mapM_ (ppHyperlinkedModuleSource srcdir pretty srcs) ifaces
where
srcdir = outdir </> hypSrcDir
+ srcs = (srcs', M.mapKeys moduleName srcs')
-- | Generate hyperlinked source for particular interface.
-ppHyperlinkedModuleSource :: FilePath -> Bool -> SrcMap -> Interface
- -> IO ()
-ppHyperlinkedModuleSource srcdir pretty srcs iface =
- case ifaceTokenizedSrc iface of
- Just tokens -> writeUtf8File path . html . render' $ tokens
- Nothing -> return ()
+ppHyperlinkedModuleSource :: FilePath -> Bool -> SrcMaps -> Interface -> IO ()
+ppHyperlinkedModuleSource srcdir pretty srcs iface = case ifaceHieFile iface of
+ Just hfp -> do
+ -- Parse the GHC-produced HIE file
+ u <- mkSplitUniqSupply 'a'
+ HieFile { hie_hs_file = file
+ , hie_asts = HieASTs asts
+ , hie_types = types
+ , hie_hs_src = rawSrc
+ } <- fmap fst (readHieFile (initNameCache u []) hfp)
+ comp <- getCompilerInfo' df
+
+ -- Get the AST and tokens corresponding to the source file we want
+ let mast | M.size asts == 1 = snd <$> M.lookupMin asts
+ | otherwise = M.lookup (mkFastString file) asts
+ tokens = parse comp df file rawSrc
+
+ -- Produce and write out the hyperlinked sources
+ case mast of
+ Just ast ->
+ let fullAst = recoverFullIfaceTypes df types ast
+ in writeUtf8File path . renderToString pretty . render' fullAst $ tokens
+ Nothing
+ | M.size asts == 0 -> return ()
+ | otherwise -> error $ unwords [ "couldn't find ast for"
+ , file, show (M.keys asts) ]
+ Nothing -> return ()
where
+ df = ifaceDynFlags iface
render' = render (Just srcCssFile) (Just highlightScript) srcs
- html = if pretty then renderHtml else showHtml
path = srcdir </> hypSrcModuleFile (ifaceMod iface)
-- | Name of CSS file in output directory.
@@ -63,3 +95,4 @@ highlightScript = "highlight.js"
-- | Path to default CSS file.
defaultCssFile :: FilePath -> FilePath
defaultCssFile libdir = libdir </> "html" </> "solarized.css"
+
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
deleted file mode 100644
index a9ffc36e..00000000
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ /dev/null
@@ -1,237 +0,0 @@
-{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE TypeApplications #-}
-{-# LANGUAGE ViewPatterns #-}
-
-module Haddock.Backends.Hyperlinker.Ast (enrich) where
-
-
-import qualified Haddock.Syb as Syb
-import Haddock.Backends.Hyperlinker.Types
-
-import qualified GHC
-import qualified SrcLoc
-import qualified Outputable as GHC
-
-import Control.Applicative
-import Control.Monad (guard)
-import Data.Data
-import qualified Data.Map.Strict as Map
-import Data.Maybe
-
-import Prelude hiding (span)
-
-everythingInRenamedSource :: (Alternative f, Data x)
- => (forall a. Data a => a -> f r) -> x -> f r
-everythingInRenamedSource f = Syb.everythingButType @GHC.Name (<|>) f
-
--- | Add more detailed information to token stream using GHC API.
-enrich :: GHC.RenamedSource -> [Token] -> [RichToken]
-enrich src =
- map $ \token -> RichToken
- { rtkToken = token
- , rtkDetails = enrichToken token detailsMap
- }
- where
- detailsMap =
- mkDetailsMap (concatMap ($ src)
- [ variables
- , types
- , decls
- , binds
- , imports
- ])
-
-type LTokenDetails = [(GHC.SrcSpan, TokenDetails)]
-
--- | A map containing association between source locations and "details" of
--- this location.
---
-type DetailsMap = Map.Map Position (Span, TokenDetails)
-
-mkDetailsMap :: [(GHC.SrcSpan, TokenDetails)] -> DetailsMap
-mkDetailsMap xs =
- Map.fromListWith select_details [ (start, (span, token_details))
- | (ghc_span, token_details) <- xs
- , GHC.RealSrcSpan span <- [ghc_span]
- , let start = SrcLoc.realSrcSpanStart span
- ]
- where
- -- favour token details which appear earlier in the list
- select_details _new old = old
-
-lookupBySpan :: Span -> DetailsMap -> Maybe TokenDetails
-lookupBySpan span details = do
- let pos = SrcLoc.realSrcSpanStart span
- (_, (tok_span, tok_details)) <- Map.lookupLE pos details
- guard (tok_span `SrcLoc.containsSpan` span)
- return tok_details
-
-enrichToken :: Token -> DetailsMap -> Maybe TokenDetails
-enrichToken (Token typ _ spn) dm
- | typ `elem` [TkIdentifier, TkOperator] = lookupBySpan spn dm
-enrichToken _ _ = Nothing
-
--- | Obtain details map for variables ("normally" used identifiers).
-variables :: GHC.RenamedSource -> LTokenDetails
-variables =
- everythingInRenamedSource (var `Syb.combine` rec)
- where
- var term = case cast term of
- (Just ((GHC.dL->GHC.L sspan (GHC.HsVar _ name))
- :: GHC.LHsExpr GHC.GhcRn)) ->
- pure (sspan, RtkVar (GHC.unLoc name))
- (Just (GHC.dL->GHC.L _ (GHC.RecordCon _
- (GHC.dL->GHC.L sspan name) _))) ->
- pure (sspan, RtkVar name)
- _ -> empty
- rec term = case cast term of
- Just (GHC.HsRecField (GHC.dL->GHC.L sspan name)
- (_ :: GHC.LHsExpr GHC.GhcRn) _) ->
- pure (sspan, RtkVar name)
- _ -> empty
-
--- | Obtain details map for types.
-types :: GHC.RenamedSource -> LTokenDetails
-types = everythingInRenamedSource ty
- where
- ty :: forall a. Data a => a -> [(GHC.SrcSpan, TokenDetails)]
- ty term = case cast term of
- (Just ((GHC.dL->GHC.L sspan (GHC.HsTyVar _ _ name))
- :: GHC.LHsType GHC.GhcRn)) ->
- pure (sspan, RtkType (GHC.unLoc name))
- (Just ((GHC.dL->GHC.L sspan (GHC.HsOpTy _ l name r))
- :: GHC.LHsType GHC.GhcRn)) ->
- (sspan, RtkType (GHC.unLoc name)):(ty l ++ ty r)
- _ -> empty
-
--- | Obtain details map for identifier bindings.
---
--- That includes both identifiers bound by pattern matching or declared using
--- ordinary assignment (in top-level declarations, let-expressions and where
--- clauses).
-
-binds :: GHC.RenamedSource -> LTokenDetails
-binds = everythingInRenamedSource
- (fun `Syb.combine` pat `Syb.combine` tvar)
- where
- fun term = case cast term of
- (Just (GHC.FunBind _ (GHC.dL->GHC.L sspan name) _ _ _
- :: GHC.HsBind GHC.GhcRn)) ->
- pure (sspan, RtkBind name)
- (Just (GHC.PatSynBind _
- (GHC.PSB _ (GHC.dL->GHC.L sspan name) args _ _))) ->
- pure (sspan, RtkBind name)
- ++ everythingInRenamedSource patsyn_binds args
- _ -> empty
- patsyn_binds term = case cast term of
- (Just (GHC.L sspan (name :: GHC.Name))) ->
- pure (sspan, RtkVar name)
- _ -> empty
- pat term = case cast term of
- (Just ((GHC.dL->GHC.L sspan (GHC.VarPat _ name))
- :: GHC.LPat GHC.GhcRn)) ->
- pure (sspan, RtkBind (GHC.unLoc name))
- (Just (GHC.dL->GHC.L _
- (GHC.ConPatIn (GHC.dL->GHC.L sspan name) recs))) ->
- [(sspan, RtkVar name)] ++ everythingInRenamedSource rec recs
- (Just (GHC.dL->GHC.L _ (GHC.AsPat _ (GHC.dL->GHC.L sspan name) _))) ->
- pure (sspan, RtkBind name)
- _ -> empty
- rec term = case cast term of
- (Just (GHC.HsRecField (GHC.dL->GHC.L sspan name)
- (_ :: GHC.LPat GHC.GhcRn) _)) ->
- pure (sspan, RtkVar name)
- _ -> empty
- tvar term = case cast term of
- (Just ((GHC.dL->GHC.L sspan (GHC.UserTyVar _ name))
- :: GHC.LHsTyVarBndr GHC.GhcRn)) ->
- pure (sspan, RtkBind (GHC.unLoc name))
- (Just (GHC.dL->GHC.L _ (GHC.KindedTyVar _ (GHC.dL->GHC.L sspan name) _))) ->
- pure (sspan, RtkBind name)
- _ -> empty
-
--- | Obtain details map for top-level declarations.
-decls :: GHC.RenamedSource -> LTokenDetails
-decls (group, _, _, _) = concatMap ($ group)
- [ concat . map typ . concat . map GHC.group_tyclds . GHC.hs_tyclds
- , everythingInRenamedSource fun . GHC.hs_valds
- , everythingInRenamedSource fix . GHC.hs_fixds
- , everythingInRenamedSource (con `Syb.combine` ins)
- ]
- where
- typ (GHC.dL->GHC.L _ t) = case t of
- GHC.DataDecl { tcdLName = name } -> pure . decl $ name
- GHC.SynDecl _ name _ _ _ -> pure . decl $ name
- GHC.FamDecl _ fam -> pure . decl $ GHC.fdLName fam
- GHC.ClassDecl{..} ->
- [decl tcdLName]
- ++ concatMap sig tcdSigs
- ++ concatMap tyfam tcdATs
- GHC.XTyClDecl {} -> GHC.panic "haddock:decls"
- fun term = case cast term of
- (Just (GHC.FunBind _ (GHC.dL->GHC.L sspan name) _ _ _
- :: GHC.HsBind GHC.GhcRn))
- | GHC.isExternalName name -> pure (sspan, RtkDecl name)
- (Just (GHC.PatSynBind _ (GHC.PSB _ (GHC.dL->GHC.L sspan name) _ _ _)))
- | GHC.isExternalName name -> pure (sspan, RtkDecl name)
- _ -> empty
- con term = case cast term of
- (Just (cdcl :: GHC.ConDecl GHC.GhcRn)) ->
- map decl (GHC.getConNames cdcl)
- ++ everythingInRenamedSource fld cdcl
- Nothing -> empty
- ins term = case cast term of
- (Just ((GHC.DataFamInstD _ (GHC.DataFamInstDecl eqn))
- :: GHC.InstDecl GHC.GhcRn))
- -> pure . tyref $ GHC.feqn_tycon $ GHC.hsib_body eqn
- (Just (GHC.TyFamInstD _ (GHC.TyFamInstDecl eqn))) ->
- pure . tyref $ GHC.feqn_tycon $ GHC.hsib_body eqn
- _ -> empty
- fld term = case cast term of
- Just (field :: GHC.ConDeclField GHC.GhcRn)
- -> map (decl . fmap GHC.extFieldOcc) $ GHC.cd_fld_names field
- Nothing -> empty
- fix term = case cast term of
- Just ((GHC.FixitySig _ names _) :: GHC.FixitySig GHC.GhcRn)
- -> map (\(GHC.dL->GHC.L sspan x) -> (sspan, RtkVar x)) names
- Just ((GHC.XFixitySig {}) :: GHC.FixitySig GHC.GhcRn)
- -> GHC.panic "haddock:decls"
- Nothing -> empty
- tyfam (GHC.dL->GHC.L _ (GHC.FamilyDecl{..})) = [decl fdLName]
- tyfam (GHC.dL->GHC.L _ (GHC.XFamilyDecl {})) = GHC.panic "haddock:dels"
- tyfam _ = GHC.panic "tyfam: Impossible Match"
-
- sig (GHC.dL->GHC.L _ (GHC.TypeSig _ names _)) = map decl names
- sig (GHC.dL->GHC.L _ (GHC.PatSynSig _ names _)) = map decl names
- sig (GHC.dL->GHC.L _ (GHC.ClassOpSig _ _ names _)) = map decl names
- sig _ = []
- decl (GHC.dL->GHC.L sspan name) = (sspan, RtkDecl name)
- tyref (GHC.dL->GHC.L sspan name) = (sspan, RtkType name)
-
--- | Obtain details map for import declarations.
---
--- This map also includes type and variable details for items in export and
--- import lists.
-imports :: GHC.RenamedSource -> LTokenDetails
-imports src@(_, imps, _, _) =
- everythingInRenamedSource ie src ++ mapMaybe (imp . GHC.unLoc) imps
- where
- ie term = case cast term of
- (Just ((GHC.IEVar _ v) :: GHC.IE GHC.GhcRn)) -> pure $ var
- $ GHC.ieLWrappedName v
- (Just (GHC.IEThingAbs _ t)) -> pure $ typ $ GHC.ieLWrappedName t
- (Just (GHC.IEThingAll _ t)) -> pure $ typ $ GHC.ieLWrappedName t
- (Just (GHC.IEThingWith _ t _ vs _fls)) ->
- [typ $ GHC.ieLWrappedName t] ++ map (var . GHC.ieLWrappedName) vs
- (Just (GHC.IEModuleContents _ m)) -> pure $ modu m
- _ -> empty
- typ (GHC.dL->GHC.L sspan name) = (sspan, RtkType name)
- var (GHC.dL->GHC.L sspan name) = (sspan, RtkVar name)
- modu (GHC.dL->GHC.L sspan name) = (sspan, RtkModule name)
- imp idecl
- | not . GHC.ideclImplicit $ idecl = Just (modu (GHC.ideclName idecl))
- | otherwise = Nothing
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
index f8494242..1d5576cc 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
@@ -1,213 +1,212 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
module Haddock.Backends.Hyperlinker.Parser (parse) where
-import Data.Either ( isRight, isLeft )
-import Data.List ( foldl', isPrefixOf, isSuffixOf )
-import Data.Maybe ( maybeToList )
-import Data.Char ( isSpace )
-import qualified Text.Read as R
+import Control.Applicative ( Alternative(..) )
+import Data.List ( isPrefixOf, isSuffixOf )
-import GHC ( DynFlags, addSourceToTokens )
-import SrcLoc
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Char8 as BSC
+
+import GHC.LanguageExtensions.Type
+
+import BasicTypes ( IntegralLit(..) )
+import DynFlags
+import qualified EnumSet as E
+import ErrUtils ( emptyMessages )
import FastString ( mkFastString )
-import StringBuffer ( stringToStringBuffer )
-import Lexer ( Token(..) )
-import qualified Lexer as L
+import Lexer ( P(..), ParseResult(..), PState(..), Token(..)
+ , mkPStatePure, lexer, mkParserFlags' )
+import Outputable ( showSDoc, panic )
+import SrcLoc
+import StringBuffer ( StringBuffer, atEnd )
import Haddock.Backends.Hyperlinker.Types as T
-
+import Haddock.GhcUtils
-- | Turn source code string into a stream of more descriptive tokens.
--
--- Result should retain original file layout (including comments, whitespace,
--- etc.), i.e. the following "law" should hold:
---
--- prop> concat . map tkValue . parse = id
---
--- (In reality, this only holds for input not containing '\r', '\t', '\f', '\v',
--- characters, since GHC transforms those into ' ' and '\n')
-parse :: DynFlags -> FilePath -> String -> [T.Token]
-parse dflags fp = ghcToks . processCPP dflags fp . filterCRLF
+-- Result should retain original file layout (including comments,
+-- whitespace, and CPP).
+parse
+ :: CompilerInfo -- ^ Underlying CC compiler (whatever expanded CPP)
+ -> DynFlags -- ^ Flags for this module
+ -> FilePath -- ^ Path to the source of this module
+ -> BS.ByteString -- ^ Raw UTF-8 encoded source of this module
+ -> [T.Token]
+parse comp dflags fpath bs = case unP (go False []) initState of
+ POk _ toks -> reverse toks
+ PFailed _ ss errMsg -> panic $ "Hyperlinker parse error at " ++ show ss ++
+ ": " ++ showSDoc dflags errMsg
where
- -- Remove CRLFs from source
- filterCRLF :: String -> String
- filterCRLF ('\r':'\n':cs) = '\n' : filterCRLF cs
- filterCRLF (c:cs) = c : filterCRLF cs
- filterCRLF [] = []
--- | Parse the source into tokens using the GHC lexer.
+ initState = mkPStatePure pflags buf start
+ buf = stringBufferFromByteString bs
+ start = mkRealSrcLoc (mkFastString fpath) 1 1
+ needPragHack' = needPragHack comp dflags
+ pflags = mkParserFlags' (warningFlags dflags)
+ (extensionFlags dflags)
+ (thisPackage dflags)
+ (safeImportsOn dflags)
+ False -- lex Haddocks as comment tokens
+ True -- produce comment tokens
+ False -- produce position pragmas tokens
+
+ go :: Bool -- ^ are we currently in a pragma?
+ -> [T.Token] -- ^ tokens accumulated so far (in reverse)
+ -> P [T.Token]
+ go inPrag toks = do
+ (b, _) <- getInput
+ if not (atEnd b)
+ then do
+ (newToks, inPrag') <- parseCppLine <|> parsePlainTok inPrag <|> unknownLine
+ go inPrag' (newToks ++ toks)
+ else
+ pure toks
+
+ -- | Like 'Lexer.lexer', but slower, with a better API, and filtering out empty tokens
+ wrappedLexer :: P (RealLocated Lexer.Token)
+ wrappedLexer = Lexer.lexer False andThen
+ where andThen (L (RealSrcSpan s) t)
+ | srcSpanStartLine s /= srcSpanEndLine s ||
+ srcSpanStartCol s /= srcSpanEndCol s
+ = pure (L s t)
+ andThen (L (RealSrcSpan s) ITeof) = pure (L s ITeof)
+ andThen _ = wrappedLexer
+
+ -- | Try to parse a CPP line (can fail)
+ parseCppLine :: P ([T.Token], Bool)
+ parseCppLine = do
+ (b, l) <- getInput
+ case tryCppLine l b of
+ Just (cppBStr, l', b')
+ -> let cppTok = T.Token { tkType = TkCpp
+ , tkValue = cppBStr
+ , tkSpan = mkRealSrcSpan l l' }
+ in setInput (b', l') *> pure ([cppTok], False)
+ _ -> empty
+
+ -- | Try to parse a regular old token (can fail)
+ parsePlainTok :: Bool -> P ([T.Token], Bool) -- return list is only ever 0-2 elements
+ parsePlainTok inPrag = do
+ (bInit, lInit) <- getInput
+ L sp tok <- Lexer.lexer False return
+ (bEnd, _) <- getInput
+ case sp of
+ UnhelpfulSpan _ -> pure ([], False) -- pretend the token never existed
+ RealSrcSpan rsp -> do
+ let typ = if inPrag then TkPragma else classify tok
+ RealSrcLoc lStart = srcSpanStart sp -- safe since @sp@ is real
+ (spaceBStr, bStart) = spanPosition lInit lStart bInit
+ inPragDef = inPragma inPrag tok
+
+ (bEnd', inPrag') <- case tok of
+
+ -- Update internal line + file position if this is a LINE pragma
+ ITline_prag _ -> tryOrElse (bEnd, inPragDef) $ do
+ L _ (ITinteger (IL { il_value = line })) <- wrappedLexer
+ L _ (ITstring _ file) <- wrappedLexer
+ L spF ITclose_prag <- wrappedLexer
+
+ let newLoc = mkRealSrcLoc file (fromIntegral line - 1) (srcSpanEndCol spF)
+ (bEnd'', _) <- getInput
+ setInput (bEnd'', newLoc)
+
+ pure (bEnd'', False)
+
+ -- Update internal column position if this is a COLUMN pragma
+ ITcolumn_prag _ -> tryOrElse (bEnd, inPragDef) $ do
+ L _ (ITinteger (IL { il_value = col })) <- wrappedLexer
+ L spF ITclose_prag <- wrappedLexer
+
+ let newLoc = mkRealSrcLoc (srcSpanFile spF) (srcSpanEndLine spF) (fromIntegral col)
+ (bEnd'', _) <- getInput
+ setInput (bEnd'', newLoc)
+
+ pure (bEnd'', False)
+
+ -- See 'needPragHack'
+ ITclose_prag{}
+ | needPragHack'
+ , '\n' `BSC.elem` spaceBStr
+ -> getInput >>= \(b,p) -> setInput (b,advanceSrcLoc p '\n') >> pure (bEnd, False)
+
+ _ -> pure (bEnd, inPragDef)
+
+ let tokBStr = splitStringBuffer bStart bEnd'
+ plainTok = T.Token { tkType = typ
+ , tkValue = tokBStr
+ , tkSpan = rsp }
+ spaceTok = T.Token { tkType = TkSpace
+ , tkValue = spaceBStr
+ , tkSpan = mkRealSrcSpan lInit lStart }
+
+ pure (plainTok : [ spaceTok | not (BS.null spaceBStr) ], inPrag')
+
+ -- | Parse whatever remains of the line as an unknown token (can't fail)
+ unknownLine :: P ([T.Token], Bool)
+ unknownLine = do
+ (b, l) <- getInput
+ let (unkBStr, l', b') = spanLine l b
+ unkTok = T.Token { tkType = TkUnknown
+ , tkValue = unkBStr
+ , tkSpan = mkRealSrcSpan l l' }
+ setInput (b', l')
+ pure ([unkTok], False)
+
+
+-- | This is really, really, /really/ gross. Problem: consider a Haskell
+-- file that looks like:
--
--- * CPP lines are removed and reinserted as line-comments
--- * top-level file pragmas are parsed as block comments (see the
--- 'ITblockComment' case of 'classify' for more details)
+-- @
+-- {-# LANGUAGE CPP #-}
+-- module SomeMod where
--
-processCPP :: DynFlags -- ^ GHC's flags
- -> FilePath -- ^ source file name (for position information)
- -> String -- ^ source file contents
- -> [(Located L.Token, String)]
-processCPP dflags fpath s = addSrc . go start . splitCPP $ s
- where
- start = mkRealSrcLoc (mkFastString fpath) 1 1
- addSrc = addSourceToTokens start (stringToStringBuffer s)
-
- -- Transform a list of Haskell/CPP lines into a list of tokens
- go :: RealSrcLoc -> [Either String String] -> [Located L.Token]
- go _ [] = []
- go pos ls =
- let (hLinesRight, ls') = span isRight ls
- (cppLinesLeft, rest) = span isLeft ls'
-
- hSrc = concat [ hLine | Right hLine <- hLinesRight ]
- cppSrc = concat [ cppLine | Left cppLine <- cppLinesLeft ]
-
- in case L.lexTokenStream (stringToStringBuffer hSrc) pos dflags of
-
- -- Stuff that fails to lex gets turned into comments
- L.PFailed _ _ss _msg ->
- let (src_pos, failed) = mkToken ITunknown pos hSrc
- (new_pos, cpp) = mkToken ITlineComment src_pos cppSrc
- in failed : cpp : go new_pos rest
-
- -- Successfully lexed
- L.POk ss toks ->
- let (new_pos, cpp) = mkToken ITlineComment (L.loc ss) cppSrc
- in toks ++ [cpp] ++ go new_pos rest
-
- -- Manually make a token from a 'String', advancing the cursor position
- mkToken tok start' str =
- let end = foldl' advanceSrcLoc start' str
- in (end, L (RealSrcSpan $ mkRealSrcSpan start' end) (tok str))
-
-
--- | Split apart the initial file into Haskell source lines ('Left' entries) and
--- CPP lines ('Right' entries).
+-- #define SIX 6
+--
+-- {-# INLINE foo
+-- #-}
+-- foo = 1
+-- @
--
--- All characters in the input are present in the output:
+-- Clang's CPP replaces the @#define SIX 6@ line with an empty line (as it
+-- should), but get confused about @#-}@. I'm guessing it /starts/ by
+-- parsing that as a pre-processor directive and, when it fails to, it just
+-- leaves the line alone. HOWEVER, it still adds an extra newline. =.=
--
--- prop> concat . map (either id id) . splitCPP = id
-splitCPP :: String -> [Either String String]
-splitCPP "" = []
-splitCPP s | isCPPline s = Left l : splitCPP rest
- | otherwise = Right l : splitCPP rest
+-- This function makes sure that the Hyperlinker backend also adds that
+-- extra newline (or else our spans won't line up with GHC's anymore).
+needPragHack :: CompilerInfo -> DynFlags -> Bool
+needPragHack comp dflags = isCcClang && E.member Cpp (extensionFlags dflags)
where
- ~(l, rest) = spanToNewline 0 s
+ isCcClang = case comp of
+ GCC -> False
+ Clang -> True
+ AppleClang -> True
+ AppleClang51 -> True
+ UnknownCC -> False
+-- | Get the input
+getInput :: P (StringBuffer, RealSrcLoc)
+getInput = P $ \p @ PState { buffer = buf, loc = srcLoc } -> POk p (buf, srcLoc)
--- | Heuristic to decide if a line is going to be a CPP line. This should be a
--- cheap operation since it is going to be run on every line being processed.
---
--- Right now it just checks if the first non-whitespace character in the first
--- five characters of the line is a '#':
---
--- >>> isCPPline "#define FOO 1"
--- True
---
--- >>> isCPPline "\t\t #ifdef GHC"
--- True
---
--- >>> isCPPline " #endif"
--- False
---
-isCPPline :: String -> Bool
-isCPPline = isPrefixOf "#" . dropWhile (`elem` " \t") . take 5
+-- | Set the input
+setInput :: (StringBuffer, RealSrcLoc) -> P ()
+setInput (buf, srcLoc) = P $ \p -> POk (p { buffer = buf, loc = srcLoc }) ()
--- | Split a "line" off the front of a string, hopefully without cutting tokens
--- in half. I say "hopefully" because knowing what a token is requires lexing,
--- yet lexing depends on this function.
---
--- All characters in the input are present in the output:
---
--- prop> curry (++) . spanToNewLine 0 = id
-spanToNewline :: Int -- ^ open '{-'
- -> String -- ^ input
- -> (String, String)
-
--- Base case and space characters
-spanToNewline _ "" = ("", "")
-spanToNewline n ('\n':str) | n <= 0 = ("\n", str)
-spanToNewline n ('\n':str) | n <= 0 = ("\n", str)
-spanToNewline n ('\\':'\n':str) =
- let (str', rest) = spanToNewline n str
- in ('\\':'\n':str', rest)
-
--- Block comments
-spanToNewline n ('{':'-':str) =
- let (str', rest) = spanToNewline (n+1) str
- in ('{':'-':str', rest)
-spanToNewline n ('-':'}':str) =
- let (str', rest) = spanToNewline (n-1) str
- in ('-':'}':str', rest)
-
--- When not in a block comment, try to lex a Haskell token
-spanToNewline 0 str@(c:_) | ((lexed, str') : _) <- R.lex str, not (isSpace c) =
- if all (== '-') lexed && length lexed >= 2
- -- A Haskell line comment
- then case span (/= '\n') str' of
- (str'', '\n':rest) -> (lexed ++ str'' ++ "\n", rest)
- (_, _) -> (str, "")
-
- -- An actual Haskell token
- else let (str'', rest) = spanToNewline 0 str'
- in (lexed ++ str'', rest)
-
--- In all other cases, advance one character at a time
-spanToNewline n (c:str) =
- let (str', rest) = spanToNewline n str
- in (c:str', rest)
-
-
--- | Turn a list of GHC's 'L.Token' (and their source 'String') into a list of
--- Haddock's 'T.Token'.
-ghcToks :: [(Located L.Token, String)] -> [T.Token]
-ghcToks = reverse . (\(_,ts,_) -> ts) . foldl' go (start, [], False)
- where
- start = mkRealSrcLoc (mkFastString "lexing") 1 1
-
- go :: (RealSrcLoc, [T.Token], Bool)
- -- ^ current position, tokens accumulated, currently in pragma (or not)
-
- -> (Located L.Token, String)
- -- ^ next token, its content
-
- -> (RealSrcLoc, [T.Token], Bool)
- -- ^ new position, new tokens accumulated, currently in pragma (or not)
-
- go (pos, toks, in_prag) (L l tok, raw) =
- ( next_pos
- , classifiedTok ++ maybeToList white ++ toks
- , inPragma in_prag tok
- )
- where
- (next_pos, white) = mkWhitespace pos l
-
- classifiedTok = [ Token (classify' tok) raw rss
- | RealSrcSpan rss <- [l]
- , not (null raw)
- ]
-
- classify' | in_prag = const TkPragma
- | otherwise = classify
-
-
--- | Find the correct amount of whitespace between tokens.
-mkWhitespace :: RealSrcLoc -> SrcSpan -> (RealSrcLoc, Maybe T.Token)
-mkWhitespace prev spn =
- case spn of
- UnhelpfulSpan _ -> (prev,Nothing)
- RealSrcSpan s | null wsstring -> (end, Nothing)
- | otherwise -> (end, Just (Token TkSpace wsstring wsspan))
- where
- start = realSrcSpanStart s
- end = realSrcSpanEnd s
- wsspan = mkRealSrcSpan prev start
- nls = srcLocLine start - srcLocLine prev
- spaces = if nls == 0 then srcLocCol start - srcLocCol prev
- else srcLocCol start - 1
- wsstring = replicate nls '\n' ++ replicate spaces ' '
+-- | Orphan instance that adds backtracking to 'P'
+instance Alternative P where
+ empty = P $ \_ -> PFailed (const emptyMessages) noSrcSpan "Alterative.empty"
+ P x <|> P y = P $ \s -> case x s of { p@POk{} -> p
+ ; _ -> y s }
+-- | Try a parser. If it fails, backtrack and return the pure value.
+tryOrElse :: a -> P a -> P a
+tryOrElse x p = p <|> pure x
-- | Classify given tokens as appropriate Haskell token type.
-classify :: L.Token -> TokenType
+classify :: Lexer.Token -> TokenType
classify tok =
case tok of
ITas -> TkKeyword
@@ -382,12 +381,7 @@ classify tok =
ITunknown {} -> TkUnknown
ITeof -> TkUnknown
- -- Line comments are only supposed to start with '--'. Starting with '#'
- -- means that this was probably a CPP.
- ITlineComment s
- | isCPPline s -> TkCpp
- | otherwise -> TkComment
-
+ ITlineComment {} -> TkComment
ITdocCommentNext {} -> TkComment
ITdocCommentPrev {} -> TkComment
ITdocCommentNamed {} -> TkComment
@@ -404,9 +398,9 @@ classify tok =
| otherwise -> TkComment
-- | Classify given tokens as beginning pragmas (or not).
-inPragma :: Bool -- ^ currently in pragma
- -> L.Token -- ^ current token
- -> Bool -- ^ new information about whether we are in a pragma
+inPragma :: Bool -- ^ currently in pragma
+ -> Lexer.Token -- ^ current token
+ -> Bool -- ^ new information about whether we are in a pragma
inPragma _ ITclose_prag = False
inPragma True _ = True
inPragma False tok =
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
index d7ea70a6..a4dcb77b 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
@@ -1,4 +1,8 @@
{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE PatternSynonyms #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE BangPatterns #-}
module Haddock.Backends.Hyperlinker.Renderer (render) where
@@ -6,15 +10,19 @@ module Haddock.Backends.Hyperlinker.Renderer (render) where
import Haddock.Backends.Hyperlinker.Types
import Haddock.Backends.Hyperlinker.Utils
-import qualified GHC
-import qualified Name as GHC
-import qualified Unique as GHC
+import qualified Data.ByteString as BS
+
+import HieTypes
+import Module ( ModuleName, moduleNameString )
+import Name ( getOccString, isInternalName, Name, nameModule, nameUnique )
+import SrcLoc
+import Unique ( getKey )
+import Encoding ( utf8DecodeByteString )
import System.FilePath.Posix ((</>))
-import Data.List
-import Data.Maybe
import qualified Data.Map as Map
+import qualified Data.Set as Set
import Text.XHtml (Html, HtmlAttr, (!))
import qualified Text.XHtml as Html
@@ -22,22 +30,24 @@ import qualified Text.XHtml as Html
type StyleClass = String
+-- | Produce the HTML corresponding to a hyperlinked Haskell source
+render
+ :: Maybe FilePath -- ^ path to the CSS file
+ -> Maybe FilePath -- ^ path to the JS file
+ -> SrcMaps -- ^ Paths to sources
+ -> HieAST PrintedType -- ^ ASTs from @.hie@ files
+ -> [Token] -- ^ tokens to render
+ -> Html
+render mcss mjs srcs ast tokens = header mcss mjs <> body srcs ast tokens
-render :: Maybe FilePath -> Maybe FilePath -> SrcMap -> [RichToken]
- -> Html
-render mcss mjs srcs tokens = header mcss mjs <> body srcs tokens
-
-body :: SrcMap -> [RichToken] -> Html
-body srcs tokens = Html.body . Html.pre $ hypsrc
+body :: SrcMaps -> HieAST PrintedType -> [Token] -> Html
+body srcs ast tokens = Html.body . Html.pre $ hypsrc
where
- hypsrc = mconcat . map (richToken srcs) $ tokens
-
+ hypsrc = renderWithAst srcs ast tokens
header :: Maybe FilePath -> Maybe FilePath -> Html
-header mcss mjs
- | isNothing mcss && isNothing mjs = Html.noHtml
-header mcss mjs =
- Html.header $ css mcss <> js mjs
+header Nothing Nothing = Html.noHtml
+header mcss mjs = Html.header $ css mcss <> js mjs
where
css Nothing = Html.noHtml
css (Just cssFile) = Html.thelink Html.noHtml !
@@ -51,25 +61,132 @@ header mcss mjs =
, Html.src scriptFile
]
+
+splitTokens :: HieAST PrintedType -> [Token] -> ([Token],[Token],[Token])
+splitTokens ast toks = (before,during,after)
+ where
+ (before,rest) = span leftOf toks
+ (during,after) = span inAst rest
+ leftOf t = realSrcSpanEnd (tkSpan t) <= realSrcSpanStart nodeSp
+ inAst t = nodeSp `containsSpan` tkSpan t
+ nodeSp = nodeSpan ast
+
+-- | Turn a list of tokens into hyperlinked sources, threading in relevant link
+-- information from the 'HieAST'.
+renderWithAst :: SrcMaps -> HieAST PrintedType -> [Token] -> Html
+renderWithAst srcs Node{..} toks = anchored $ case toks of
+
+ [tok] | nodeSpan == tkSpan tok -> richToken srcs nodeInfo tok
+
+ -- NB: the GHC lexer lexes backquoted identifiers and parenthesized operators
+ -- as multiple tokens.
+ --
+ -- * @a `elem` b@ turns into @[a, `, elem, `, b]@ (excluding space tokens)
+ -- * @(+) 1 2@ turns into @[(, +, ), 1, 2]@ (excluding space tokens)
+ --
+ -- However, the HIE ast considers @`elem`@ and @(+)@ to be single nodes. In
+ -- order to make sure these get hyperlinked properly, we intercept these
+ -- special sequences of tokens and merge them into just one identifier or
+ -- operator token.
+ [BacktickTok s1, tok @ Token{ tkType = TkIdentifier }, BacktickTok s2]
+ | realSrcSpanStart s1 == realSrcSpanStart nodeSpan
+ , realSrcSpanEnd s2 == realSrcSpanEnd nodeSpan
+ -> richToken srcs nodeInfo
+ (Token{ tkValue = "`" <> tkValue tok <> "`"
+ , tkType = TkOperator
+ , tkSpan = nodeSpan })
+ [OpenParenTok s1, tok @ Token{ tkType = TkOperator }, CloseParenTok s2]
+ | realSrcSpanStart s1 == realSrcSpanStart nodeSpan
+ , realSrcSpanEnd s2 == realSrcSpanEnd nodeSpan
+ -> richToken srcs nodeInfo
+ (Token{ tkValue = "(" <> tkValue tok <> ")"
+ , tkType = TkOperator
+ , tkSpan = nodeSpan })
+
+ _ -> go nodeChildren toks
+ where
+ go _ [] = mempty
+ go [] xs = foldMap renderToken xs
+ go (cur:rest) xs =
+ foldMap renderToken before <> renderWithAst srcs cur during <> go rest after
+ where
+ (before,during,after) = splitTokens cur xs
+ anchored c = Map.foldrWithKey anchorOne c (nodeIdentifiers nodeInfo)
+ anchorOne n dets c = externalAnchor n d $ internalAnchor n d c
+ where d = identInfo dets
+
+renderToken :: Token -> Html
+renderToken Token{..}
+ | BS.null tkValue = mempty
+ | tkType == TkSpace = renderSpace (srcSpanStartLine tkSpan) tkValue'
+ | otherwise = tokenSpan ! [ multiclass style ]
+ where
+ tkValue' = filterCRLF $ utf8DecodeByteString tkValue
+ style = tokenStyle tkType
+ tokenSpan = Html.thespan (Html.toHtml tkValue')
+
+
-- | Given information about the source position of definitions, render a token
-richToken :: SrcMap -> RichToken -> Html
-richToken srcs (RichToken Token{..} details)
- | tkType == TkSpace = renderSpace (GHC.srcSpanStartLine tkSpan) tkValue
- | otherwise = linked content
+richToken :: SrcMaps -> NodeInfo PrintedType -> Token -> Html
+richToken srcs details Token{..}
+ | tkType == TkSpace = renderSpace (srcSpanStartLine tkSpan) tkValue'
+ | otherwise = annotate details $ linked content
where
+ tkValue' = filterCRLF $ utf8DecodeByteString tkValue
content = tokenSpan ! [ multiclass style ]
- tokenSpan = Html.thespan (Html.toHtml tkValue)
- style = tokenStyle tkType ++ maybe [] richTokenStyle details
+ tokenSpan = Html.thespan (Html.toHtml tkValue')
+ style = tokenStyle tkType ++ concatMap (richTokenStyle (null (nodeType details))) contexts
+
+ contexts = concatMap (Set.elems . identInfo) . Map.elems . nodeIdentifiers $ details
+
+ -- pick an arbitary identifier to hyperlink with
+ identDet = Map.lookupMin . nodeIdentifiers $ details
-- If we have name information, we can make links
- linked = case details of
- Just d -> externalAnchor d . internalAnchor d . hyperlink srcs d
+ linked = case identDet of
+ Just (n,_) -> hyperlink srcs n
Nothing -> id
-richTokenStyle :: TokenDetails -> [StyleClass]
-richTokenStyle (RtkVar _) = ["hs-var"]
-richTokenStyle (RtkType _) = ["hs-type"]
-richTokenStyle _ = []
+-- | Remove CRLFs from source
+filterCRLF :: String -> String
+filterCRLF ('\r':'\n':cs) = '\n' : filterCRLF cs
+filterCRLF (c:cs) = c : filterCRLF cs
+filterCRLF [] = []
+
+annotate :: NodeInfo PrintedType -> Html -> Html
+annotate ni content =
+ Html.thespan (annot <> content) ! [ Html.theclass "annot" ]
+ where
+ annot
+ | not (null annotation) =
+ Html.thespan (Html.toHtml annotation) ! [ Html.theclass "annottext" ]
+ | otherwise = mempty
+ annotation = typ ++ identTyps
+ typ = unlines (nodeType ni)
+ typedIdents = [ (n,t) | (n, identType -> Just t) <- Map.toList $ nodeIdentifiers ni ]
+ identTyps
+ | length typedIdents > 1 || null (nodeType ni)
+ = concatMap (\(n,t) -> printName n ++ " :: " ++ t ++ "\n") typedIdents
+ | otherwise = ""
+
+ printName :: Either ModuleName Name -> String
+ printName = either moduleNameString getOccString
+
+richTokenStyle
+ :: Bool -- ^ are we lacking a type annotation?
+ -> ContextInfo -- ^ in what context did this token show up?
+ -> [StyleClass]
+richTokenStyle True Use = ["hs-type"]
+richTokenStyle False Use = ["hs-var"]
+richTokenStyle _ RecField{} = ["hs-var"]
+richTokenStyle _ PatternBind{} = ["hs-var"]
+richTokenStyle _ MatchBind{} = ["hs-var"]
+richTokenStyle _ TyVarBind{} = ["hs-type"]
+richTokenStyle _ ValBind{} = ["hs-var"]
+richTokenStyle _ TyDecl = ["hs-type"]
+richTokenStyle _ ClassTyDecl{} = ["hs-type"]
+richTokenStyle _ Decl{} = ["hs-var"]
+richTokenStyle _ IEThing{} = [] -- could be either a value or type
tokenStyle :: TokenType -> [StyleClass]
tokenStyle TkIdentifier = ["hs-identifier"]
@@ -87,61 +204,70 @@ tokenStyle TkPragma = ["hs-pragma"]
tokenStyle TkUnknown = []
multiclass :: [StyleClass] -> HtmlAttr
-multiclass = Html.theclass . intercalate " "
+multiclass = Html.theclass . unwords
+
+externalAnchor :: Identifier -> Set.Set ContextInfo -> Html -> Html
+externalAnchor (Right name) contexts content
+ | not (isInternalName name)
+ , any isBinding contexts
+ = Html.thespan content ! [ Html.identifier $ externalAnchorIdent name ]
+externalAnchor _ _ content = content
-externalAnchor :: TokenDetails -> Html -> Html
-externalAnchor (RtkDecl name) content =
- Html.anchor content ! [ Html.name $ externalAnchorIdent name ]
-externalAnchor _ content = content
+isBinding :: ContextInfo -> Bool
+isBinding (ValBind RegularBind _ _) = True
+isBinding PatternBind{} = True
+isBinding Decl{} = True
+isBinding (RecField RecFieldDecl _) = True
+isBinding TyVarBind{} = True
+isBinding ClassTyDecl{} = True
+isBinding _ = False
-internalAnchor :: TokenDetails -> Html -> Html
-internalAnchor (RtkBind name) content =
- Html.anchor content ! [ Html.name $ internalAnchorIdent name ]
-internalAnchor _ content = content
+internalAnchor :: Identifier -> Set.Set ContextInfo -> Html -> Html
+internalAnchor (Right name) contexts content
+ | isInternalName name
+ , any isBinding contexts
+ = Html.thespan content ! [ Html.identifier $ internalAnchorIdent name ]
+internalAnchor _ _ content = content
-externalAnchorIdent :: GHC.Name -> String
+externalAnchorIdent :: Name -> String
externalAnchorIdent = hypSrcNameUrl
-internalAnchorIdent :: GHC.Name -> String
-internalAnchorIdent = ("local-" ++) . show . GHC.getKey . GHC.nameUnique
-
-hyperlink :: SrcMap -> TokenDetails -> Html -> Html
-hyperlink srcs details = case rtkName details of
- Left name ->
- if GHC.isInternalName name
- then internalHyperlink name
- else externalNameHyperlink srcs name
- Right name -> externalModHyperlink srcs name
-
-internalHyperlink :: GHC.Name -> Html -> Html
-internalHyperlink name content =
- Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
-
-externalNameHyperlink :: SrcMap -> GHC.Name -> Html -> Html
-externalNameHyperlink srcs name content = case Map.lookup mdl srcs of
- Just SrcLocal -> Html.anchor content !
- [ Html.href $ hypSrcModuleNameUrl mdl name ]
- Just (SrcExternal path) -> Html.anchor content !
- [ Html.href $ path </> hypSrcModuleNameUrl mdl name ]
- Nothing -> content
+internalAnchorIdent :: Name -> String
+internalAnchorIdent = ("local-" ++) . show . getKey . nameUnique
+
+-- | Generate the HTML hyperlink for an identifier
+hyperlink :: SrcMaps -> Identifier -> Html -> Html
+hyperlink (srcs, srcs') ident = case ident of
+ Right name | isInternalName name -> internalHyperlink name
+ | otherwise -> externalNameHyperlink name
+ Left name -> externalModHyperlink name
+
where
- mdl = GHC.nameModule name
+ internalHyperlink name content =
+ Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
+
+ externalNameHyperlink name content = case Map.lookup mdl srcs of
+ Just SrcLocal -> Html.anchor content !
+ [ Html.href $ hypSrcModuleNameUrl mdl name ]
+ Just (SrcExternal path) -> Html.anchor content !
+ [ Html.href $ spliceURL Nothing (Just mdl) (Just name) Nothing (".." </> path) ]
+ Nothing -> content
+ where
+ mdl = nameModule name
-externalModHyperlink :: SrcMap -> GHC.ModuleName -> Html -> Html
-externalModHyperlink srcs name content =
- let srcs' = Map.mapKeys GHC.moduleName srcs in
- case Map.lookup name srcs' of
- Just SrcLocal -> Html.anchor content !
- [ Html.href $ hypSrcModuleUrl' name ]
- Just (SrcExternal path) -> Html.anchor content !
- [ Html.href $ path </> hypSrcModuleUrl' name ]
- Nothing -> content
+ externalModHyperlink moduleName content =
+ case Map.lookup moduleName srcs' of
+ Just SrcLocal -> Html.anchor content !
+ [ Html.href $ hypSrcModuleUrl' moduleName ]
+ Just (SrcExternal path) -> Html.anchor content !
+ [ Html.href $ spliceURL' Nothing (Just moduleName) Nothing Nothing (".." </> path) ]
+ Nothing -> content
renderSpace :: Int -> String -> Html
-renderSpace _ [] = Html.noHtml
-renderSpace line ('\n':rest) = mconcat
- [ Html.thespan . Html.toHtml $ "\n"
+renderSpace !_ "" = Html.noHtml
+renderSpace !line ('\n':rest) = mconcat
+ [ Html.thespan (Html.toHtml '\n')
, lineAnchor (line + 1)
, renderSpace (line + 1) rest
]
@@ -151,4 +277,4 @@ renderSpace line space =
lineAnchor :: Int -> Html
-lineAnchor line = Html.anchor Html.noHtml ! [ Html.name $ hypSrcLineUrl line ]
+lineAnchor line = Html.thespan Html.noHtml ! [ Html.identifier $ hypSrcLineUrl line ]
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs
index e377471e..50916937 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs
@@ -1,17 +1,24 @@
+{-# LANGUAGE PatternSynonyms, OverloadedStrings #-}
module Haddock.Backends.Hyperlinker.Types where
-
import qualified GHC
+import Data.ByteString ( ByteString )
+
import Data.Map (Map)
data Token = Token
{ tkType :: TokenType
- , tkValue :: String
+ , tkValue :: ByteString -- ^ UTF-8 encoded
, tkSpan :: {-# UNPACK #-} !Span
}
deriving (Show)
+pattern BacktickTok, OpenParenTok, CloseParenTok :: Span -> Token
+pattern BacktickTok sp = Token TkSpecial "`" sp
+pattern OpenParenTok sp = Token TkSpecial "(" sp
+pattern CloseParenTok sp = Token TkSpecial ")" sp
+
type Position = GHC.RealSrcLoc
type Span = GHC.RealSrcSpan
@@ -31,29 +38,6 @@ data TokenType
| TkUnknown
deriving (Show, Eq)
-
-data RichToken = RichToken
- { rtkToken :: Token
- , rtkDetails :: Maybe TokenDetails
- }
-
-data TokenDetails
- = RtkVar GHC.Name
- | RtkType GHC.Name
- | RtkBind GHC.Name
- | RtkDecl GHC.Name
- | RtkModule GHC.ModuleName
- deriving (Eq)
-
-
-rtkName :: TokenDetails -> Either GHC.Name GHC.ModuleName
-rtkName (RtkVar name) = Left name
-rtkName (RtkType name) = Left name
-rtkName (RtkBind name) = Left name
-rtkName (RtkDecl name) = Left name
-rtkName (RtkModule name) = Right name
-
-
-- | Path for making cross-package hyperlinks in generated sources.
--
-- Used in 'SrcMap' to determine whether module originates in current package
@@ -63,5 +47,5 @@ data SrcPath
| SrcLocal
-- | Mapping from modules to cross-package source paths.
-type SrcMap = Map GHC.Module SrcPath
+type SrcMaps = (Map GHC.Module SrcPath, Map GHC.ModuleName SrcPath)
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
index 9de4a03d..4e8b88d2 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE OverloadedStrings #-}
module Haddock.Backends.Hyperlinker.Utils
( hypSrcDir, hypSrcModuleFile, hypSrcModuleFile'
, hypSrcModuleUrl, hypSrcModuleUrl'
@@ -6,21 +7,35 @@ module Haddock.Backends.Hyperlinker.Utils
, hypSrcModuleNameUrl, hypSrcModuleLineUrl
, hypSrcModuleUrlFormat
, hypSrcModuleNameUrlFormat, hypSrcModuleLineUrlFormat
- ) where
+ , spliceURL, spliceURL'
+ -- * HIE file processing
+ , PrintedType
+ , recoverFullIfaceTypes
+ ) where
+import Haddock.Utils
import Haddock.Backends.Xhtml.Utils
import GHC
-import FastString
-import System.FilePath.Posix ((</>))
+import HieTypes ( HieAST(..), HieType(..), HieArgs(..), TypeIndex, HieTypeFlat )
+import IfaceType
+import Name ( getOccFS, getOccString )
+import Outputable ( showSDoc )
+import Var ( VarBndr(..) )
+
+import System.FilePath.Posix ((</>), (<.>))
+import qualified Data.Array as A
+
+{-# INLINE hypSrcDir #-}
hypSrcDir :: FilePath
hypSrcDir = "src"
+{-# INLINE hypSrcModuleFile #-}
hypSrcModuleFile :: Module -> FilePath
-hypSrcModuleFile = hypSrcModuleFile' . moduleName
+hypSrcModuleFile m = moduleNameString (moduleName m) <.> "html"
hypSrcModuleFile' :: ModuleName -> FilePath
hypSrcModuleFile' mdl = spliceURL'
@@ -32,20 +47,19 @@ hypSrcModuleUrl = hypSrcModuleFile
hypSrcModuleUrl' :: ModuleName -> String
hypSrcModuleUrl' = hypSrcModuleFile'
+{-# INLINE hypSrcNameUrl #-}
hypSrcNameUrl :: Name -> String
-hypSrcNameUrl name = spliceURL
- Nothing Nothing (Just name) Nothing nameFormat
+hypSrcNameUrl = escapeStr . getOccString
+{-# INLINE hypSrcLineUrl #-}
hypSrcLineUrl :: Int -> String
-hypSrcLineUrl line = spliceURL
- Nothing Nothing Nothing (Just spn) lineFormat
- where
- loc = mkSrcLoc nilFS line 1
- spn = mkSrcSpan loc loc
+hypSrcLineUrl line = "line-" ++ show line
+{-# INLINE hypSrcModuleNameUrl #-}
hypSrcModuleNameUrl :: Module -> Name -> String
hypSrcModuleNameUrl mdl name = hypSrcModuleUrl mdl ++ "#" ++ hypSrcNameUrl name
+{-# INLINE hypSrcModuleLineUrl #-}
hypSrcModuleLineUrl :: Module -> Int -> String
hypSrcModuleLineUrl mdl line = hypSrcModuleUrl mdl ++ "#" ++ hypSrcLineUrl line
@@ -66,3 +80,65 @@ nameFormat = "%{NAME}"
lineFormat :: String
lineFormat = "line-%{LINE}"
+
+
+-- * HIE file procesddsing
+
+-- This belongs in GHC's HieUtils...
+
+-- | Pretty-printed type, ready to be turned into HTML by @xhtml@
+type PrintedType = String
+
+-- | Expand the flattened HIE AST into one where the types printed out and
+-- ready for end-users to look at.
+--
+-- Using just primitives found in GHC's HIE utilities, we could write this as
+-- follows:
+--
+-- > 'recoverFullIfaceTypes' dflags hieTypes hieAst
+-- > = 'fmap' (\ti -> 'showSDoc' df .
+-- > 'pprIfaceType' $
+-- > 'recoverFullType' ti hieTypes)
+-- > hieAst
+--
+-- However, this is very inefficient (both in time and space) because the
+-- mutliple calls to 'recoverFullType' don't share intermediate results. This
+-- function fixes that.
+recoverFullIfaceTypes
+ :: DynFlags
+ -> A.Array TypeIndex HieTypeFlat -- ^ flat types
+ -> HieAST TypeIndex -- ^ flattened AST
+ -> HieAST PrintedType -- ^ full AST
+recoverFullIfaceTypes df flattened ast = fmap (printed A.!) ast
+ where
+
+ -- Splitting this out into its own array is also important: we don't want
+ -- to pretty print the same type many times
+ printed :: A.Array TypeIndex PrintedType
+ printed = fmap (showSDoc df . pprIfaceType) unflattened
+
+ -- The recursion in 'unflattened' is crucial - it's what gives us sharing
+ -- between the IfaceType's produced
+ unflattened :: A.Array TypeIndex IfaceType
+ unflattened = fmap (\flatTy -> go (fmap (unflattened A.!) flatTy)) flattened
+
+ -- Unfold an 'HieType' whose subterms have already been unfolded
+ go :: HieType IfaceType -> IfaceType
+ go (HTyVarTy n) = IfaceTyVar (getOccFS n)
+ go (HAppTy a b) = IfaceAppTy a (hieToIfaceArgs b)
+ go (HLitTy l) = IfaceLitTy l
+ go (HForAllTy ((n,k),af) t) = let b = (getOccFS n, k)
+ in IfaceForAllTy (Bndr (IfaceTvBndr b) af) t
+ go (HFunTy a b) = IfaceFunTy a b
+ go (HQualTy con b) = IfaceDFunTy con b
+ go (HCastTy a) = a
+ go HCoercionTy = IfaceTyVar "<coercion type>"
+ go (HTyConApp a xs) = IfaceTyConApp a (hieToIfaceArgs xs)
+
+ -- This isn't fully faithful - we can't produce the 'Inferred' case
+ hieToIfaceArgs :: HieArgs IfaceType -> IfaceAppArgs
+ hieToIfaceArgs (HieArgs args) = go' args
+ where
+ go' [] = IA_Nil
+ go' ((True ,x):xs) = IA_Arg x Required $ go' xs
+ go' ((False,x):xs) = IA_Arg x Specified $ go' xs
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index cdaf6ae4..a342de00 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -19,10 +19,12 @@ module Haddock.GhcUtils where
import Control.Arrow
+import Data.Char ( isSpace )
+
import Haddock.Types( DocNameI )
import Exception
-import Outputable
+import Outputable ( Outputable, panic, showPpr )
import Name
import NameSet
import Module
@@ -30,6 +32,14 @@ import HscTypes
import GHC
import Class
import DynFlags
+import SrcLoc ( advanceSrcLoc )
+
+import StringBuffer ( StringBuffer )
+import qualified StringBuffer as S
+
+import Data.ByteString ( ByteString )
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Internal as BS
moduleString :: Module -> String
@@ -413,11 +423,129 @@ minimalDef n = do
-------------------------------------------------------------------------------
-setObjectDir, setHiDir, setStubDir, setOutputDir :: String -> DynFlags -> DynFlags
+setObjectDir, setHiDir, setHieDir, setStubDir, setOutputDir :: String -> DynFlags -> DynFlags
setObjectDir f d = d{ objectDir = Just f}
setHiDir f d = d{ hiDir = Just f}
+setHieDir f d = d{ hieDir = Just f}
setStubDir f d = d{ stubDir = Just f
, includePaths = addGlobalInclude (includePaths d) [f] }
-- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file
-- \#included from the .hc file when compiling with -fvia-C.
-setOutputDir f = setObjectDir f . setHiDir f . setStubDir f
+setOutputDir f = setObjectDir f . setHiDir f . setHieDir f . setStubDir f
+
+
+-------------------------------------------------------------------------------
+-- * 'StringBuffer' and 'ByteString'
+-------------------------------------------------------------------------------
+-- We get away with a bunch of these functions because 'StringBuffer' and
+-- 'ByteString' have almost exactly the same structure.
+
+-- | Convert a UTF-8 encoded 'ByteString' into a 'StringBuffer. This really
+-- relies on the internals of both 'ByteString' and 'StringBuffer'.
+--
+-- /O(n)/ (but optimized into a @memcpy@ by @bytestring@ under the hood)
+stringBufferFromByteString :: ByteString -> StringBuffer
+stringBufferFromByteString bs =
+ let BS.PS fp off len = bs <> BS.pack [0,0,0]
+ in S.StringBuffer { S.buf = fp, S.len = len - 3, S.cur = off }
+
+-- | Take the first @n@ /bytes/ of the 'StringBuffer' and put them in a
+-- 'ByteString'.
+--
+-- /O(1)/
+takeStringBuffer :: Int -> StringBuffer -> ByteString
+takeStringBuffer !n !(S.StringBuffer fp _ cur) = BS.PS fp cur n
+
+-- | Return the prefix of the first 'StringBuffer' that /isn't/ in the second
+-- 'StringBuffer'. **The behavior is undefined if the 'StringBuffers' use
+-- separate buffers.**
+--
+-- /O(1)/
+splitStringBuffer :: StringBuffer -> StringBuffer -> ByteString
+splitStringBuffer buf1 buf2 = takeStringBuffer n buf1
+ where n = S.byteDiff buf1 buf2
+
+-- | Split the 'StringBuffer' at the next newline (or the end of the buffer).
+-- Also: initial position is passed in and the updated position is returned.
+--
+-- /O(n)/ (but /O(1)/ space)
+spanLine :: RealSrcLoc -> StringBuffer -> (ByteString, RealSrcLoc, StringBuffer)
+spanLine !loc !buf = go loc buf
+ where
+
+ go !l !b
+ | not (S.atEnd b)
+ = case S.nextChar b of
+ ('\n', b') -> (splitStringBuffer buf b', advanceSrcLoc l '\n', b')
+ (c, b') -> go (advanceSrcLoc l c) b'
+ | otherwise
+ = (splitStringBuffer buf b, advanceSrcLoc l '\n', b)
+
+-- | Given a start position and a buffer with that start position, split the
+-- buffer at an end position.
+--
+-- /O(n)/ (but /O(1)/ space)
+spanPosition :: RealSrcLoc -- ^ start of buffeer
+ -> RealSrcLoc -- ^ position until which to take
+ -> StringBuffer -- ^ buffer from which to take
+ -> (ByteString, StringBuffer)
+spanPosition !start !end !buf = go start buf
+ where
+
+ go !l !b
+ | l < end
+ , not (S.atEnd b)
+ , (c, b') <- S.nextChar b
+ = go (advanceSrcLoc l c) b'
+ | otherwise
+ = (splitStringBuffer buf b, b)
+
+-- | Try to parse a line of CPP from the from of the buffer. A \"line\" of CPP
+-- consists of
+--
+-- * at most 10 whitespace characters, including at least one newline
+-- * a @#@ character
+-- * keep parsing lines until you find a line not ending in @\\@.
+--
+-- This is chock full of heuristics about what a line of CPP is.
+--
+-- /O(n)/ (but /O(1)/ space)
+tryCppLine :: RealSrcLoc -> StringBuffer -> Maybe (ByteString, RealSrcLoc, StringBuffer)
+tryCppLine !loc !buf = spanSpace (S.prevChar buf '\n' == '\n') loc buf
+ where
+
+ -- Keep consuming space characters until we hit either a @#@ or something
+ -- else. If we hit a @#@, start parsing CPP
+ spanSpace !seenNl !l !b
+ | S.atEnd b
+ = Nothing
+ | otherwise
+ = case S.nextChar b of
+ ('#' , b') | not (S.atEnd b')
+ , ('-', b'') <- S.nextChar b'
+ , ('}', _) <- S.nextChar b''
+ -> Nothing -- Edge case exception for @#-}@
+ | seenNl
+ -> Just (spanCppLine (advanceSrcLoc l '#') b') -- parse CPP
+ | otherwise
+ -> Nothing -- We didn't see a newline, so this can't be CPP!
+
+ (c , b') | isSpace c -> spanSpace (seenNl || c == '\n')
+ (advanceSrcLoc l c) b'
+ | otherwise -> Nothing
+
+ -- Consume a CPP line to its "end" (basically the first line that ends not
+ -- with a @\@ character)
+ spanCppLine !l !b
+ | S.atEnd b
+ = (splitStringBuffer buf b, l, b)
+ | otherwise
+ = case S.nextChar b of
+ ('\\', b') | not (S.atEnd b')
+ , ('\n', b'') <- S.nextChar b'
+ -> spanCppLine (advanceSrcLoc (advanceSrcLoc l '\\') '\n') b''
+
+ ('\n', b') -> (splitStringBuffer buf b', advanceSrcLoc l '\n', b')
+
+ (c , b') -> spanCppLine (advanceSrcLoc l c) b'
+
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs
index 8bfc249c..f1b2d45e 100644
--- a/haddock-api/src/Haddock/Interface.hs
+++ b/haddock-api/src/Haddock/Interface.hs
@@ -43,18 +43,16 @@ import Haddock.Types
import Haddock.Utils
import Control.Monad
+import Control.Exception (evaluate)
import Data.List
import qualified Data.Map as Map
import qualified Data.Set as Set
import Distribution.Verbosity
-import System.Directory
-import System.FilePath
import Text.Printf
import Module (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet)
import Digraph
import DynFlags hiding (verbosity)
-import Exception
import GHC hiding (verbosity)
import HscTypes
import FastString (unpackFS)
@@ -90,7 +88,7 @@ processModules verbosity modules flags extIfaces = do
out verbosity verbose "Creating interfaces..."
let instIfaceMap = Map.fromList [ (instMod iface, iface) | ext <- extIfaces
, iface <- ifInstalledIfaces ext ]
- (interfaces, ms) <- createIfaces0 verbosity modules flags instIfaceMap
+ (interfaces, ms) <- createIfaces verbosity modules flags instIfaceMap
let exportedNames =
Set.unions $ map (Set.fromList . ifaceExports) $
@@ -123,39 +121,15 @@ processModules verbosity modules flags extIfaces = do
--------------------------------------------------------------------------------
-createIfaces0 :: Verbosity -> [String] -> [Flag] -> InstIfaceMap -> Ghc ([Interface], ModuleSet)
-createIfaces0 verbosity modules flags instIfaceMap =
- -- Output dir needs to be set before calling depanal since depanal uses it to
- -- compute output file names that are stored in the DynFlags of the
- -- resulting ModSummaries.
- (if useTempDir then withTempOutputDir else id) $ do
- modGraph <- depAnalysis
- createIfaces verbosity flags instIfaceMap modGraph
+createIfaces :: Verbosity -> [String] -> [Flag] -> InstIfaceMap -> Ghc ([Interface], ModuleSet)
+createIfaces verbosity modules flags instIfaceMap = do
+ -- Ask GHC to tell us what the module graph is
+ targets <- mapM (\filePath -> guessTarget filePath Nothing) modules
+ setTargets targets
+ modGraph <- depanal [] False
- where
- useTempDir :: Bool
- useTempDir = Flag_NoTmpCompDir `notElem` flags
-
-
- withTempOutputDir :: Ghc a -> Ghc a
- withTempOutputDir action = do
- tmp <- liftIO getTemporaryDirectory
- x <- liftIO getProcessID
- let dir = tmp </> ".haddock-" ++ show x
- modifySessionDynFlags (setOutputDir dir)
- withTempDir dir action
-
-
- depAnalysis :: Ghc ModuleGraph
- depAnalysis = do
- targets <- mapM (\f -> guessTarget f Nothing) modules
- setTargets targets
- depanal [] False
-
-
-createIfaces :: Verbosity -> [Flag] -> InstIfaceMap -> ModuleGraph -> Ghc ([Interface], ModuleSet)
-createIfaces verbosity flags instIfaceMap mods = do
- let sortedMods = flattenSCCs $ topSortModuleGraph False mods Nothing
+ -- Visit modules in that order
+ let sortedMods = flattenSCCs $ topSortModuleGraph False modGraph Nothing
out verbosity normal "Haddock coverage:"
(ifaces, _, !ms) <- foldM f ([], Map.empty, emptyModuleSet) sortedMods
return (reverse ifaces, ms)
@@ -263,12 +237,3 @@ buildHomeLinks ifaces = foldl upd Map.empty (reverse ifaces)
keep_old env n = Map.insertWith (\_ old -> old) n mdl env
keep_new env n = Map.insert n mdl env
-
---------------------------------------------------------------------------------
--- * Utils
---------------------------------------------------------------------------------
-
-
-withTempDir :: (ExceptionMonad m) => FilePath -> m a -> m a
-withTempDir dir = gbracket_ (liftIO $ createDirectory dir)
- (liftIO $ removeDirectoryRecursive dir)
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index c9290ed0..36cfeaca 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -20,27 +20,21 @@
module Haddock.Interface.Create (createInterface) where
import Documentation.Haddock.Doc (metaDocAppend)
-import Documentation.Haddock.Utf8 as Utf8
import Haddock.Types
import Haddock.Options
import Haddock.GhcUtils
import Haddock.Utils
import Haddock.Convert
import Haddock.Interface.LexParseRn
-import Haddock.Backends.Hyperlinker.Types
-import Haddock.Backends.Hyperlinker.Ast as Hyperlinker
-import Haddock.Backends.Hyperlinker.Parser as Hyperlinker
import Data.Bifunctor
import Data.Bitraversable
-import qualified Data.ByteString as BS
import qualified Data.Map as M
import Data.Map (Map)
import Data.List
import Data.Maybe
import Data.Ord
import Control.Applicative
-import Control.Exception (evaluate)
import Control.Monad
import Data.Traversable
@@ -169,8 +163,6 @@ createInterface tm flags modMap instIfaceMap = do
modWarn <- liftErrMsg (moduleWarning dflags gre warnings)
- tokenizedSrc <- mkMaybeTokenizedSrc dflags flags tm
-
return $! Interface {
ifaceMod = mdl
, ifaceIsSig = is_sig
@@ -196,7 +188,8 @@ createInterface tm flags modMap instIfaceMap = do
, ifaceRnOrphanInstances = [] -- Filled in `renameInterface`
, ifaceHaddockCoverage = coverage
, ifaceWarningMap = warningMap
- , ifaceTokenizedSrc = tokenizedSrc
+ , ifaceHieFile = Just $ ml_hie_file $ ms_location ms
+ , ifaceDynFlags = dflags
}
@@ -1200,34 +1193,6 @@ seqList :: [a] -> ()
seqList [] = ()
seqList (x : xs) = x `seq` seqList xs
-mkMaybeTokenizedSrc :: DynFlags -> [Flag] -> TypecheckedModule
- -> ErrMsgGhc (Maybe [RichToken])
-mkMaybeTokenizedSrc dflags flags tm
- | Flag_HyperlinkedSource `elem` flags = case renamedSource tm of
- Just src -> do
- tokens <- liftGhcToErrMsgGhc (liftIO (mkTokenizedSrc dflags summary src))
- return $ Just tokens
- Nothing -> do
- liftErrMsg . tell . pure $ concat
- [ "Warning: Cannot hyperlink module \""
- , moduleNameString . ms_mod_name $ summary
- , "\" because renamed source is not available"
- ]
- return Nothing
- | otherwise = return Nothing
- where
- summary = pm_mod_summary . tm_parsed_module $ tm
-
-mkTokenizedSrc :: DynFlags -> ModSummary -> RenamedSource -> IO [RichToken]
-mkTokenizedSrc dflags ms src = do
- -- make sure to read the whole file at once otherwise
- -- we run out of file descriptors (see #495)
- rawSrc <- BS.readFile (msHsFilePath ms) >>= evaluate
- let tokens = Hyperlinker.parse dflags filepath (Utf8.decodeUtf8 rawSrc)
- return $ Hyperlinker.enrich src tokens
- where
- filepath = msHsFilePath ms
-
-- | Find a stand-alone documentation comment by its name.
findNamedDoc :: String -> [HsDecl GhcRn] -> ErrMsgM (Maybe HsDocString)
findNamedDoc name = search
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 2f5d0a9a..a4ef5f82 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -30,22 +30,19 @@ module Haddock.Types (
import Control.Exception
import Control.Arrow hiding ((<+>))
import Control.DeepSeq
+import Control.Monad (ap)
import Control.Monad.IO.Class (MonadIO(..))
-import Data.Typeable
+import Data.Typeable (Typeable)
import Data.Map (Map)
import Data.Data (Data)
-import qualified Data.Map as Map
import Documentation.Haddock.Types
import BasicTypes (Fixity(..), PromotionFlag(..))
-import GHC hiding (NoLink)
+import GHC
import DynFlags (Language)
import qualified GHC.LanguageExtensions as LangExt
import OccName
import Outputable
-import Control.Monad (ap)
-
-import Haddock.Backends.Hyperlinker.Types
-----------------------------------------------------------------------------
-- * Convenient synonyms
@@ -144,7 +141,8 @@ data Interface = Interface
-- | Tokenized source code of module (avaliable if Haddock is invoked with
-- source generation flag).
- , ifaceTokenizedSrc :: !(Maybe [RichToken])
+ , ifaceHieFile :: !(Maybe FilePath)
+ , ifaceDynFlags :: !DynFlags
}
type WarningMap = Map Name (Doc Name)
@@ -275,7 +273,7 @@ type DocForDecl name = (Documentation name, FnArgsDoc name)
noDocForDecl :: DocForDecl name
-noDocForDecl = (Documentation Nothing Nothing, Map.empty)
+noDocForDecl = (Documentation Nothing Nothing, mempty)
-----------------------------------------------------------------------------
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs
index 49a82717..dda42cea 100644
--- a/haddock-api/src/Haddock/Utils.hs
+++ b/haddock-api/src/Haddock/Utils.hs
@@ -33,7 +33,7 @@ module Haddock.Utils (
-- * Miscellaneous utilities
getProgramName, bye, die, dieMsg, noDieMsg, mapSnd, mapMaybeM, escapeStr,
- writeUtf8File,
+ writeUtf8File, withTempDir,
-- * HTML cross reference mapping
html_xrefs_ref, html_xrefs_ref',
@@ -62,6 +62,7 @@ import Haddock.Types
import Haddock.GhcUtils
import BasicTypes ( PromotionFlag(..) )
+import Exception (ExceptionMonad)
import GHC
import Name
import Outputable ( panic )
@@ -76,6 +77,7 @@ import Data.List ( isSuffixOf )
import Data.Maybe ( mapMaybe )
import System.Environment ( getProgName )
import System.Exit
+import System.Directory ( createDirectory, removeDirectoryRecursive )
import System.IO ( hPutStr, hSetEncoding, IOMode(..), stderr, utf8, withFile )
import System.IO.Unsafe ( unsafePerformIO )
import qualified System.FilePath.Posix as HtmlPath
@@ -406,6 +408,10 @@ writeUtf8File filepath contents = withFile filepath WriteMode $ \h -> do
hSetEncoding h utf8
hPutStr h contents
+withTempDir :: (ExceptionMonad m) => FilePath -> m a -> m a
+withTempDir dir = gbracket_ (liftIO $ createDirectory dir)
+ (liftIO $ removeDirectoryRecursive dir)
+
-----------------------------------------------------------------------------
-- * HTML cross references
--
diff --git a/haddock.cabal b/haddock.cabal
index 8285764a..e1f7565a 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -78,6 +78,7 @@ executable haddock
xhtml >= 3000.2 && < 3000.3,
Cabal >= 1.10,
ghc-boot,
+ ghc-boot-th,
ghc == 8.7.*,
bytestring,
parsec,
@@ -119,7 +120,6 @@ executable haddock
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
Haddock.Backends.Hyperlinker
- Haddock.Backends.Hyperlinker.Ast
Haddock.Backends.Hyperlinker.Parser
Haddock.Backends.Hyperlinker.Renderer
Haddock.Backends.Hyperlinker.Types
diff --git a/hypsrc-test/ref/src/CPP.html b/hypsrc-test/ref/src/CPP.html
index fb85bd2f..2ebcae90 100644
--- a/hypsrc-test/ref/src/CPP.html
+++ b/hypsrc-test/ref/src/CPP.html
@@ -11,8 +11,8 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span class="hs-keyword"
>module</span
><span
@@ -23,45 +23,48 @@
> </span
><span class="hs-keyword"
>where</span
- ><span
- >
-</span
- ><a name="line-3"
- ></a
- ><span
- >
-</span
- ><a name="line-4"
- ></a
><span class="hs-cpp"
- >#define SOMETHING1
+ >
+
+#define SOMETHING1
</span
><span
>
</span
- ><a name="line-6"
- ></a
- ><span class="hs-identifier"
- >foo</span
+ ><span id="line-6"
+ ></span
+ ><span class="annot"
+ ><a href="CPP.html#foo"
+ ><span class="hs-identifier hs-type"
+ >foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >String</span
+ >String</span
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
- ><a name="foo"
- ><a href="CPP.html#foo"
- ><span class="hs-identifier"
- >foo</span
- ></a
- ></a
+ ><span id="line-7"
+ ></span
+ ><span id="foo"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: String
+</span
+ ><a href="CPP.html#foo"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -74,142 +77,150 @@
-}</span
><span
> </span
+ ><span class="annot"
><span class="hs-string"
- >&quot;foo&quot;</span
- ><span
- >
-</span
- ><a name="line-10"
- ></a
- ><span
- >
-</span
- ><a name="line-11"
- ></a
+ >&quot;foo&quot;</span
+ ></span
><span class="hs-cpp"
- >#define SOMETHING2
+ >
+
+#define SOMETHING2
</span
><span
>
</span
- ><a name="line-13"
- ></a
- ><span class="hs-identifier"
- >bar</span
+ ><span id="line-13"
+ ></span
+ ><span class="annot"
+ ><a href="CPP.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >String</span
+ >String</span
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
- ><a name="bar"
- ><a href="CPP.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
+ ><span id="line-14"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: String
+</span
+ ><a href="CPP.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-string"
- >&quot;block comment in a string is not a comment {- &quot;</span
- ><span
- >
-</span
- ><a name="line-15"
- ></a
- ><span
- >
-</span
- ><a name="line-16"
- ></a
+ >&quot;block comment in a string is not a comment {- &quot;</span
+ ></span
><span class="hs-cpp"
- >#define SOMETHING3
+ >
+
+#define SOMETHING3
</span
><span
>
</span
- ><a name="line-18"
- ></a
+ ><span id="line-18"
+ ></span
><span class="hs-comment"
>-- &quot; single quotes are fine in line comments</span
><span
>
</span
- ><a name="line-19"
- ></a
+ ><span id="line-19"
+ ></span
><span class="hs-comment"
>-- {- unclosed block comments are fine in line comments</span
><span
>
</span
- ><a name="line-20"
- ></a
+ ><span id="line-20"
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
+ ><span id="line-21"
+ ></span
><span class="hs-comment"
>-- Multiline CPP is also fine</span
- ><span
- >
-</span
- ><a name="line-22"
- ></a
><span class="hs-cpp"
- >#define FOO\
+ >
+#define FOO\
1
</span
><span
>
</span
- ><a name="line-25"
- ></a
- ><span class="hs-identifier"
- >baz</span
+ ><span id="line-25"
+ ></span
+ ><span class="annot"
+ ><a href="CPP.html#baz"
+ ><span class="hs-identifier hs-type"
+ >baz</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >String</span
+ >String</span
+ ></span
><span
>
</span
- ><a name="line-26"
- ></a
- ><a name="baz"
- ><a href="CPP.html#baz"
- ><span class="hs-identifier"
- >baz</span
- ></a
- ></a
+ ><span id="line-26"
+ ></span
+ ><span id="baz"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: String
+</span
+ ><a href="CPP.html#baz"
+ ><span class="hs-identifier hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-string"
- >&quot;line comment in a string is not a comment --&quot;</span
+ >&quot;line comment in a string is not a comment --&quot;</span
+ ></span
><span
>
</span
- ><a name="line-27"
- ></a
+ ><span id="line-27"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/ClangCppBug.html b/hypsrc-test/ref/src/ClangCppBug.html
new file mode 100644
index 00000000..42d0cfc0
--- /dev/null
+++ b/hypsrc-test/ref/src/ClangCppBug.html
@@ -0,0 +1,306 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-pragma"
+ >{-# LANGUAGE CPP #-}</span
+ ><span
+ >
+</span
+ ><span id="line-2"
+ ></span
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >ClangCppBug</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><span id="line-3"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-4"
+ ></span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#foo"
+ ><span class="hs-identifier hs-type"
+ >foo</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-5"
+ ></span
+ ><span id="foo"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: Int
+</span
+ ><a href="ClangCppBug.html#foo"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >1</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-6"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-7"
+ ></span
+ ><span class="hs-comment"
+ >-- Clang doesn't mind these:</span
+ ><span class="hs-cpp"
+ >
+#define BAX 2
+</span
+ ><span class="hs-pragma"
+ >{-# INLINE</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#bar"
+ ><span class="hs-pragma hs-type"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-pragma"
+ >#-}</span
+ ><span
+ >
+</span
+ ><span id="line-10"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-11"
+ ></span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-12"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: Int
+</span
+ ><a href="ClangCppBug.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >3</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-13"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-14"
+ ></span
+ ><span class="hs-comment"
+ >-- But it doesn't like this:</span
+ ><span
+ >
+</span
+ ><span id="line-15"
+ ></span
+ ><span class="hs-pragma"
+ >{-# RULES</span
+ ><span
+ >
+</span
+ ><span id="line-16"
+ ></span
+ ><span class="annot"
+ ><span class="hs-pragma"
+ >&quot;bar/qux&quot;</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#bar"
+ ><span class="hs-pragma hs-type"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-pragma"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#qux"
+ ><span class="hs-pragma hs-type"
+ >qux</span
+ ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-17"
+ ></span
+ ><span class="annot"
+ ><span class="hs-pragma"
+ >&quot;qux/foo&quot;</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#qux"
+ ><span class="hs-pragma hs-type"
+ >qux</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-pragma"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#foo"
+ ><span class="hs-pragma hs-type"
+ >foo</span
+ ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-18"
+ ></span
+ ><span
+ > </span
+ ><span class="hs-pragma"
+ >#-}</span
+ ><span
+ >
+</span
+ ><span id="line-20"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-21"
+ ></span
+ ><span class="annot"
+ ><a href="ClangCppBug.html#qux"
+ ><span class="hs-identifier hs-type"
+ >qux</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-22"
+ ></span
+ ><span id="qux"
+ ><span class="annot"
+ ><span class="annottext"
+ >qux :: Int
+</span
+ ><a href="ClangCppBug.html#qux"
+ ><span class="hs-identifier hs-var hs-var"
+ >qux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >88</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-23"
+ ></span
+ ></pre
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html
index d2604e82..dd1e6ebc 100644
--- a/hypsrc-test/ref/src/Classes.html
+++ b/hypsrc-test/ref/src/Classes.html
@@ -19,36 +19,40 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
+ ><span id="line-4"
+ ></span
><span class="hs-keyword"
>class</span
><span
> </span
- ><a name="Foo"
- ><a href="Classes.html#Foo"
- ><span class="hs-identifier"
- >Foo</span
- ></a
- ></a
+ ><span id="Foo"
+ ><span class="annot"
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043524"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -56,55 +60,65 @@
><span
>
</span
- ><a name="line-5"
- ></a
+ ><span id="line-5"
+ ></span
><span
> </span
- ><a name="bar"
- ><a href="Classes.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
+ ><span id="bar"
+ ><span class="annot"
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
> </span
- ><a name="baz"
- ><a href="Classes.html#baz"
- ><span class="hs-identifier"
- >baz</span
- ></a
- ></a
+ ><span id="baz"
+ ><span class="annot"
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier hs-type"
+ >baz</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -113,42 +127,50 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-7"
- ></a
+ ><span id="line-7"
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
+ ><span id="line-8"
+ ></span
><span class="hs-keyword"
>instance</span
><span
> </span
+ ><span class="annot"
><a href="Classes.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -156,45 +178,66 @@
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
+ ><span id="local-6989586621679043488"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: Int -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >id</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int
+forall a. a -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >id</span
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
+ ><span id="line-10"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#baz"
- ><span class="hs-identifier"
- >baz</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043486"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: Int -&gt; (Int, Int)
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043485"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -203,161 +246,201 @@
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-11"
- ></a
+ ><span id="line-11"
+ ></span
><span
>
</span
- ><a name="line-12"
- ></a
+ ><span id="line-12"
+ ></span
+ ><span id="local-6989586621679043484"
><span class="hs-keyword"
- >instance</span
- ><span
- > </span
- ><a href="Classes.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-keyword"
- >where</span
- ><span
- >
+ >instance</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
</span
- ><a name="line-13"
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="Classes.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >length</span
- ><span
- >
+ ><span id="line-13"
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043481"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: [a] -&gt; Int
</span
- ><a name="line-14"
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="Classes.html#baz"
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; Int
+forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
+</span
+ ><span class="hs-identifier hs-var"
+ >length</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-14"
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043479"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: Int -&gt; ([a], [a])
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
><span class="hs-identifier"
- >baz</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-identifier"
- >_</span
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >,</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >)</span
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >)</span
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
+ ><span id="line-15"
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
+ ><span id="line-17"
+ ></span
><span class="hs-keyword"
>class</span
><span
> </span
+ ><span class="annot"
><a href="Classes.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=&gt;</span
><span
> </span
- ><a name="Foo%27"
- ><a href="Classes.html#Foo%27"
- ><span class="hs-identifier"
- >Foo'</span
- ></a
- ></a
+ ><span id="Foo%27"
+ ><span class="annot"
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier hs-var"
+ >Foo'</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043519"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -365,16 +448,18 @@
><span
>
</span
- ><a name="line-18"
- ></a
+ ><span id="line-18"
+ ></span
><span
> </span
- ><a name="quux"
- ><a href="Classes.html#quux"
- ><span class="hs-identifier"
- >quux</span
- ></a
- ></a
+ ><span id="quux"
+ ><span class="annot"
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier hs-type"
+ >quux</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -383,18 +468,22 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -403,91 +492,123 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-19"
- ></a
+ ><span id="line-19"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#quux"
- ><span class="hs-identifier"
- >quux</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span class="hs-special"
- >,</span
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="Classes.html#norf"
- ><span class="hs-identifier hs-var"
- >norf</span
- ></a
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
- ><span class="hs-special"
- >,</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
- ><span class="hs-special"
- >]</span
+ ><span id="local-6989586621679043477"
+ ><span class="annot"
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier hs-var hs-var"
+ >quux</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span id="local-6989586621679043476"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span id="local-6989586621679043475"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; a
+forall a. Foo' a =&gt; [a] -&gt; a
+</span
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier hs-var"
+ >norf</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
+ ><span id="line-20"
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
+ ><span id="line-21"
+ ></span
><span
> </span
- ><a name="norf"
- ><a href="Classes.html#norf"
- ><span class="hs-identifier"
- >norf</span
- ></a
- ></a
+ ><span id="norf"
+ ><span class="annot"
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier hs-type"
+ >norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -496,10 +617,12 @@
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span
@@ -508,87 +631,145 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
+ ><span id="line-22"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#norf"
- ><span class="hs-identifier"
- >norf</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="Classes.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >.</span
- ><span
- > </span
- ><a href="Classes.html#baz"
- ><span class="hs-identifier hs-var"
- >baz</span
- ></a
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >.</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >sum</span
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >.</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >map</span
- ><span
- > </span
- ><a href="Classes.html#bar"
- ><span class="hs-identifier hs-var"
- >bar</span
- ></a
+ ><span id="local-6989586621679043473"
+ ><span class="annot"
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a, a) -&gt; a
+forall a. Foo' a =&gt; (a, a) -&gt; a
+</span
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >((a, a) -&gt; a) -&gt; ([a] -&gt; (a, a)) -&gt; [a] -&gt; a
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; (a, a)
+forall a. Foo a =&gt; Int -&gt; (a, a)
+</span
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier hs-var"
+ >baz</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Int -&gt; (a, a)) -&gt; ([a] -&gt; Int) -&gt; [a] -&gt; (a, a)
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >[Int] -&gt; Int
+forall (t :: * -&gt; *) a. (Foldable t, Num a) =&gt; t a -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >([Int] -&gt; Int) -&gt; ([a] -&gt; [Int]) -&gt; [a] -&gt; Int
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a -&gt; Int) -&gt; [a] -&gt; [Int]
+forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
+</span
+ ><span class="hs-identifier hs-var"
+ >map</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; Int
+forall a. Foo a =&gt; a -&gt; Int
+</span
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
><span
>
</span
- ><a name="line-24"
- ></a
+ ><span id="line-24"
+ ></span
><span class="hs-keyword"
>instance</span
><span
> </span
- ><a href="Classes.html#Foo%27"
- ><span class="hs-identifier hs-type"
- >Foo'</span
- ></a
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Int</span
+ ><span id="local-6989586621679043468"
+ ><span class="annot"
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier hs-type"
+ >Foo'</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -596,118 +777,154 @@
><span
>
</span
- ><a name="line-25"
- ></a
+ ><span id="line-25"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#norf"
- ><span class="hs-identifier"
- >norf</span
- ></a
- ></a
+ ><span id="local-6989586621679043465"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf :: [Int] -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >sum</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[Int] -&gt; Int
+forall (t :: * -&gt; *) a. (Foldable t, Num a) =&gt; t a -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ></span
><span
>
</span
- ><a name="line-26"
- ></a
+ ><span id="line-26"
+ ></span
><span
>
</span
- ><a name="line-27"
- ></a
- ><span class="hs-keyword"
- >instance</span
- ><span
- > </span
- ><a href="Classes.html#Foo%27"
- ><span class="hs-identifier hs-type"
- >Foo'</span
- ></a
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
+ ><span id="line-27"
+ ></span
+ ><span id="local-6989586621679043464"
><span class="hs-keyword"
- >where</span
- ><span
- >
+ >instance</span
+ ><span
+ > </span
+ ><span id="local-6989586621679043460"
+ ><span class="annot"
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier hs-type"
+ >Foo'</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
</span
- ><a name="line-28"
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="Classes.html#quux"
- ><span class="hs-identifier"
- >quux</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >uncurry</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator hs-var"
- >++</span
- ><span class="hs-special"
- >)</span
+ ><span id="line-28"
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043459"
+ ><span class="annot"
+ ><span class="annottext"
+ >quux :: ([a], [a]) -&gt; [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >quux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >([a] -&gt; [a] -&gt; [a]) -&gt; ([a], [a]) -&gt; [a]
+forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
+</span
+ ><span class="hs-identifier hs-var"
+ >uncurry</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><span class="hs-operator hs-var"
+ >(++)</span
+ ></span
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
+ ><span id="line-29"
+ ></span
><span
>
</span
- ><a name="line-30"
- ></a
+ ><span id="line-30"
+ ></span
><span
>
</span
- ><a name="line-31"
- ></a
+ ><span id="line-31"
+ ></span
><span class="hs-keyword"
>class</span
><span
> </span
- ><a name="Plugh"
- ><a href="Classes.html#Plugh"
- ><span class="hs-identifier"
- >Plugh</span
- ></a
- ></a
+ ><span id="Plugh"
+ ><span class="annot"
+ ><a href="Classes.html#Plugh"
+ ><span class="hs-identifier hs-var"
+ >Plugh</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >p</span
- ></a
- ></a
+ ><span id="local-6989586621679043503"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -715,132 +932,164 @@
><span
>
</span
- ><a name="line-32"
- ></a
+ ><span id="line-32"
+ ></span
><span
> </span
- ><a name="plugh"
- ><a href="Classes.html#plugh"
- ><span class="hs-identifier"
- >plugh</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >p</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >p</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >p</span
- ></a
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >)</span
+ ><span id="local-6989586621679043505"
+ ><span id="local-6989586621679043506"
+ ><span id="plugh"
+ ><span class="annot"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier hs-type"
+ >plugh</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ></span
+ ></span
><span
>
</span
- ><a name="line-33"
- ></a
+ ><span id="line-33"
+ ></span
><span
>
</span
- ><a name="line-34"
- ></a
+ ><span id="line-34"
+ ></span
><span class="hs-keyword"
>instance</span
><span
> </span
+ ><span class="annot"
><a href="Classes.html#Plugh"
- ><span class="hs-identifier hs-type"
- >Plugh</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Plugh</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Either</span
+ >Either</span
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -848,30 +1097,42 @@
><span
>
</span
- ><a name="line-35"
- ></a
+ ><span id="line-35"
+ ></span
><span
> </span
- ><a name=""
- ><a href="Classes.html#plugh"
- ><span class="hs-identifier"
- >plugh</span
- ></a
- ></a
+ ><span id="local-6989586621679043454"
+ ><span class="annot"
+ ><span class="annottext"
+ >plugh :: Either a a -&gt; Either b b -&gt; Either (a -&gt; b) (b -&gt; a)
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var hs-var hs-var"
+ >plugh</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><span class="hs-identifier hs-var"
- >Left</span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Left</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043453"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -884,45 +1145,80 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >Right</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. b -&gt; Either a b
+</span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >((b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a))
+-&gt; (b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >const</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; b -&gt; a
+forall a b. a -&gt; b -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-36"
- ></a
+ ><span id="line-36"
+ ></span
><span
> </span
- ><span class="hs-identifier"
- >plugh</span
+ ><span class="annot"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier hs-var"
+ >plugh</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><span class="hs-identifier hs-var"
- >Right</span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Right</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043451"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -935,31 +1231,59 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >Right</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. b -&gt; Either a b
+</span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >((b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a))
+-&gt; (b -&gt; a) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >const</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; b -&gt; a
+forall a b. a -&gt; b -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-37"
- ></a
+ ><span id="line-37"
+ ></span
><span
> </span
- ><span class="hs-identifier"
- >plugh</span
+ ><span class="annot"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier hs-var"
+ >plugh</span
+ ></a
+ ></span
><span
> </span
><span class="hs-identifier"
@@ -968,16 +1292,23 @@
> </span
><span class="hs-special"
>(</span
- ><span class="hs-identifier hs-var"
- >Left</span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Left</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043450"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -986,31 +1317,59 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >Left</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. a -&gt; Either a b
+</span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >((a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a))
+-&gt; (a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >const</span
+ ><span class="annot"
+ ><span class="annottext"
+ >b -&gt; a -&gt; b
+forall a b. a -&gt; b -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-38"
- ></a
+ ><span id="line-38"
+ ></span
><span
> </span
- ><span class="hs-identifier"
- >plugh</span
+ ><span class="annot"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier hs-var"
+ >plugh</span
+ ></a
+ ></span
><span
> </span
><span class="hs-identifier"
@@ -1019,16 +1378,23 @@
> </span
><span class="hs-special"
>(</span
- ><span class="hs-identifier hs-var"
- >Right</span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Right</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043449"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1037,27 +1403,51 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >Left</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. a -&gt; Either a b
+</span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >((a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a))
+-&gt; (a -&gt; b) -&gt; Either (a -&gt; b) (b -&gt; a)
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >const</span
+ ><span class="annot"
+ ><span class="annottext"
+ >b -&gt; a -&gt; b
+forall a b. a -&gt; b -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-39"
- ></a
+ ><span id="line-39"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/Constructors.html b/hypsrc-test/ref/src/Constructors.html
index e35ca0b1..6cdf07db 100644
--- a/hypsrc-test/ref/src/Constructors.html
+++ b/hypsrc-test/ref/src/Constructors.html
@@ -19,375 +19,489 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
+ ><span id="line-4"
+ ></span
><span class="hs-keyword"
>data</span
><span
> </span
- ><a name="Foo"
- ><a href="Constructors.html#Foo"
- ><span class="hs-identifier"
- >Foo</span
- ></a
- ></a
+ ><span id="Foo"
+ ><span class="annot"
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-5"
- ></a
+ ><span id="line-5"
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="Bar"
- ><a href="Constructors.html#Bar"
- ><span class="hs-identifier"
- >Bar</span
- ></a
- ></a
+ ><span id="Bar"
+ ><span class="annot"
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a name="Baz"
- ><a href="Constructors.html#Baz"
- ><span class="hs-identifier"
- >Baz</span
- ></a
- ></a
+ ><span id="Baz"
+ ><span class="annot"
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
+ ><span id="line-7"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a name="Quux"
- ><a href="Constructors.html#Quux"
- ><span class="hs-identifier"
- >Quux</span
- ></a
- ></a
+ ><span id="Quux"
+ ><span class="annot"
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
+ ><span id="line-8"
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span class="hs-keyword"
>newtype</span
><span
> </span
- ><a name="Norf"
- ><a href="Constructors.html#Norf"
- ><span class="hs-identifier"
- >Norf</span
- ></a
- ></a
+ ><span id="Norf"
+ ><span class="annot"
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="Norf"
- ><a href="Constructors.html#Norf"
- ><span class="hs-identifier"
- >Norf</span
- ></a
- ></a
+ ><span id="Norf"
+ ><span class="annot"
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-10"
- ></a
+ ><span id="line-10"
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
+ ><span id="line-11"
+ ></span
><span
>
</span
- ><a name="line-12"
- ></a
- ><span class="hs-identifier"
- >bar</span
+ ><span id="line-12"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >baz</span
+ ><span class="annot"
+ ><a href="Constructors.html#baz"
+ ><span class="hs-identifier hs-type"
+ >baz</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >quux</span
+ ><span class="annot"
+ ><a href="Constructors.html#quux"
+ ><span class="hs-identifier hs-type"
+ >quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-13"
- ></a
- ><a name="bar"
- ><a href="Constructors.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
+ ><span id="line-13"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: Foo
+</span
+ ><a href="Constructors.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Constructors.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
- ><a name="baz"
- ><a href="Constructors.html#baz"
- ><span class="hs-identifier"
- >baz</span
- ></a
- ></a
+ ><span id="line-14"
+ ></span
+ ><span id="baz"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: Foo
+</span
+ ><a href="Constructors.html#baz"
+ ><span class="hs-identifier hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Constructors.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
- ><a name="quux"
- ><a href="Constructors.html#quux"
- ><span class="hs-identifier"
- >quux</span
- ></a
- ></a
+ ><span id="line-15"
+ ></span
+ ><span id="quux"
+ ><span class="annot"
+ ><span class="annottext"
+ >quux :: Foo
+</span
+ ><a href="Constructors.html#quux"
+ ><span class="hs-identifier hs-var hs-var"
+ >quux</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Constructors.html#Quux"
- ><span class="hs-identifier hs-var"
- >Quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int -&gt; Foo
+</span
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
- ><a href="Constructors.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="Constructors.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
+ ><span id="line-17"
+ ></span
><span
>
</span
- ><a name="line-18"
- ></a
- ><span class="hs-identifier"
- >unfoo</span
+ ><span id="line-18"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-type"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-19"
- ></a
- ><a name="unfoo"
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier"
- >unfoo</span
- ></a
- ></a
+ ><span id="line-19"
+ ></span
+ ><span id="unfoo"
+ ><span class="annot"
+ ><span class="annottext"
+ >unfoo :: Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var hs-var"
+ >unfoo</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
- ><span class="hs-identifier"
- >unfoo</span
+ ><span id="line-20"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
- ><span class="hs-identifier"
- >unfoo</span
+ ><span id="line-21"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Quux"
- ><span class="hs-identifier hs-var"
- >Quux</span
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >foo</span
+ ><span class="hs-identifier hs-type"
+ >Quux</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >n</span
- ></a
- ></a
+ ><span id="local-6989586621679043545"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043544"
+ ><span class="annot"
+ ><span class="annottext"
+ >n :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -396,61 +510,96 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >42</span
+ >42</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >n</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >foo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
+ ><span id="line-22"
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
><span
>
</span
- ><a name="line-24"
- ></a
- ><span class="hs-identifier"
- >unnorf</span
+ ><span id="line-24"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-type"
+ >unnorf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -459,57 +608,75 @@
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="Constructors.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span
>
</span
- ><a name="line-25"
- ></a
- ><a name="unnorf"
- ><a href="Constructors.html#unnorf"
- ><span class="hs-identifier"
- >unnorf</span
- ></a
- ></a
+ ><span id="line-25"
+ ></span
+ ><span id="unnorf"
+ ><span class="annot"
+ ><span class="annottext"
+ >unnorf :: Norf -&gt; [Foo]
+</span
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-var hs-var"
+ >unnorf</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Norf"
- ><span class="hs-identifier hs-var"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >xs</span
- ></a
- ></a
+ ><span id="local-6989586621679043540"
+ ><span class="annot"
+ ><span class="annottext"
+ >xs :: [Foo]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span class="hs-special"
@@ -520,51 +687,71 @@
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >xs</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[Foo]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-26"
- ></a
- ><span class="hs-identifier"
- >unnorf</span
+ ><span id="line-26"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-var"
+ >unnorf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Norf"
- ><span class="hs-identifier hs-var"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >xs</span
- ></a
- ></a
+ ><span id="local-6989586621679043539"
+ ><span class="annot"
+ ><span class="annottext"
+ >xs :: [Foo]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span class="hs-special"
@@ -575,21 +762,36 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >reverse</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[Foo] -&gt; [Foo]
+forall a. [a] -&gt; [a]
+</span
+ ><span class="hs-identifier hs-var"
+ >reverse</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >xs</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[Foo]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-27"
- ></a
- ><span class="hs-identifier"
- >unnorf</span
+ ><span id="line-27"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-var"
+ >unnorf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-identifier"
@@ -600,100 +802,138 @@
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[Foo]
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-28"
- ></a
+ ><span id="line-28"
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
+ ><span id="line-29"
+ ></span
><span
>
</span
- ><a name="line-30"
- ></a
- ><span class="hs-identifier"
- >unnorf'</span
+ ><span id="line-30"
+ ></span
+ ><span class="annot"
+ ><a href="Constructors.html#unnorf%27"
+ ><span class="hs-identifier hs-type"
+ >unnorf'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Constructors.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-31"
- ></a
- ><a name="unnorf%27"
- ><a href="Constructors.html#unnorf%27"
- ><span class="hs-identifier"
- >unnorf'</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="line-31"
+ ></span
+ ><span id="unnorf%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >unnorf' :: Norf -&gt; Int
+</span
+ ><a href="Constructors.html#unnorf%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >unnorf'</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043535"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Norf
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span class="hs-glyph"
>@</span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Norf"
- ><span class="hs-identifier hs-var"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f1</span
- ></a
- ></a
+ ><span id="local-6989586621679043534"
+ ><span class="annot"
+ ><span class="annottext"
+ >f1 :: Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f1</span
+ ></a
+ ></span
+ ></span
><span class="hs-glyph"
>@</span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Quux"
- ><span class="hs-identifier hs-var"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-identifier"
>_</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >n</span
- ></a
- ></a
+ ><span id="local-6989586621679043533"
+ ><span class="annot"
+ ><span class="annottext"
+ >n :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span class="hs-special"
@@ -706,28 +946,40 @@
>,</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f2</span
- ></a
- ></a
+ ><span id="local-6989586621679043532"
+ ><span class="annot"
+ ><span class="annottext"
+ >f2 :: Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f2</span
+ ></a
+ ></span
+ ></span
><span class="hs-glyph"
>@</span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Constructors.html#Quux"
- ><span class="hs-identifier hs-var"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f3</span
- ></a
- ></a
+ ><span id="local-6989586621679043531"
+ ><span class="annot"
+ ><span class="annottext"
+ >f3 :: Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f3</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-identifier"
@@ -745,61 +997,109 @@
><span
>
</span
- ><a name="line-32"
- ></a
+ ><span id="line-32"
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x'</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x'</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >n</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f1</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f1</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >aux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >aux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f3</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f3</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-33"
- ></a
+ ><span id="line-33"
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -807,132 +1107,234 @@
><span
>
</span
- ><a name="line-34"
- ></a
+ ><span id="line-34"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >aux</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >fx</span
- ></a
- ></a
+ ><span id="local-6989586621679043529"
+ ><span class="annot"
+ ><span class="annottext"
+ >aux :: Foo -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >aux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043528"
+ ><span class="annot"
+ ><span class="annottext"
+ >fx :: Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >fx</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f2</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f2</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >fx</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >fx</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f3</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f3</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-35"
- ></a
+ ><span id="line-35"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x'</span
- ></a
- ></a
+ ><span id="local-6989586621679043530"
+ ><span class="annot"
+ ><span class="annottext"
+ >x' :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >x'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >sum</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[Int] -&gt; Int
+forall (t :: * -&gt; *) a. (Foldable t, Num a) =&gt; t a -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >.</span
+ ><span class="annot"
+ ><span class="annottext"
+ >([Int] -&gt; Int) -&gt; (Norf -&gt; [Int]) -&gt; Norf -&gt; Int
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >map</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Foo -&gt; Int) -&gt; [Foo] -&gt; [Int]
+forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
+</span
+ ><span class="hs-identifier hs-var"
+ >map</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unfoo"
- ><span class="hs-identifier hs-var"
- >unfoo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Foo -&gt; Int
+</span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >.</span
+ ><span class="annot"
+ ><span class="annottext"
+ >([Foo] -&gt; [Int]) -&gt; (Norf -&gt; [Foo]) -&gt; Norf -&gt; [Int]
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
><span
> </span
- ><a href="Constructors.html#unnorf"
- ><span class="hs-identifier hs-var"
- >unnorf</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Norf -&gt; [Foo]
+</span
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-var"
+ >unnorf</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Norf -&gt; Int) -&gt; Norf -&gt; Int
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Norf
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-36"
- ></a
+ ><span id="line-36"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/Identifiers.html b/hypsrc-test/ref/src/Identifiers.html
index ce69ad37..301761c1 100644
--- a/hypsrc-test/ref/src/Identifiers.html
+++ b/hypsrc-test/ref/src/Identifiers.html
@@ -19,641 +19,1040 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
- ><span class="hs-identifier"
- >foo</span
+ ><span id="line-4"
+ ></span
+ ><span class="annot"
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-type"
+ >foo</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >bar</span
+ ><span class="annot"
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >baz</span
+ ><span class="annot"
+ ><a href="Identifiers.html#baz"
+ ><span class="hs-identifier hs-type"
+ >baz</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-5"
- ></a
- ><a name="foo"
- ><a href="Identifiers.html#foo"
- ><span class="hs-identifier"
- >foo</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="line-5"
+ ></span
+ ><span id="foo"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043592"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043591"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >+</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="Identifiers.html#bar"
- ><span class="hs-identifier hs-var"
- >bar</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
</span
- ><a name="line-6"
- ></a
- ><a name="bar"
- ><a href="Identifiers.html#bar"
- ><span class="hs-identifier"
- >bar</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>y</span
></a
- ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-6"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043588"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043587"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >+</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-glyph"
- >-</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="Identifiers.html#baz"
- ><span class="hs-identifier hs-var"
- >baz</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-glyph hs-var"
+ >-</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#baz"
+ ><span class="hs-identifier hs-var"
+ >baz</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-glyph"
- >-</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-glyph hs-var"
+ >-</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
</span
- ><a name="line-7"
- ></a
- ><a name="baz"
- ><a href="Identifiers.html#baz"
- ><span class="hs-identifier"
- >baz</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>y</span
></a
- ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-7"
+ ></span
+ ><span id="baz"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#baz"
+ ><span class="hs-identifier hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043586"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043585"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
+ ><span id="line-8"
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
- ><span class="hs-identifier"
- >quux</span
+ ><span id="line-9"
+ ></span
+ ><span class="annot"
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-type"
+ >quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
- ><a name="quux"
- ><a href="Identifiers.html#quux"
- ><span class="hs-identifier"
- >quux</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="line-10"
+ ></span
+ ><span id="quux"
+ ><span class="annot"
+ ><span class="annottext"
+ >quux :: Int -&gt; Int
+</span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var hs-var"
+ >quux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043583"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Identifiers.html#foo"
- ><span class="hs-identifier hs-var"
- >foo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="Identifiers.html#bar"
- ><span class="hs-identifier hs-var"
- >bar</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="Identifiers.html#bar"
- ><span class="hs-identifier hs-var"
- >bar</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-11"
- ></a
+ ><span id="line-11"
+ ></span
><span
>
</span
- ><a name="line-12"
- ></a
- ><span class="hs-identifier"
- >norf</span
+ ><span id="line-12"
+ ></span
+ ><span class="annot"
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-type"
+ >norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-13"
- ></a
- ><a name="norf"
- ><a href="Identifiers.html#norf"
- ><span class="hs-identifier"
- >norf</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >z</span
- ></a
- ></a
+ ><span id="line-13"
+ ></span
+ ><span id="norf"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf :: Int -&gt; Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043581"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043580"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043579"
+ ><span class="annot"
+ ><span class="annottext"
+ >z :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
+ ><span id="line-14"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >&lt;</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Bool
+forall a. Ord a =&gt; a -&gt; a -&gt; Bool
+</span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Identifiers.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int
+</span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
+ ><span id="line-15"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >&lt;</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Bool
+forall a. Ord a =&gt; a -&gt; a -&gt; Bool
+</span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Identifiers.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int
+</span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >z</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >&lt;</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Bool
+forall a. Ord a =&gt; a -&gt; a -&gt; Bool
+</span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Identifiers.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int
+</span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >z</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
+ ><span id="line-17"
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >otherwise</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Bool
+</span
+ ><span class="hs-identifier hs-var"
+ >otherwise</span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Identifiers.html#norf"
- ><span class="hs-identifier hs-var"
- >norf</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-var"
+ >norf</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
><span class="hs-glyph"
>-</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -662,10 +1061,15 @@
>(</span
><span class="hs-glyph"
>-</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -674,37 +1078,48 @@
>(</span
><span class="hs-glyph"
>-</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >z</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-18"
- ></a
+ ><span id="line-18"
+ ></span
><span
>
</span
- ><a name="line-19"
- ></a
+ ><span id="line-19"
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
- ><span class="hs-identifier"
- >main</span
+ ><span id="line-20"
+ ></span
+ ><span class="annot"
+ ><a href="Identifiers.html#main"
+ ><span class="hs-identifier hs-type"
+ >main</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >IO</span
+ >IO</span
+ ></span
><span
> </span
><span class="hs-special"
@@ -714,14 +1129,19 @@
><span
>
</span
- ><a name="line-21"
- ></a
- ><a name="main"
- ><a href="Identifiers.html#main"
- ><span class="hs-identifier"
- >main</span
- ></a
- ></a
+ ><span id="line-21"
+ ></span
+ ><span id="main"
+ ><span class="annot"
+ ><span class="annottext"
+ >main :: IO ()
+</span
+ ><a href="Identifiers.html#main"
+ ><span class="hs-identifier hs-var hs-var"
+ >main</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -733,125 +1153,239 @@
><span
>
</span
- ><a name="line-22"
- ></a
+ ><span id="line-22"
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >putStrLn</span
+ ><span class="annot"
+ ><span class="annottext"
+ >String -&gt; IO ()
+</span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >.</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(String -&gt; IO ()) -&gt; (Int -&gt; String) -&gt; Int -&gt; IO ()
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >show</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; String
+forall a. Show a =&gt; a -&gt; String
+</span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Int -&gt; IO ()) -&gt; Int -&gt; IO ()
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><a href="Identifiers.html#foo"
- ><span class="hs-identifier hs-var"
- >foo</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >putStrLn</span
+ ><span class="annot"
+ ><span class="annottext"
+ >String -&gt; IO ()
+</span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >.</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(String -&gt; IO ()) -&gt; (Int -&gt; String) -&gt; Int -&gt; IO ()
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >show</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; String
+forall a. Show a =&gt; a -&gt; String
+</span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Int -&gt; IO ()) -&gt; Int -&gt; IO ()
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><a href="Identifiers.html#quux"
- ><span class="hs-identifier hs-var"
- >quux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int
+</span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >z</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-24"
- ></a
+ ><span id="line-24"
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >putStrLn</span
+ ><span class="annot"
+ ><span class="annottext"
+ >String -&gt; IO ()
+</span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >.</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(String -&gt; IO ()) -&gt; (Int -&gt; String) -&gt; Int -&gt; IO ()
+forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
+</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ></span
><span
> </span
- ><span class="hs-identifier hs-var"
- >show</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; String
+forall a. Show a =&gt; a -&gt; String
+</span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(Int -&gt; IO ()) -&gt; Int -&gt; IO ()
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
- ><a href="Identifiers.html#norf"
- ><span class="hs-identifier hs-var"
- >Identifiers.norf</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int -&gt; Int
+</span
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-var"
+ >Identifiers.norf</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >z</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-25"
- ></a
+ ><span id="line-25"
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -859,72 +1393,93 @@
><span
>
</span
- ><a name="line-26"
- ></a
+ ><span id="line-26"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043573"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >10</span
+ >10</span
+ ></span
><span
>
</span
- ><a name="line-27"
- ></a
+ ><span id="line-27"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="local-6989586621679043572"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >20</span
+ >20</span
+ ></span
><span
>
</span
- ><a name="line-28"
- ></a
+ ><span id="line-28"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >z</span
- ></a
- ></a
+ ><span id="local-6989586621679043571"
+ ><span class="annot"
+ ><span class="annottext"
+ >z :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >z</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >30</span
+ >30</span
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
+ ><span id="line-29"
+ ></span
></pre
></body
></html
->
+> \ No newline at end of file
diff --git a/hypsrc-test/ref/src/LinkingIdentifiers.html b/hypsrc-test/ref/src/LinkingIdentifiers.html
new file mode 100644
index 00000000..2ef590bd
--- /dev/null
+++ b/hypsrc-test/ref/src/LinkingIdentifiers.html
@@ -0,0 +1,572 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-comment"
+ >-- Tests that the identifers/operators are properly linked even when:</span
+ ><span
+ >
+</span
+ ><span id="line-2"
+ ></span
+ ><span class="hs-comment"
+ >--</span
+ ><span
+ >
+</span
+ ><span id="line-3"
+ ></span
+ ><span class="hs-comment"
+ >-- * backquoted, parenthesized, vanilla</span
+ ><span
+ >
+</span
+ ><span id="line-4"
+ ></span
+ ><span class="hs-comment"
+ >-- * qualified, not-qualified</span
+ ><span
+ >
+</span
+ ><span id="line-5"
+ ></span
+ ><span class="hs-comment"
+ >--</span
+ ><span
+ >
+</span
+ ><span id="line-6"
+ ></span
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >LinkingIdentifiers</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><span id="line-7"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-8"
+ ></span
+ ><span class="annot"
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-identifier hs-type"
+ >ident</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-9"
+ ></span
+ ><span id="local-6989586621679043611"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="ident"
+ ><span class="annot"
+ ><span class="annottext"
+ >ident :: Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-operator hs-var hs-var"
+ >`ident`</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >2</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-operator hs-var"
+ >`ident`</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-operator hs-var"
+ >`LinkingIdentifiers.ident`</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><span id="line-10"
+ ></span
+ ><span class="annot"
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-identifier hs-var"
+ >ident</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043609"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >2</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-identifier hs-var"
+ >ident</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#ident"
+ ><span class="hs-identifier hs-var"
+ >LinkingIdentifiers.ident</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-11"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-12"
+ ></span
+ ><span class="annot"
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-type"
+ >(++:++)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-13"
+ ></span
+ ><span id="local-6989586621679043607"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%2B%2B%3A%2B%2B"
+ ><span class="annot"
+ ><span class="annottext"
+ >++:++ :: Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var hs-var"
+ >++:++</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >2</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var"
+ >++:++</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var"
+ >LinkingIdentifiers.++:++</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><span id="line-14"
+ ></span
+ ><span class="annot"
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var"
+ >(++:++)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043606"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >2</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var"
+ >(++:++)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+</span
+ ><a href="LinkingIdentifiers.html#%2B%2B%3A%2B%2B"
+ ><span class="hs-operator hs-var"
+ >(LinkingIdentifiers.++:++)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-number"
+ >2</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-15"
+ ></span
+ ></pre
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/hypsrc-test/ref/src/Literals.html b/hypsrc-test/ref/src/Literals.html
index dfcefc97..62ea32dd 100644
--- a/hypsrc-test/ref/src/Literals.html
+++ b/hypsrc-test/ref/src/Literals.html
@@ -19,238 +19,334 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
- ><span class="hs-identifier"
- >str</span
+ ><span id="line-4"
+ ></span
+ ><span class="annot"
+ ><a href="Literals.html#str"
+ ><span class="hs-identifier hs-type"
+ >str</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >String</span
+ >String</span
+ ></span
><span
>
</span
- ><a name="line-5"
- ></a
- ><a name="str"
- ><a href="Literals.html#str"
- ><span class="hs-identifier"
- >str</span
- ></a
- ></a
+ ><span id="line-5"
+ ></span
+ ><span id="str"
+ ><span class="annot"
+ ><span class="annottext"
+ >str :: String
+</span
+ ><a href="Literals.html#str"
+ ><span class="hs-identifier hs-var hs-var"
+ >str</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-string"
- >&quot;str literal&quot;</span
+ >&quot;str literal&quot;</span
+ ></span
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
- ><span class="hs-identifier"
- >num</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Num</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span id="line-7"
+ ></span
+ ><span id="local-6989586621679043622"
+ ><span class="annot"
+ ><a href="Literals.html#num"
+ ><span class="hs-identifier hs-type"
+ >num</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Num</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
- ><a name="num"
- ><a href="Literals.html#num"
- ><span class="hs-identifier"
- >num</span
- ></a
- ></a
+ ><span id="line-8"
+ ></span
+ ><span id="num"
+ ><span class="annot"
+ ><span class="annottext"
+ >num :: a
+</span
+ ><a href="Literals.html#num"
+ ><span class="hs-identifier hs-var hs-var"
+ >num</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1</span
+ >1</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1010011</span
+ >1010011</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >41231</span
+ >41231</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >12131</span
+ >12131</span
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
- ><span class="hs-identifier"
- >frac</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Fractional</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span id="line-10"
+ ></span
+ ><span id="local-6989586621679043618"
+ ><span class="annot"
+ ><a href="Literals.html#frac"
+ ><span class="hs-identifier hs-type"
+ >frac</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Fractional</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
- ><a name="frac"
- ><a href="Literals.html#frac"
- ><span class="hs-identifier"
- >frac</span
- ></a
- ></a
+ ><span id="line-11"
+ ></span
+ ><span id="frac"
+ ><span class="annot"
+ ><span class="annottext"
+ >frac :: a
+</span
+ ><a href="Literals.html#frac"
+ ><span class="hs-identifier hs-var hs-var"
+ >frac</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >42.0000001</span
+ >42.0000001</span
+ ></span
><span
>
</span
- ><a name="line-12"
- ></a
+ ><span id="line-12"
+ ></span
><span
>
</span
- ><a name="line-13"
- ></a
- ><span class="hs-identifier"
- >list</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
+ ><span id="line-13"
+ ></span
+ ><span id="local-6989586621679043616"
+ ><span class="annot"
+ ><a href="Literals.html#list"
+ ><span class="hs-identifier hs-type"
+ >list</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
- ><a name="list"
- ><a href="Literals.html#list"
- ><span class="hs-identifier"
- >list</span
- ></a
- ></a
+ ><span id="line-14"
+ ></span
+ ><span id="list"
+ ><span class="annot"
+ ><span class="annottext"
+ >list :: [[[[a]]]]
+</span
+ ><a href="Literals.html#list"
+ ><span class="hs-identifier hs-var hs-var"
+ >list</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -296,15 +392,19 @@
><span
>
</span
- ><a name="line-15"
- ></a
+ ><span id="line-15"
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
- ><span class="hs-identifier"
- >pair</span
+ ><span id="line-16"
+ ></span
+ ><span class="annot"
+ ><a href="Literals.html#pair"
+ ><span class="hs-identifier hs-type"
+ >pair</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -358,14 +458,19 @@
><span
>
</span
- ><a name="line-17"
- ></a
- ><a name="pair"
- ><a href="Literals.html#pair"
- ><span class="hs-identifier"
- >pair</span
- ></a
- ></a
+ ><span id="line-17"
+ ></span
+ ><span id="pair"
+ ><span class="annot"
+ ><span class="annottext"
+ >pair :: ((), ((), (), ()), ())
+</span
+ ><a href="Literals.html#pair"
+ ><span class="hs-identifier hs-var hs-var"
+ >pair</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -419,8 +524,8 @@
><span
>
</span
- ><a name="line-18"
- ></a
+ ><span id="line-18"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/Operators.html b/hypsrc-test/ref/src/Operators.html
index 8ce0b9ce..403954cf 100644
--- a/hypsrc-test/ref/src/Operators.html
+++ b/hypsrc-test/ref/src/Operators.html
@@ -19,311 +19,414 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >+++</span
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
+ ><span id="line-4"
+ ></span
+ ><span id="local-6989586621679043657"
+ ><span class="annot"
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-type"
+ >(+++)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
+ >
+</span
+ ><span id="line-5"
+ ></span
+ ><span id="local-6989586621679043655"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%2B%2B%2B"
+ ><span class="annot"
+ ><span class="annottext"
+ >+++ :: [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var hs-var"
+ >+++</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043654"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
</span
- ><a name="line-5"
- ></a
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>a</span
></a
- ></a
+ ></span
><span
> </span
- ><a name="%2B%2B%2B"
- ><a href="Operators.html#%2B%2B%2B"
- ><span class="hs-operator"
- >+++</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><span class="hs-operator hs-var"
+ >++</span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>b</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-operator hs-var"
- >++</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >++</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><span class="hs-operator hs-var"
+ >++</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >$$$</span
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
+ ><span id="line-7"
+ ></span
+ ><span id="local-6989586621679043653"
+ ><span class="annot"
+ ><a href="Operators.html#%24%24%24"
+ ><span class="hs-operator hs-type"
+ >($$$)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
+ >
+</span
+ ><span id="line-8"
+ ></span
+ ><span id="local-6989586621679043651"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%24%24%24"
+ ><span class="annot"
+ ><span class="annottext"
+ >$$$ :: [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%24%24%24"
+ ><span class="hs-operator hs-var hs-var"
+ >$$$</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043650"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
</span
- ><a name="line-8"
- ></a
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
></a
- ></a
+ ></span
><span
> </span
- ><a name="%24%24%24"
- ><a href="Operators.html#%24%24%24"
- ><span class="hs-operator"
- >$$$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
- ><span
- > </span
- ><a href="Operators.html#%2B%2B%2B"
- ><span class="hs-operator hs-var"
- >+++</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >***</span
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
+ ><span id="line-10"
+ ></span
+ ><span id="local-6989586621679043649"
+ ><span class="annot"
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-type"
+ >(***)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
- ><span class="hs-special"
- >(</span
- ><a name="%2A%2A%2A"
- ><a href="Operators.html#%2A%2A%2A"
- ><span class="hs-operator"
- >***</span
- ></a
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="line-11"
+ ></span
+ ><span id="%2A%2A%2A"
+ ><span class="annot"
+ ><span class="annottext"
+ >*** :: [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var hs-var"
+ >(***)</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043647"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
@@ -336,43 +439,60 @@
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-12"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >***</span
- ><span class="hs-special"
- >)</span
+ ><span id="line-12"
+ ></span
+ ><span class="annot"
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var"
+ >(***)</span
+ ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043646"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
><span class="hs-identifier"
>_</span
- ><span class="hs-glyph"
- >:</span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="hs-glyph hs-type"
+ >:</span
+ ></span
+ ><span id="local-6989586621679043645"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -381,455 +501,643 @@
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
> </span
- ><a href="Operators.html#%2B%2B%2B"
- ><span class="hs-operator hs-var"
- >+++</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
> </span
- ><a href="Operators.html#%2A%2A%2A"
- ><span class="hs-operator hs-var"
- >***</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var"
+ >***</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-13"
- ></a
+ ><span id="line-13"
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >*/\*</span
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
+ ><span id="line-14"
+ ></span
+ ><span id="local-6989586621679043666"
+ ><span class="annot"
+ ><a href="Operators.html#%2A%2F%5C%2A"
+ ><span class="hs-operator hs-type"
+ >(*/\*)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name="%2A%2F%5C%2A"
- ><a href="Operators.html#%2A%2F%5C%2A"
- ><span class="hs-operator"
- >*/\*</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="line-15"
+ ></span
+ ><span id="local-6989586621679043643"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%2A%2F%5C%2A"
+ ><span class="annot"
+ ><span class="annottext"
+ >*/\* :: [[a]] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2A%2F%5C%2A"
+ ><span class="hs-operator hs-var hs-var"
+ >*/\*</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043642"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: [a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >concatMap</span
+ ><span class="annot"
+ ><span class="annottext"
+ >([a] -&gt; [a]) -&gt; [[a]] -&gt; [a]
+forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
+</span
+ ><span class="hs-identifier hs-var"
+ >concatMap</span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="Operators.html#%2A%2A%2A"
- ><span class="hs-operator hs-var"
- >***</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [a] -&gt; [a]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var"
+ >***</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >**/\**</span
- ><span class="hs-special"
- >)</span
+ ><span id="line-17"
+ ></span
+ ><span id="local-6989586621679043640"
+ ><span class="annot"
+ ><a href="Operators.html#%2A%2A%2F%5C%2A%2A"
+ ><span class="hs-operator hs-type"
+ >(**/\**)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ></span
><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
+ >
+</span
+ ><span id="line-18"
+ ></span
+ ><span id="local-6989586621679043638"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: [[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%2A%2A%2F%5C%2A%2A"
+ ><span class="annot"
+ ><span class="annottext"
+ >**/\** :: [[a]] -&gt; [[a]] -&gt; [[a]]
+</span
+ ><a href="Operators.html#%2A%2A%2F%5C%2A%2A"
+ ><span class="hs-operator hs-var hs-var"
+ >**/\**</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043637"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: [[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><span class="hs-special"
- >[</span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
+ ><span class="annot"
+ ><span class="annottext"
+ >([[a]] -&gt; [a] -&gt; [a]) -&gt; [[[a]]] -&gt; [[a]] -&gt; [[a]]
+forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
+</span
+ ><span class="hs-identifier hs-var"
+ >zipWith</span
+ ></span
><span
> </span
- ><span class="hs-glyph"
- >-&gt;</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]] -&gt; [a] -&gt; [a]
+forall a. [[a]] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2A%2F%5C%2A"
+ ><span class="hs-operator hs-var"
+ >(*/\*)</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>[</span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span class="hs-special"
- >]</span
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]]
</span
- ><a name="line-18"
- ></a
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>a</span
></a
- ></a
+ ></span
><span
> </span
- ><a name="%2A%2A%2F%5C%2A%2A"
- ><a href="Operators.html#%2A%2A%2F%5C%2A%2A"
- ><span class="hs-operator"
- >**/\**</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]] -&gt; [[a]] -&gt; [[a]]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>b</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >zipWith</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="Operators.html#%2A%2F%5C%2A"
- ><span class="hs-operator hs-var"
- >*/\*</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
- ><span
- > </span
- ><a href="Operators.html#%2B%2B%2B"
- ><span class="hs-operator hs-var"
- >+++</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ></span
><span class="hs-special"
>]</span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span
> </span
- ><a href="Operators.html#%24%24%24"
- ><span class="hs-operator hs-var"
- >$$$</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]] -&gt; [[a]] -&gt; [[a]]
+forall a. [a] -&gt; [a] -&gt; [a]
+</span
+ ><a href="Operators.html#%24%24%24"
+ ><span class="hs-operator hs-var"
+ >$$$</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[[a]]
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-19"
- ></a
+ ><span id="line-19"
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
+ ><span id="line-20"
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
- ><span class="hs-special"
- >(</span
- ><span class="hs-operator"
- >#.#</span
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >c</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >,</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span class="hs-special"
- >)</span
+ ><span id="line-21"
+ ></span
+ ><span id="local-6989586621679043633"
+ ><span id="local-6989586621679043634"
+ ><span id="local-6989586621679043635"
+ ><span class="annot"
+ ><a href="Operators.html#%23.%23"
+ ><span class="hs-operator hs-type"
+ >(#.#)</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >c</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ></span
+ ></span
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name="%23.%23"
- ><a href="Operators.html#%23.%23"
- ><span class="hs-operator"
- >#.#</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="line-22"
+ ></span
+ ><span id="local-6989586621679043631"
+ ><span class="annot"
+ ><span class="annottext"
+ >a :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="%23.%23"
+ ><span class="annot"
+ ><span class="annottext"
+ >#.# :: a -&gt; b -&gt; c -&gt; (a, b)
+</span
+ ><a href="Operators.html#%23.%23"
+ ><span class="hs-operator hs-var hs-var"
+ >#.#</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043630"
+ ><span class="annot"
+ ><span class="annottext"
+ >b :: b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >const</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a, b) -&gt; c -&gt; (a, b)
+forall a b. a -&gt; b -&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >$</span
+ ><span class="annot"
+ ><span class="annottext"
+ >((a, b) -&gt; c -&gt; (a, b)) -&gt; (a, b) -&gt; c -&gt; (a, b)
+forall a b. (a -&gt; b) -&gt; a -&gt; b
+</span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >a</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >b</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/Polymorphism.html b/hypsrc-test/ref/src/Polymorphism.html
index 602246e0..91f8bd33 100644
--- a/hypsrc-test/ref/src/Polymorphism.html
+++ b/hypsrc-test/ref/src/Polymorphism.html
@@ -11,25 +11,25 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span class="hs-pragma"
>{-# LANGUAGE ScopedTypeVariables #-}</span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
+ ><span id="line-4"
+ ></span
><span
>
</span
- ><a name="line-5"
- ></a
+ ><span id="line-5"
+ ></span
><span class="hs-keyword"
>module</span
><span
@@ -43,81 +43,108 @@
><span
>
</span
- ><a name="line-6"
- ></a
- ><span
- >
-</span
- ><a name="line-7"
- ></a
- ><span
- >
-</span
- ><a name="line-8"
- ></a
- ><span class="hs-identifier"
- >foo</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-9"
- ></a
- ><a name="foo"
- ><a href="Polymorphism.html#foo"
- ><span class="hs-identifier"
- >foo</span
- ></a
- ></a
+ ><span id="line-6"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-7"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-8"
+ ></span
+ ><span id="local-6989586621679043738"
+ ><span class="annot"
+ ><a href="Polymorphism.html#foo"
+ ><span class="hs-identifier hs-type"
+ >foo</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-9"
+ ></span
+ ><span id="foo"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: a -&gt; a -&gt; a
+</span
+ ><a href="Polymorphism.html#foo"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
+ ><span id="line-10"
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
- ><span class="hs-identifier"
- >foo'</span
+ ><span id="line-11"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#foo%27"
+ ><span class="hs-identifier hs-type"
+ >foo'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -128,144 +155,194 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043734"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-12"
- ></a
- ><a name="foo%27"
- ><a href="Polymorphism.html#foo%27"
- ><span class="hs-identifier"
- >foo'</span
+ ><span class="hs-identifier hs-type"
+ >a</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ></span
><span
>
</span
- ><a name="line-13"
- ></a
- ><span
- >
+ ><span id="line-12"
+ ></span
+ ><span id="foo%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo' :: a -&gt; a -&gt; a
</span
- ><a name="line-14"
- ></a
- ><span class="hs-identifier"
- >bar</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><a href="Polymorphism.html#foo%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >,</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- >
-</span
- ><a name="line-15"
- ></a
- ><a name="bar"
- ><a href="Polymorphism.html#bar"
- ><span class="hs-identifier"
- >bar</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-13"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-14"
+ ></span
+ ><span id="local-6989586621679043732"
+ ><span id="local-6989586621679043733"
+ ><span class="annot"
+ ><a href="Polymorphism.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-15"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: a -&gt; b -&gt; (a, b)
+</span
+ ><a href="Polymorphism.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; b -&gt; (a, b)
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
- ><span class="hs-identifier"
- >bar'</span
+ ><span id="line-17"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#bar%27"
+ ><span class="hs-identifier hs-type"
+ >bar'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -276,38 +353,46 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043729"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043728"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -316,150 +401,200 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-18"
- ></a
- ><a name="bar%27"
- ><a href="Polymorphism.html#bar%27"
- ><span class="hs-identifier"
- >bar'</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
- ><span
- >
-</span
- ><a name="line-19"
- ></a
- ><span
- >
+ ><span id="line-18"
+ ></span
+ ><span id="bar%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar' :: a -&gt; b -&gt; (a, b)
</span
- ><a name="line-20"
- ></a
- ><span class="hs-identifier"
- >baz</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><a href="Polymorphism.html#bar%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
+ >=</span
><span
> </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- >
-</span
- ><a name="line-21"
- ></a
- ><a name="baz"
- ><a href="Polymorphism.html#baz"
- ><span class="hs-identifier"
- >baz</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; b -&gt; (a, b)
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-19"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-20"
+ ></span
+ ><span id="local-6989586621679043726"
+ ><span id="local-6989586621679043727"
+ ><span class="annot"
+ ><a href="Polymorphism.html#baz"
+ ><span class="hs-identifier hs-type"
+ >baz</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-21"
+ ></span
+ ><span id="baz"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz :: a -&gt; (a -&gt; [a -&gt; a] -&gt; b) -&gt; b
+</span
+ ><a href="Polymorphism.html#baz"
+ ><span class="hs-identifier hs-var hs-var"
+ >baz</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; (a -&gt; [a -&gt; a] -&gt; b) -&gt; b
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
+ ><span id="line-22"
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
- ><span class="hs-identifier"
- >baz'</span
+ ><span id="line-23"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#baz%27"
+ ><span class="hs-identifier hs-type"
+ >baz'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -470,28 +605,34 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043723"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043722"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -500,10 +641,12 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -512,20 +655,24 @@
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span
@@ -534,10 +681,12 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -546,154 +695,213 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span
- >
-</span
- ><a name="line-24"
- ></a
- ><a name="baz%27"
- ><a href="Polymorphism.html#baz%27"
- ><span class="hs-identifier"
- >baz'</span
+ ><span class="hs-identifier hs-type"
+ >b</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ></span
><span
>
</span
- ><a name="line-25"
- ></a
- ><span
- >
+ ><span id="line-24"
+ ></span
+ ><span id="baz%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >baz' :: a -&gt; (a -&gt; [a -&gt; a] -&gt; b) -&gt; b
</span
- ><a name="line-26"
- ></a
- ><span class="hs-identifier"
- >quux</span
+ ><a href="Polymorphism.html#baz%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >baz'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><span class="hs-keyword"
- >forall</span
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span class="hs-operator"
- >.</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >)</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; (a -&gt; [a -&gt; a] -&gt; b) -&gt; b
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-25"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-26"
+ ></span
+ ><span id="local-6989586621679043721"
+ ><span class="annot"
+ ><a href="Polymorphism.html#quux"
+ ><span class="hs-identifier hs-type"
+ >quux</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-keyword"
+ >forall</span
+ ><span
+ > </span
+ ><span id="local-6989586621679043756"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span class="hs-operator"
+ >.</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-27"
+ ></span
+ ><span id="quux"
+ ><span class="annot"
+ ><span class="annottext"
+ >quux :: a -&gt; (forall a. a -&gt; a) -&gt; a
+</span
+ ><a href="Polymorphism.html#quux"
+ ><span class="hs-identifier hs-var hs-var"
+ >quux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043719"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043718"
+ ><span class="annot"
+ ><span class="annottext"
+ >f :: forall a. a -&gt; a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a
+forall a. a -&gt; a
</span
- ><a name="line-27"
- ></a
- ><a name="quux"
- ><a href="Polymorphism.html#quux"
- ><span class="hs-identifier"
- >quux</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
></a
- ></a
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>x</span
></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ></span
><span
>
</span
- ><a name="line-28"
- ></a
+ ><span id="line-28"
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
- ><span class="hs-identifier"
- >quux'</span
+ ><span id="line-29"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#quux%27"
+ ><span class="hs-identifier hs-type"
+ >quux'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -704,20 +912,24 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043716"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -730,30 +942,36 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043715"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -762,145 +980,204 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-30"
- ></a
- ><a name="quux%27"
- ><a href="Polymorphism.html#quux%27"
- ><span class="hs-identifier"
- >quux'</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f</span
+ ><span class="hs-identifier hs-type"
+ >a</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ></span
><span
>
</span
- ><a name="line-31"
- ></a
- ><span
- >
+ ><span id="line-30"
+ ></span
+ ><span id="quux%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >quux' :: a -&gt; (forall a. a -&gt; a) -&gt; a
</span
- ><a name="line-32"
- ></a
- ><span
- >
-</span
- ><a name="line-33"
- ></a
- ><span class="hs-identifier"
- >num</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Num</span
+ ><a href="Polymorphism.html#quux%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >quux'</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=&gt;</span
+ ><span id="local-6989586621679043714"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span id="local-6989586621679043713"
+ ><span class="annot"
+ ><span class="annottext"
+ >f :: forall a. a -&gt; a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ >=</span
><span
> </span
- ><span class="hs-glyph"
- >-&gt;</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a
+forall a. a -&gt; a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >a
</span
- ><a name="line-34"
- ></a
- ><a name="num"
- ><a href="Polymorphism.html#num"
- ><span class="hs-identifier"
- >num</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
></a
- ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-31"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-32"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-33"
+ ></span
+ ><span id="local-6989586621679043712"
+ ><span class="annot"
+ ><a href="Polymorphism.html#num"
+ ><span class="hs-identifier hs-type"
+ >num</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Num</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-34"
+ ></span
+ ><span id="num"
+ ><span class="annot"
+ ><span class="annottext"
+ >num :: a -&gt; a -&gt; a
+</span
+ ><a href="Polymorphism.html#num"
+ ><span class="hs-identifier hs-var hs-var"
+ >num</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-35"
- ></a
+ ><span id="line-35"
+ ></span
><span
>
</span
- ><a name="line-36"
- ></a
- ><span class="hs-identifier"
- >num'</span
+ ><span id="line-36"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#num%27"
+ ><span class="hs-identifier hs-type"
+ >num'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -911,196 +1188,258 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043709"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Num</span
+ >Num</span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-37"
- ></a
- ><a name="num%27"
- ><a href="Polymorphism.html#num%27"
- ><span class="hs-identifier"
- >num'</span
+ ><span class="hs-identifier hs-type"
+ >a</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ></span
><span
>
</span
- ><a name="line-38"
- ></a
- ><span
- >
+ ><span id="line-37"
+ ></span
+ ><span id="num%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >num' :: a -&gt; a -&gt; a
</span
- ><a name="line-39"
- ></a
- ><span class="hs-identifier"
- >eq</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><span class="hs-identifier hs-type"
- >Eq</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >,</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Eq</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
+ ><a href="Polymorphism.html#num%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >num'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >=&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >[</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >]</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >,</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- >
-</span
- ><a name="line-40"
- ></a
- ><a name="eq"
- ><a href="Polymorphism.html#eq"
- ><span class="hs-identifier"
- >eq</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; a -&gt; a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-38"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-39"
+ ></span
+ ><span id="local-6989586621679043707"
+ ><span id="local-6989586621679043708"
+ ><span class="annot"
+ ><a href="Polymorphism.html#eq"
+ ><span class="hs-identifier hs-type"
+ >eq</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Eq</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Eq</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-40"
+ ></span
+ ><span id="eq"
+ ><span class="annot"
+ ><span class="annottext"
+ >eq :: [a] -&gt; [b] -&gt; (a, b)
+</span
+ ><a href="Polymorphism.html#eq"
+ ><span class="hs-identifier hs-var hs-var"
+ >eq</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [b] -&gt; (a, b)
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-41"
- ></a
+ ><span id="line-41"
+ ></span
><span
>
</span
- ><a name="line-42"
- ></a
- ><span class="hs-identifier"
- >eq'</span
+ ><span id="line-42"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#eq%27"
+ ><span class="hs-identifier hs-type"
+ >eq'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1111,46 +1450,58 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043704"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043703"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Eq</span
+ >Eq</span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Eq</span
+ >Eq</span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1161,10 +1512,12 @@
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span
@@ -1175,10 +1528,12 @@
> </span
><span class="hs-special"
>[</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>]</span
><span
@@ -1189,142 +1544,194 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-43"
- ></a
- ><a name="eq%27"
- ><a href="Polymorphism.html#eq%27"
- ><span class="hs-identifier"
- >eq'</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
- ><span
- >
-</span
- ><a name="line-44"
- ></a
- ><span
- >
+ ><span id="line-43"
+ ></span
+ ><span id="eq%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >eq' :: [a] -&gt; [b] -&gt; (a, b)
</span
- ><a name="line-45"
- ></a
- ><span class="hs-identifier"
- >mon</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Monad</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><a href="Polymorphism.html#eq%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >eq'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >)</span
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-46"
- ></a
- ><a name="mon"
- ><a href="Polymorphism.html#mon"
- ><span class="hs-identifier"
- >mon</span
- ></a
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >[a] -&gt; [b] -&gt; (a, b)
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-44"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-45"
+ ></span
+ ><span id="local-6989586621679043701"
+ ><span id="local-6989586621679043702"
+ ><span class="annot"
+ ><a href="Polymorphism.html#mon"
+ ><span class="hs-identifier hs-type"
+ >mon</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Monad</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-46"
+ ></span
+ ><span id="mon"
+ ><span class="annot"
+ ><span class="annottext"
+ >mon :: (a -&gt; m a) -&gt; m a
+</span
+ ><a href="Polymorphism.html#mon"
+ ><span class="hs-identifier hs-var hs-var"
+ >mon</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a -&gt; m a) -&gt; m a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
><span
>
</span
- ><a name="line-47"
- ></a
+ ><span id="line-47"
+ ></span
><span
>
</span
- ><a name="line-48"
- ></a
- ><span class="hs-identifier"
- >mon'</span
+ ><span id="line-48"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#mon%27"
+ ><span class="hs-identifier hs-type"
+ >mon'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1335,32 +1742,40 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >m</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043698"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043697"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Monad</span
+ >Monad</span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1369,26 +1784,32 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1397,173 +1818,232 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >m</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >m</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
-</span
- ><a name="line-49"
- ></a
- ><a name="mon%27"
- ><a href="Polymorphism.html#mon%27"
- ><span class="hs-identifier"
- >mon'</span
+ ><span class="hs-identifier hs-type"
+ >a</span
></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><span class="hs-identifier hs-var"
- >undefined</span
+ ></span
><span
>
</span
- ><a name="line-50"
- ></a
- ><span
- >
-</span
- ><a name="line-51"
- ></a
- ><span
- >
+ ><span id="line-49"
+ ></span
+ ><span id="mon%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >mon' :: (a -&gt; m a) -&gt; m a
</span
- ><a name="line-52"
- ></a
- ><span class="hs-identifier"
- >norf</span
- ><span
- > </span
- ><span class="hs-glyph"
- >::</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
- ><span
- > </span
- ><span class="hs-special"
- >(</span
- ><span class="hs-keyword"
- >forall</span
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span class="hs-operator"
- >.</span
- ><span
- > </span
- ><span class="hs-identifier hs-type"
- >Ord</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><a href="Polymorphism.html#mon%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >mon'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >=&gt;</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span class="hs-special"
- >)</span
+ ><span class="annot"
+ ><span class="annottext"
+ >(a -&gt; m a) -&gt; m a
+forall a. HasCallStack =&gt; a
+</span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-50"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-51"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-52"
+ ></span
+ ><span id="local-6989586621679043696"
+ ><span class="annot"
+ ><a href="Polymorphism.html#norf"
+ ><span class="hs-identifier hs-type"
+ >norf</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-keyword"
+ >forall</span
+ ><span
+ > </span
+ ><span id="local-6989586621679043743"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span class="hs-operator"
+ >.</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >Ord</span
+ ></span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-53"
+ ></span
+ ><span id="norf"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf :: a -&gt; (forall a. Ord a =&gt; a -&gt; a) -&gt; a
+</span
+ ><a href="Polymorphism.html#norf"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043694"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043693"
+ ><span class="annot"
+ ><span class="annottext"
+ >f :: forall a. Ord a =&gt; a -&gt; a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
- >-&gt;</span
+ >=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
- ><span
- >
+ ><span class="annot"
+ ><span class="annottext"
+ >a
</span
- ><a name="line-53"
- ></a
- ><a name="norf"
- ><a href="Polymorphism.html#norf"
- ><span class="hs-identifier"
- >norf</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
>x</span
></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f</span
- ></a
- ></a
- ><span
- > </span
- ><span class="hs-glyph"
- >=</span
- ><span
- > </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ></span
><span
>
</span
- ><a name="line-54"
- ></a
+ ><span id="line-54"
+ ></span
><span
>
</span
- ><a name="line-55"
- ></a
- ><span class="hs-identifier"
- >norf'</span
+ ><span id="line-55"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#norf%27"
+ ><span class="hs-identifier hs-type"
+ >norf'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1574,20 +2054,24 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043691"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1600,44 +2084,54 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043690"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Ord</span
+ >Ord</span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1646,64 +2140,90 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-56"
- ></a
- ><a name="norf%27"
- ><a href="Polymorphism.html#norf%27"
- ><span class="hs-identifier"
- >norf'</span
- ></a
- ></a
+ ><span id="line-56"
+ ></span
+ ><span id="norf%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf' :: a -&gt; (forall a. Ord a =&gt; a -&gt; a) -&gt; a
+</span
+ ><a href="Polymorphism.html#norf%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf'</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043689"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f</span
- ></a
- ></a
+ ><span id="local-6989586621679043688"
+ ><span class="annot"
+ ><span class="annottext"
+ >f :: forall a. Ord a =&gt; a -&gt; a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-57"
- ></a
+ ><span id="line-57"
+ ></span
><span
>
</span
- ><a name="line-58"
- ></a
+ ><span id="line-58"
+ ></span
><span
>
</span
- ><a name="line-59"
- ></a
- ><span class="hs-identifier"
- >plugh</span
+ ><span id="line-59"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#plugh"
+ ><span class="hs-identifier hs-type"
+ >plugh</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1714,81 +2234,108 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043686"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-60"
- ></a
- ><a name="plugh"
- ><a href="Polymorphism.html#plugh"
- ><span class="hs-identifier"
- >plugh</span
- ></a
- ></a
+ ><span id="line-60"
+ ></span
+ ><span id="plugh"
+ ><span class="annot"
+ ><span class="annottext"
+ >plugh :: a -&gt; a
+</span
+ ><a href="Polymorphism.html#plugh"
+ ><span class="hs-identifier hs-var hs-var"
+ >plugh</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043685"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-61"
- ></a
+ ><span id="line-61"
+ ></span
><span
>
</span
- ><a name="line-62"
- ></a
- ><span class="hs-identifier"
- >thud</span
+ ><span id="line-62"
+ ></span
+ ><span class="annot"
+ ><a href="Polymorphism.html#thud"
+ ><span class="hs-identifier hs-type"
+ >thud</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1799,40 +2346,48 @@
>forall</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043683"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043682"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span class="hs-operator"
>.</span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1841,10 +2396,12 @@
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1853,47 +2410,66 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-63"
- ></a
- ><a name="thud"
- ><a href="Polymorphism.html#thud"
- ><span class="hs-identifier"
- >thud</span
- ></a
- ></a
+ ><span id="line-63"
+ ></span
+ ><span id="thud"
+ ><span class="annot"
+ ><span class="annottext"
+ >thud :: (a -&gt; b) -&gt; a -&gt; (a, b)
+</span
+ ><a href="Polymorphism.html#thud"
+ ><span class="hs-identifier hs-var hs-var"
+ >thud</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >f</span
- ></a
- ></a
+ ><span id="local-6989586621679043681"
+ ><span class="annot"
+ ><span class="annottext"
+ >f :: a -&gt; b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043680"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1901,34 +2477,46 @@
><span
>
</span
- ><a name="line-64"
- ></a
+ ><span id="line-64"
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -1939,25 +2527,29 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-65"
- ></a
+ ><span id="line-65"
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -1965,16 +2557,21 @@
><span
>
</span
- ><a name="line-66"
- ></a
+ ><span id="line-66"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="local-6989586621679043679"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -1983,53 +2580,69 @@
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >f</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a -&gt; b
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >f</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >a</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >a
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="#"
- ><span class="hs-identifier hs-type"
- >b</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-67"
- ></a
+ ><span id="line-67"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/PositionPragmas.html b/hypsrc-test/ref/src/PositionPragmas.html
new file mode 100644
index 00000000..ddd73f31
--- /dev/null
+++ b/hypsrc-test/ref/src/PositionPragmas.html
@@ -0,0 +1,172 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >PositionPragmas</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><span id="line-2"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-3"
+ ></span
+ ><span class="hs-pragma"
+ >{-# LINE 8 &quot;hypsrc-test/src/PositionPragmas.hs&quot; #-}</span
+ ><span
+ >
+</span
+ ><span id="line-8"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-9"
+ ></span
+ ><span class="annot"
+ ><a href="PositionPragmas.html#foo"
+ ><span class="hs-identifier hs-type"
+ >foo</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >String</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-10"
+ ></span
+ ><span id="foo"
+ ><span class="annot"
+ ><span class="annottext"
+ >foo :: String
+</span
+ ><a href="PositionPragmas.html#foo"
+ ><span class="hs-identifier hs-var hs-var"
+ >foo</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >String
+</span
+ ><a href="PositionPragmas.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-11"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-12"
+ ></span
+ ><span class="hs-pragma"
+ >{-# LINE 23 &quot;hypsrc-test/src/PositionPragmas.hs&quot; #-}</span
+ ><span
+ >
+</span
+ ><span id="line-23"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-24"
+ ></span
+ ><span class="annot"
+ ><a href="PositionPragmas.html#bar"
+ ><span class="hs-identifier hs-type"
+ >bar</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="hs-identifier hs-type"
+ >String</span
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-25"
+ ></span
+ ><span id="bar"
+ ><span class="annot"
+ ><span class="annottext"
+ >bar :: String
+</span
+ ><a href="PositionPragmas.html#bar"
+ ><span class="hs-identifier hs-var hs-var"
+ >bar</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="annot"
+ ><span class="annottext"
+ >String
+</span
+ ><a href="PositionPragmas.html#foo"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ></span
+ ><span
+ > </span
+ ><span
+ >
+</span
+ ><span id="line-26"
+ ></span
+ ><span
+ >
+</span
+ ><span id="line-27"
+ ></span
+ ></pre
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/hypsrc-test/ref/src/Records.html b/hypsrc-test/ref/src/Records.html
index 7d23d114..bc99cc56 100644
--- a/hypsrc-test/ref/src/Records.html
+++ b/hypsrc-test/ref/src/Records.html
@@ -11,25 +11,25 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span class="hs-pragma"
>{-# LANGUAGE RecordWildCards #-}</span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
+ ><span id="line-4"
+ ></span
><span
>
</span
- ><a name="line-5"
- ></a
+ ><span id="line-5"
+ ></span
><span class="hs-keyword"
>module</span
><span
@@ -43,57 +43,66 @@
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
+ ><span id="line-7"
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
+ ><span id="line-8"
+ ></span
><span class="hs-keyword"
>data</span
><span
> </span
- ><a name="Point"
- ><a href="Records.html#Point"
- ><span class="hs-identifier"
- >Point</span
- ></a
- ></a
+ ><span id="Point"
+ ><span class="annot"
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="Point"
- ><a href="Records.html#Point"
- ><span class="hs-identifier"
- >Point</span
- ></a
- ></a
+ ><span id="Point"
+ ><span class="annot"
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><a name="x"
- ><a href="Records.html#x"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="x"
+ ><span class="annot"
+ ><span class="annottext"
+ >Point -&gt; Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -102,25 +111,32 @@
> </span
><span class="hs-glyph"
>!</span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-10"
- ></a
+ ><span id="line-10"
+ ></span
><span
> </span
><span class="hs-special"
>,</span
><span
> </span
- ><a name="y"
- ><a href="Records.html#y"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="y"
+ ><span class="annot"
+ ><span class="annottext"
+ >Point -&gt; Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -129,13 +145,15 @@
> </span
><span class="hs-glyph"
>!</span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
+ ><span id="line-11"
+ ></span
><span
> </span
><span class="hs-special"
@@ -143,117 +161,171 @@
><span
>
</span
- ><a name="line-12"
- ></a
+ ><span id="line-12"
+ ></span
><span
>
</span
- ><a name="line-13"
- ></a
+ ><span id="line-13"
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
- ><span class="hs-identifier"
- >point</span
+ ><span id="line-14"
+ ></span
+ ><span class="annot"
+ ><a href="Records.html#point"
+ ><span class="hs-identifier hs-type"
+ >point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
- ><a name="point"
- ><a href="Records.html#point"
- ><span class="hs-identifier"
- >point</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="line-15"
+ ></span
+ ><span id="point"
+ ><span class="annot"
+ ><span class="annottext"
+ >point :: Int -&gt; Int -&gt; Point
+</span
+ ><a href="Records.html#point"
+ ><span class="hs-identifier hs-var hs-var"
+ >point</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043799"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043798"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="Records.html#Point"
- ><span class="hs-identifier hs-var"
- >Point</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >$WPoint :: Int -&gt; Int -&gt; Point
+</span
+ ><a href="Records.html#%24WPoint"
+ ><span class="hs-identifier hs-type hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><span class="hs-identifier"
- >x</span
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >y</span
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -261,95 +333,134 @@
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
+ ><span id="line-17"
+ ></span
><span
>
</span
- ><a name="line-18"
- ></a
- ><span class="hs-identifier"
- >lengthSqr</span
+ ><span id="line-18"
+ ></span
+ ><span class="annot"
+ ><a href="Records.html#lengthSqr"
+ ><span class="hs-identifier hs-type"
+ >lengthSqr</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-19"
- ></a
- ><a name="lengthSqr"
- ><a href="Records.html#lengthSqr"
- ><span class="hs-identifier"
- >lengthSqr</span
- ></a
- ></a
+ ><span id="line-19"
+ ></span
+ ><span id="lengthSqr"
+ ><span class="annot"
+ ><span class="annottext"
+ >lengthSqr :: Point -&gt; Int
+</span
+ ><a href="Records.html#lengthSqr"
+ ><span class="hs-identifier hs-var hs-var"
+ >lengthSqr</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-var"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><span class="hs-identifier"
- >x</span
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Point -&gt; Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043795"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >y</span
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Point -&gt; Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="local-6989586621679043794"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
@@ -362,111 +473,178 @@
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
+ ><span id="line-20"
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
- ><span class="hs-identifier"
- >lengthSqr'</span
+ ><span id="line-21"
+ ></span
+ ><span class="annot"
+ ><a href="Records.html#lengthSqr%27"
+ ><span class="hs-identifier hs-type"
+ >lengthSqr'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
- ><a name="lengthSqr%27"
- ><a href="Records.html#lengthSqr%27"
- ><span class="hs-identifier"
- >lengthSqr'</span
- ></a
- ></a
+ ><span id="line-22"
+ ></span
+ ><span id="lengthSqr%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >lengthSqr' :: Point -&gt; Int
+</span
+ ><a href="Records.html#lengthSqr%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >lengthSqr'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-var"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
+ ><span id="local-6989586621679043790"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+x :: Int
+x :: Point -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
+ ><span id="local-6989586621679043789"
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+y :: Int
+y :: Point -&gt; Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
@@ -479,160 +657,262 @@
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >*</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
><span
>
</span
- ><a name="line-24"
- ></a
+ ><span id="line-24"
+ ></span
><span
>
</span
- ><a name="line-25"
- ></a
- ><span class="hs-identifier"
- >translateX</span
+ ><span id="line-25"
+ ></span
+ ><span class="annot"
+ ><a href="Records.html#translateX"
+ ><span class="hs-identifier hs-type"
+ >translateX</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >translateY</span
+ ><span class="annot"
+ ><a href="Records.html#translateY"
+ ><span class="hs-identifier hs-type"
+ >translateY</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-26"
- ></a
- ><a name="translateX"
- ><a href="Records.html#translateX"
- ><span class="hs-identifier"
- >translateX</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >p</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >d</span
- ></a
- ></a
+ ><span id="line-26"
+ ></span
+ ><span id="translateX"
+ ><span class="annot"
+ ><span class="annottext"
+ >translateX :: Point -&gt; Int -&gt; Point
+</span
+ ><a href="Records.html#translateX"
+ ><span class="hs-identifier hs-var hs-var"
+ >translateX</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043786"
+ ><span class="annot"
+ ><span class="annottext"
+ >p :: Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043785"
+ ><span class="annot"
+ ><span class="annottext"
+ >d :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><span class="hs-identifier"
- >x</span
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier"
- >x</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Point -&gt; Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >d</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -640,72 +920,122 @@
><span
>
</span
- ><a name="line-27"
- ></a
- ><a name="translateY"
- ><a href="Records.html#translateY"
- ><span class="hs-identifier"
- >translateY</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >p</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >d</span
- ></a
- ></a
+ ><span id="line-27"
+ ></span
+ ><span id="translateY"
+ ><span class="annot"
+ ><span class="annottext"
+ >translateY :: Point -&gt; Int -&gt; Point
+</span
+ ><a href="Records.html#translateY"
+ ><span class="hs-identifier hs-var hs-var"
+ >translateY</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043784"
+ ><span class="annot"
+ ><span class="annottext"
+ >p :: Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043783"
+ ><span class="annot"
+ ><span class="annottext"
+ >d :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><span class="hs-identifier"
- >y</span
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><span class="hs-identifier"
- >y</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Point -&gt; Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >d</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -713,86 +1043,118 @@
><span
>
</span
- ><a name="line-28"
- ></a
+ ><span id="line-28"
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
- ><span class="hs-identifier"
- >translate</span
+ ><span id="line-29"
+ ></span
+ ><span class="annot"
+ ><a href="Records.html#translate"
+ ><span class="hs-identifier hs-type"
+ >translate</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><a href="Records.html#Point"
- ><span class="hs-identifier hs-type"
- >Point</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-30"
- ></a
- ><a name="translate"
- ><a href="Records.html#translate"
- ><span class="hs-identifier"
- >translate</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >x</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >y</span
- ></a
- ></a
- ><span
- > </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >p</span
- ></a
- ></a
+ ><span id="line-30"
+ ></span
+ ><span id="translate"
+ ><span class="annot"
+ ><span class="annottext"
+ >translate :: Int -&gt; Int -&gt; Point -&gt; Point
+</span
+ ><a href="Records.html#translate"
+ ><span class="hs-identifier hs-var hs-var"
+ >translate</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043781"
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043780"
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043779"
+ ><span class="annot"
+ ><span class="annottext"
+ >p :: Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -800,25 +1162,35 @@
><span
>
</span
- ><a name="line-31"
- ></a
+ ><span id="line-31"
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >aux</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point -&gt; Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >aux</span
+ ></a
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-32"
- ></a
+ ><span id="line-32"
+ ></span
><span
> </span
><span class="hs-keyword"
@@ -826,28 +1198,38 @@
><span
>
</span
- ><a name="line-33"
- ></a
+ ><span id="line-33"
+ ></span
><span
> </span
><span class="hs-special"
>(</span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >dx</span
- ></a
- ></a
+ ><span id="local-6989586621679043777"
+ ><span class="annot"
+ ><span class="annottext"
+ >dx :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >dx</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >dy</span
- ></a
- ></a
+ ><span id="local-6989586621679043776"
+ ><span class="annot"
+ ><span class="annottext"
+ >dy :: Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >dy</span
+ ></a
+ ></span
+ ></span
><span class="hs-special"
>)</span
><span
@@ -858,109 +1240,181 @@
> </span
><span class="hs-special"
>(</span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-34"
- ></a
+ ><span id="line-34"
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >aux</span
- ></a
- ></a
- ><span
- > </span
- ><a href="Records.html#Point"
- ><span class="hs-identifier hs-var"
- >Point</span
- ></a
- ><span class="hs-special"
- >{</span
- ><span class="hs-glyph"
- >..</span
- ><span class="hs-special"
- >}</span
+ ><span id="local-6989586621679043778"
+ ><span class="annot"
+ ><span class="annottext"
+ >aux :: Point -&gt; Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var hs-var"
+ >aux</span
+ ></a
+ ></span
+ ></span
+ ><span
+ > </span
+ ><span id="local-6989586621679043774"
+ ><span id="local-6989586621679043775"
+ ><span class="annot"
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ></span
+ ><span class="hs-special"
+ >{</span
+ ><span class="hs-glyph"
+ >..</span
+ ><span class="hs-special"
+ >}</span
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >p</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Point
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>{</span
><span
> </span
- ><span class="hs-identifier"
- >x</span
+ ><span class="annot"
+ ><span class="annottext"
+ >x :: Int
+</span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >x</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >dx</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >dx</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
- ><span class="hs-identifier"
- >y</span
+ ><span class="annot"
+ ><span class="annottext"
+ >y :: Int
+</span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >y</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ></span
><span
> </span
- ><span class="hs-operator hs-var"
- >+</span
+ ><span class="annot"
+ ><span class="annottext"
+ >Int -&gt; Int -&gt; Int
+forall a. Num a =&gt; a -&gt; a -&gt; a
+</span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ></span
><span
> </span
- ><a href="#"
- ><span class="hs-identifier hs-var"
- >dy</span
- ></a
+ ><span class="annot"
+ ><span class="annottext"
+ >Int
+</span
+ ><a href="#"
+ ><span class="hs-identifier hs-var"
+ >dy</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -968,8 +1422,8 @@
><span
>
</span
- ><a name="line-35"
- ></a
+ ><span id="line-35"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/ref/src/Types.html b/hypsrc-test/ref/src/Types.html
index a8be9e78..1258b8c1 100644
--- a/hypsrc-test/ref/src/Types.html
+++ b/hypsrc-test/ref/src/Types.html
@@ -11,18 +11,18 @@
><span
>
</span
- ><a name="line-2"
- ></a
+ ><span id="line-2"
+ ></span
><span
>
</span
- ><a name="line-3"
- ></a
+ ><span id="line-3"
+ ></span
><span
>
</span
- ><a name="line-4"
- ></a
+ ><span id="line-4"
+ ></span
><span class="hs-keyword"
>module</span
><span
@@ -36,84 +36,94 @@
><span
>
</span
- ><a name="line-5"
- ></a
+ ><span id="line-5"
+ ></span
><span
>
</span
- ><a name="line-6"
- ></a
+ ><span id="line-6"
+ ></span
><span
>
</span
- ><a name="line-7"
- ></a
+ ><span id="line-7"
+ ></span
><span class="hs-keyword"
>data</span
><span
> </span
- ><a name="Quux"
- ><a href="Types.html#Quux"
- ><span class="hs-identifier"
- >Quux</span
- ></a
- ></a
+ ><span id="Quux"
+ ><span class="annot"
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="Bar"
- ><a href="Types.html#Bar"
- ><span class="hs-identifier"
- >Bar</span
- ></a
- ></a
+ ><span id="Bar"
+ ><span class="annot"
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>|</span
><span
> </span
- ><a name="Baz"
- ><a href="Types.html#Baz"
- ><span class="hs-identifier"
- >Baz</span
- ></a
- ></a
+ ><span id="Baz"
+ ><span class="annot"
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-8"
- ></a
+ ><span id="line-8"
+ ></span
><span
>
</span
- ><a name="line-9"
- ></a
+ ><span id="line-9"
+ ></span
><span class="hs-keyword"
>newtype</span
><span
> </span
- ><a name="Foo"
- ><a href="Types.html#Foo"
- ><span class="hs-identifier"
- >Foo</span
- ></a
- ></a
+ ><span id="Foo"
+ ><span class="annot"
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="Foo"
- ><a href="Types.html#Foo"
- ><span class="hs-identifier"
- >Foo</span
- ></a
- ></a
+ ><span id="Foo"
+ ><span class="annot"
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
@@ -123,23 +133,25 @@
><span
>
</span
- ><a name="line-10"
- ></a
+ ><span id="line-10"
+ ></span
><span
>
</span
- ><a name="line-11"
- ></a
+ ><span id="line-11"
+ ></span
><span class="hs-keyword"
>type</span
><span
> </span
- ><a name="FooQuux"
- ><a href="Types.html#FooQuux"
- ><span class="hs-identifier"
- >FooQuux</span
- ></a
- ></a
+ ><span id="FooQuux"
+ ><span class="annot"
+ ><a href="Types.html#FooQuux"
+ ><span class="hs-identifier hs-var"
+ >FooQuux</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -148,35 +160,41 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-12"
- ></a
+ ><span id="line-12"
+ ></span
><span class="hs-keyword"
>type</span
><span
> </span
- ><a name="QuuxFoo"
- ><a href="Types.html#QuuxFoo"
- ><span class="hs-identifier"
- >QuuxFoo</span
- ></a
- ></a
+ ><span id="QuuxFoo"
+ ><span class="annot"
+ ><a href="Types.html#QuuxFoo"
+ ><span class="hs-identifier hs-var"
+ >QuuxFoo</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -185,35 +203,39 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-13"
- ></a
+ ><span id="line-13"
+ ></span
><span
>
</span
- ><a name="line-14"
- ></a
+ ><span id="line-14"
+ ></span
><span
>
</span
- ><a name="line-15"
- ></a
+ ><span id="line-15"
+ ></span
><span class="hs-keyword"
>data</span
><span
@@ -222,38 +244,44 @@
>family</span
><span
> </span
- ><a name="Norf"
- ><a href="Types.html#Norf"
- ><span class="hs-identifier"
- >Norf</span
- ></a
- ></a
+ ><span id="Norf"
+ ><span class="annot"
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043815"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043814"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-16"
- ></a
+ ><span id="line-16"
+ ></span
><span
>
</span
- ><a name="line-17"
- ></a
+ ><span id="line-17"
+ ></span
><span class="hs-keyword"
>data</span
><span
@@ -262,51 +290,65 @@
>instance</span
><span
> </span
- ><a href="Types.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span id="Norf"
+ ><span class="annot"
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="NFQ"
- ><a href="Types.html#NFQ"
- ><span class="hs-identifier"
- >NFQ</span
- ></a
- ></a
+ ><span id="NFQ"
+ ><span class="annot"
+ ><a href="Types.html#NFQ"
+ ><span class="hs-identifier hs-var"
+ >NFQ</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-18"
- ></a
+ ><span id="line-18"
+ ></span
><span class="hs-keyword"
>data</span
><span
@@ -315,61 +357,75 @@
>instance</span
><span
> </span
- ><a href="Types.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span id="Norf"
+ ><span class="annot"
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>=</span
><span
> </span
- ><a name="NQF"
- ><a href="Types.html#NQF"
- ><span class="hs-identifier"
- >NQF</span
- ></a
- ></a
+ ><span id="NQF"
+ ><span class="annot"
+ ><a href="Types.html#NQF"
+ ><span class="hs-identifier hs-var"
+ >NQF</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
>
</span
- ><a name="line-19"
- ></a
+ ><span id="line-19"
+ ></span
><span
>
</span
- ><a name="line-20"
- ></a
+ ><span id="line-20"
+ ></span
><span
>
</span
- ><a name="line-21"
- ></a
+ ><span id="line-21"
+ ></span
><span class="hs-keyword"
>type</span
><span
@@ -378,38 +434,44 @@
>family</span
><span
> </span
- ><a name="Norf%27"
- ><a href="Types.html#Norf%27"
- ><span class="hs-identifier"
- >Norf'</span
- ></a
- ></a
+ ><span id="Norf%27"
+ ><span class="annot"
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-var"
+ >Norf'</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >a</span
- ></a
- ></a
+ ><span id="local-6989586621679043811"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ></span
+ ></span
><span
> </span
- ><a name=""
- ><a href="#"
- ><span class="hs-identifier"
- >b</span
- ></a
- ></a
+ ><span id="local-6989586621679043810"
+ ><span class="annot"
+ ><a href="#"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ></span
+ ></span
><span
>
</span
- ><a name="line-22"
- ></a
+ ><span id="line-22"
+ ></span
><span
>
</span
- ><a name="line-23"
- ></a
+ ><span id="line-23"
+ ></span
><span class="hs-keyword"
>type</span
><span
@@ -418,22 +480,30 @@
>instance</span
><span
> </span
- ><a href="Types.html#Norf%27"
- ><span class="hs-identifier hs-type"
- >Norf'</span
- ></a
+ ><span id="Norf%27"
+ ><span class="annot"
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-var"
+ >Norf'</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -442,25 +512,29 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-24"
- ></a
+ ><span id="line-24"
+ ></span
><span class="hs-keyword"
>type</span
><span
@@ -469,22 +543,30 @@
>instance</span
><span
> </span
- ><a href="Types.html#Norf%27"
- ><span class="hs-identifier hs-type"
- >Norf'</span
- ></a
+ ><span id="Norf%27"
+ ><span class="annot"
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-var"
+ >Norf'</span
+ ></a
+ ></span
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
@@ -493,94 +575,119 @@
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
>
</span
- ><a name="line-25"
- ></a
+ ><span id="line-25"
+ ></span
><span
>
</span
- ><a name="line-26"
- ></a
+ ><span id="line-26"
+ ></span
><span
>
</span
- ><a name="line-27"
- ></a
- ><span class="hs-identifier"
- >norf1</span
+ ><span id="line-27"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf1"
+ ><span class="hs-identifier hs-type"
+ >norf1</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-28"
- ></a
- ><a name="norf1"
- ><a href="Types.html#norf1"
- ><span class="hs-identifier"
- >norf1</span
- ></a
- ></a
+ ><span id="line-28"
+ ></span
+ ><span id="norf1"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf1 :: Norf Foo Quux -&gt; Int
+</span
+ ><a href="Types.html#norf1"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf1</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#NFQ"
- ><span class="hs-identifier hs-var"
- >NFQ</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >NFQ</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -591,10 +698,12 @@
>)</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -603,31 +712,41 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-29"
- ></a
- ><span class="hs-identifier"
- >norf1</span
+ ><span id="line-29"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf1"
+ ><span class="hs-identifier hs-var"
+ >norf1</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#NFQ"
- ><span class="hs-identifier hs-var"
- >NFQ</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >NFQ</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -638,10 +757,12 @@
>)</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -650,83 +771,108 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1</span
+ >1</span
+ ></span
><span
>
</span
- ><a name="line-30"
- ></a
+ ><span id="line-30"
+ ></span
><span
>
</span
- ><a name="line-31"
- ></a
- ><span class="hs-identifier"
- >norf2</span
+ ><span id="line-31"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf2"
+ ><span class="hs-identifier hs-type"
+ >norf2</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Norf"
- ><span class="hs-identifier hs-type"
- >Norf</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-32"
- ></a
- ><a name="norf2"
- ><a href="Types.html#norf2"
- ><span class="hs-identifier"
- >norf2</span
- ></a
- ></a
+ ><span id="line-32"
+ ></span
+ ><span id="norf2"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf2 :: Norf Quux Foo -&gt; Int
+</span
+ ><a href="Types.html#norf2"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf2</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#NQF"
- ><span class="hs-identifier hs-var"
- >NQF</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >NQF</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -743,37 +889,49 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-33"
- ></a
- ><span class="hs-identifier"
- >norf2</span
+ ><span id="line-33"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf2"
+ ><span class="hs-identifier hs-var"
+ >norf2</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#NQF"
- ><span class="hs-identifier hs-var"
- >NQF</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >NQF</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -790,74 +948,95 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1</span
+ >1</span
+ ></span
><span
>
</span
- ><a name="line-34"
- ></a
+ ><span id="line-34"
+ ></span
><span
>
</span
- ><a name="line-35"
- ></a
+ ><span id="line-35"
+ ></span
><span
>
</span
- ><a name="line-36"
- ></a
- ><span class="hs-identifier"
- >norf1'</span
+ ><span id="line-36"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf1%27"
+ ><span class="hs-identifier hs-type"
+ >norf1'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Norf%27"
- ><span class="hs-identifier hs-type"
- >Norf'</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-37"
- ></a
- ><a name="norf1%27"
- ><a href="Types.html#norf1%27"
- ><span class="hs-identifier"
- >norf1'</span
- ></a
- ></a
+ ><span id="line-37"
+ ></span
+ ><span id="norf1%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf1' :: Norf' Foo Quux -&gt; Int
+</span
+ ><a href="Types.html#norf1%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf1'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -868,10 +1047,12 @@
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -880,23 +1061,31 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-38"
- ></a
- ><span class="hs-identifier"
- >norf1'</span
+ ><span id="line-38"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf1%27"
+ ><span class="hs-identifier hs-var"
+ >norf1'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -907,10 +1096,12 @@
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span class="hs-special"
>)</span
><span
@@ -919,77 +1110,100 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1</span
+ >1</span
+ ></span
><span
>
</span
- ><a name="line-39"
- ></a
+ ><span id="line-39"
+ ></span
><span
>
</span
- ><a name="line-40"
- ></a
- ><span class="hs-identifier"
- >norf2'</span
+ ><span id="line-40"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf2%27"
+ ><span class="hs-identifier hs-type"
+ >norf2'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>::</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Norf%27"
- ><span class="hs-identifier hs-type"
- >Norf'</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Quux"
- ><span class="hs-identifier hs-type"
- >Quux</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ></span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-type"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-glyph"
>-&gt;</span
><span
> </span
+ ><span class="annot"
><span class="hs-identifier hs-type"
- >Int</span
+ >Int</span
+ ></span
><span
>
</span
- ><a name="line-41"
- ></a
- ><a name="norf2%27"
- ><a href="Types.html#norf2%27"
- ><span class="hs-identifier"
- >norf2'</span
- ></a
- ></a
+ ><span id="line-41"
+ ></span
+ ><span id="norf2%27"
+ ><span class="annot"
+ ><span class="annottext"
+ >norf2' :: Norf' Quux Foo -&gt; Int
+</span
+ ><a href="Types.html#norf2%27"
+ ><span class="hs-identifier hs-var hs-var"
+ >norf2'</span
+ ></a
+ ></span
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Bar"
- ><span class="hs-identifier hs-var"
- >Bar</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Bar</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -1004,31 +1218,41 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >0</span
+ >0</span
+ ></span
><span
>
</span
- ><a name="line-42"
- ></a
- ><span class="hs-identifier"
- >norf2'</span
+ ><span id="line-42"
+ ></span
+ ><span class="annot"
+ ><a href="Types.html#norf2%27"
+ ><span class="hs-identifier hs-var"
+ >norf2'</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
>(</span
+ ><span class="annot"
><a href="Types.html#Baz"
- ><span class="hs-identifier hs-var"
- >Baz</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Baz</span
+ ></a
+ ></span
><span class="hs-special"
>,</span
><span
> </span
+ ><span class="annot"
><a href="Types.html#Foo"
- ><span class="hs-identifier hs-var"
- >Foo</span
- ></a
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ></span
><span
> </span
><span class="hs-special"
@@ -1043,13 +1267,15 @@
>=</span
><span
> </span
+ ><span class="annot"
><span class="hs-number"
- >1</span
+ >1</span
+ ></span
><span
>
</span
- ><a name="line-43"
- ></a
+ ><span id="line-43"
+ ></span
></pre
></body
></html
diff --git a/hypsrc-test/src/ClangCppBug.hs b/hypsrc-test/src/ClangCppBug.hs
new file mode 100644
index 00000000..4b0bc35f
--- /dev/null
+++ b/hypsrc-test/src/ClangCppBug.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE CPP #-}
+module ClangCppBug where
+
+foo :: Int
+foo = 1
+
+-- Clang doesn't mind these:
+#define BAX 2
+{-# INLINE bar #-}
+
+bar :: Int
+bar = 3
+
+-- But it doesn't like this:
+{-# RULES
+"bar/qux" bar = qux
+"qux/foo" qux = foo
+ #-}
+
+qux :: Int
+qux = 88
diff --git a/hypsrc-test/src/LinkingIdentifiers.hs b/hypsrc-test/src/LinkingIdentifiers.hs
new file mode 100644
index 00000000..4fff9776
--- /dev/null
+++ b/hypsrc-test/src/LinkingIdentifiers.hs
@@ -0,0 +1,14 @@
+-- Tests that the identifers/operators are properly linked even when:
+--
+-- * backquoted, parenthesized, vanilla
+-- * qualified, not-qualified
+--
+module LinkingIdentifiers where
+
+ident :: Int -> Int -> Int
+x `ident` 2 = (x `ident` 2) + (x `LinkingIdentifiers.ident` 2)
+ident x 2 = ident x 2 + LinkingIdentifiers.ident x 2
+
+(++:++) :: Int -> Int -> Int
+x ++:++ 2 = (x ++:++ 2) + (x LinkingIdentifiers.++:++ 2)
+(++:++) x 2 = (++:++) x 2 + (LinkingIdentifiers.++:++) x 2
diff --git a/hypsrc-test/src/PositionPragmas.hs b/hypsrc-test/src/PositionPragmas.hs
new file mode 100644
index 00000000..907316fd
--- /dev/null
+++ b/hypsrc-test/src/PositionPragmas.hs
@@ -0,0 +1,12 @@
+module PositionPragmas where
+
+{-# LINE 8 "hypsrc-test/src/PositionPragmas.hs" #-}
+
+foo :: String
+foo = bar
+
+{-# LINE 23 "hypsrc-test/src/PositionPragmas.hs" #-}
+
+bar :: String
+bar = foo
+