aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index deda34ca..0c9cdb0a 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -827,8 +827,8 @@ extractClassDecl _ _ _ d =
extractRecSel :: HsName -> Module -> HsName -> [HsName] -> [HsConDecl]
-> HsDecl
extractRecSel _ _ _ _ [] = error "extractRecSel: selector not found"
-extractRecSel _ _ _ _ (d@(HsConDecl{}):_) =
- error $ "Main.extractRecSel: unexpected (con)decl" ++ show d
+extractRecSel nm mdl t tvs (d@(HsConDecl{}):rest) =
+ extractRecSel nm mdl t tvs rest
extractRecSel nm mdl t tvs (HsRecDecl loc _ _tvs _ fields _mb_doc : rest)
| (HsFieldDecl ns ty mb_doc : _) <- matching_fields
= HsTypeSig loc [nm] (HsTyFun data_ty (unbang ty)) mb_doc