Skip to content

Commit

Permalink
Support the FldName namespace introduced in GHC 9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Oct 10, 2023
1 parent 0b5226a commit c9e34f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions singletons-th/src/Data/Singletons/TH/Promote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,11 @@ promoteInfixDecl mb_let_uniq name fixity = do
mb_ns <- reifyNameSpace name
case mb_ns of
-- If we can't find the Name for some odd reason, fall back to promote_val
Nothing -> promote_val
Just VarName -> promote_val
Just DataName -> never_mind
Just TcClsName -> do
Nothing -> promote_val
Just VarName -> promote_val
Just (FldName _) -> promote_val
Just DataName -> never_mind
Just TcClsName -> do
mb_info <- dsReify name
case mb_info of
Just (DTyConI DClassD{} _)
Expand Down
9 changes: 5 additions & 4 deletions singletons-th/src/Data/Singletons/TH/Single/Fixity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ singInfixDecl name fixity = do
case mb_ns of
-- If we can't find the Name for some odd reason,
-- fall back to singValName
Nothing -> finish $ singledValueName opts name
Just VarName -> finish $ singledValueName opts name
Just DataName -> finish $ singledDataConName opts name
Just TcClsName -> do
Nothing -> finish $ singledValueName opts name
Just VarName -> finish $ singledValueName opts name
Just (FldName _) -> finish $ singledValueName opts name
Just DataName -> finish $ singledDataConName opts name
Just TcClsName -> do
mb_info <- dsReify name
case mb_info of
Just (DTyConI DClassD{} _)
Expand Down

0 comments on commit c9e34f5

Please sign in to comment.