Skip to content

Commit

Permalink
Fix compile errors (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
toku-sa-n authored Mar 13, 2024
1 parent 9784ec2 commit ee609f2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/HIndent/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1969,23 +1969,23 @@ instance Pretty FamEqn' where
pretty feqn_rhs
where
prefix =
case (famEqnFor, dd_cons feqn_rhs) of
(DataFamInstDeclForTopLevel, NewTypeCon {}) -> "newtype instance"
(DataFamInstDeclForTopLevel, DataTypeCons {}) -> "data instance"
(DataFamInstDeclForInsideClassInst, NewTypeCon {}) -> "newtype"
(DataFamInstDeclForInsideClassInst, DataTypeCons {}) -> "data"
case (famEqnFor, GHC.dd_cons feqn_rhs) of
(DataFamInstDeclForTopLevel, GHC.NewTypeCon {}) -> "newtype instance"
(DataFamInstDeclForTopLevel, GHC.DataTypeCons {}) -> "data instance"
(DataFamInstDeclForInsideClassInst, GHC.NewTypeCon {}) -> "newtype"
(DataFamInstDeclForInsideClassInst, GHC.DataTypeCons {}) -> "data"
#else
instance Pretty FamEqn' where
pretty' FamEqn' {famEqn = FamEqn {..}, ..} = do
pretty' FamEqn' {famEqn = GHC.FamEqn {..}, ..} = do
spaced $ string prefix : pretty feqn_tycon : fmap pretty feqn_pats
pretty feqn_rhs
where
prefix =
case (famEqnFor, dd_ND feqn_rhs) of
(DataFamInstDeclForTopLevel, NewType) -> "newtype instance"
(DataFamInstDeclForTopLevel, DataType) -> "data instance"
(DataFamInstDeclForInsideClassInst, NewType) -> "newtype"
(DataFamInstDeclForInsideClassInst, DataType) -> "data"
case (famEqnFor, GHC.dd_ND feqn_rhs) of
(DataFamInstDeclForTopLevel, GHC.NewType) -> "newtype instance"
(DataFamInstDeclForTopLevel, GHC.DataType) -> "data instance"
(DataFamInstDeclForInsideClassInst, GHC.NewType) -> "newtype"
(DataFamInstDeclForInsideClassInst, GHC.DataType) -> "data"
#endif
-- | HsArg (LHsType GhcPs) (LHsType GhcPs)
#if MIN_VERSION_ghc_lib_parser(9,8,1)
Expand Down

0 comments on commit ee609f2

Please sign in to comment.