aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-04-10 10:46:14 +0000
committerDavid Waern <david.waern@gmail.com>2010-04-10 10:46:14 +0000
commita2a41c8b812cbc55d4541cec3285ee32f863a227 (patch)
tree786745653693708cd8fe1cf11a981b8d6dabafff /tests
parent6f47cab6685dd30c9795fe56eb947cd94c7255ee (diff)
Fix #112
No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds.
Diffstat (limited to 'tests')
-rw-r--r--tests/tests/Ticket112.hs9
-rw-r--r--tests/tests/Ticket112.html.ref116
2 files changed, 125 insertions, 0 deletions
diff --git a/tests/tests/Ticket112.hs b/tests/tests/Ticket112.hs
new file mode 100644
index 00000000..c9cd5117
--- /dev/null
+++ b/tests/tests/Ticket112.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash #-}
+
+module Ticket112 where
+
+import GHC.Prim
+
+-- | ...given a raw 'Addr#' to the string, and the length of the string.
+f :: a
+f = undefined
diff --git a/tests/tests/Ticket112.html.ref b/tests/tests/Ticket112.html.ref
new file mode 100644
index 00000000..9ff3a192
--- /dev/null
+++ b/tests/tests/Ticket112.html.ref
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Ticket112</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+><SCRIPT TYPE="text/javascript"
+>window.onload = function () {setSynopsis("mini_Ticket112.html")};</SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="">Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="">Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Ticket112</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="">f</A
+> :: a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v:f"
+><A NAME="v%3Af"
+></A
+></A
+><B
+>f</B
+> :: a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>...given a raw <TT
+><A HREF="">Addr#</A
+></TT
+> to the string, and the length of the string.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="">Haddock</A
+> version 2.7.2</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>