aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-06-03 13:46:48 +0000
committersimonmar <unknown>2002-06-03 13:46:48 +0000
commit95b10eaccd0763fc08781c0d61a26d1abe1fb6c0 (patch)
tree1e7e4efd48a293f33044df343baf1693d2693116
parent14b36807eb6ebe36423102ef5b788773128ada81 (diff)
[haddock @ 2002-06-03 13:46:48 by simonmar]
Fix for exporting record selectors from a newtype declaration
-rw-r--r--src/Main.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index f26c473e..cb751180 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -362,6 +362,12 @@ extractDecl name mod decl
HsDataDecl loc ctxt t tvs cons drvs mb_doc ->
extractRecSel name mod t tvs cons
+ HsNewTypeDecl loc ctxt t tvs con drvs mb_doc ->
+ extractRecSel name mod t tvs [con]
+
+ _ -> error ("extractDecl: " ++ show decl)
+
+
extractClassDecl c mod tvs (HsTypeSig loc [n] ty doc)
= case ty of
HsForAllType tvs ctxt' ty' ->