Commit bbdc097c authored by sof's avatar sof
Browse files

[project @ 1997-05-26 02:34:40 by sof]

Updated to reflect move of PprStyle to Outputable
parent c772533f
......@@ -23,7 +23,7 @@ module SpecUtils (
IMP_Ubiq(){-uitous-}
import CmdLineOpts ( opt_SpecialiseOverloaded, opt_SpecialiseUnboxed,
opt_SpecialiseAll
opt_SpecialiseAll, opt_PprUserLength
)
import Bag ( isEmptyBag, bagToList, Bag )
import Class ( GenClass{-instance NamedThing-}, SYN_IE(Class),
......@@ -37,7 +37,7 @@ import Id ( idType, isDictFunId, isConstMethodId_maybe,
)
import Maybes ( maybeToBool, catMaybes, firstJust )
import Name ( OccName, pprOccName, modAndOcc, NamedThing(..) )
import PprStyle ( PprStyle(..) )
import Outputable ( PprStyle(..), Outputable(..) )
import PprType ( pprGenType, pprParendGenType, pprMaybeTy,
TyCon{-ditto-}, GenType{-ditto-}, GenTyVar, GenClassOp
)
......@@ -52,10 +52,6 @@ import Util ( equivClasses, zipWithEqual, cmpPString,
assertPanic, panic{-ToDo:rm-}
)
#if __GLASGOW_HASKELL__ >= 202
import Outputable ( Outputable(..) )
#endif
cmpType = panic "SpecUtils.cmpType (ToDo: get rid of)"
mkSameSpecCon = panic "SpecUtils.mkSameSpecCon (ToDo)"
getInstIdModule = panic "SpecUtils.getInstIdModule (ToDo)"
......@@ -283,7 +279,7 @@ pp_tyspec :: PprStyle -> Doc -> (OccName, TyCon, [Maybe Type]) -> Doc
pp_tyspec sty pp_mod (_, tycon, tys)
= hsep [pp_mod,
text "{-# SPECIALIZE data",
ppr PprForUser tycon, hsep (map (pprParendGenType sty) spec_tys),
ppr (PprForUser opt_PprUserLength) tycon, hsep (map (pprParendGenType sty) spec_tys),
text "-} {- Essential -}"
]
where
......@@ -330,7 +326,7 @@ pp_idspec sty pp_mod (_, id, tys, is_err)
| otherwise
= hsep [pp_mod,
text "{-# SPECIALIZE",
ppr PprForUser id, ptext SLIT("::"),
ppr (PprForUser opt_PprUserLength) id, ptext SLIT("::"),
pprGenType sty spec_ty,
text "#-}", pp_essential ]
where
......
......@@ -43,8 +43,7 @@ import Id ( idType, isDefaultMethodId_maybe, toplevelishId,
import Literal ( Literal{-instance Outputable-} )
import Maybes ( catMaybes, firstJust, maybeToBool )
import Name ( isLocallyDefined )
import Outputable ( interppSP, Outputable(..){-instance * []-} )
import PprStyle ( PprStyle(..) )
import Outputable ( PprStyle(..), interppSP, Outputable(..){-instance * []-} )
import PprType ( pprGenType, pprParendGenType, pprMaybeTy,
GenType{-instance Outputable-}, GenTyVar{-ditto-},
TyCon{-ditto-}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment