Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIN_VERSION_ghc instead of __GLASGOW_HASKELL__ #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions trace-foreign-calls/src/Plugin/TraceForeignCalls/Util/Shim.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ instance NoValue NoExtField where
instance NoValue SrcSpan where
noValue = noSrcSpan

#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)

instance NoValue a => NoValue (SrcSpanAnn' a) where
noValue = SrcSpanAnn noValue noValue
Expand All @@ -63,13 +63,13 @@ instance NoValue [AddEpAnn] where
-------------------------------------------------------------------------------}

originGenerated :: Origin
#if __GLASGOW_HASKELL__ == 906
#if MIN_VERSION_ghc(9,5,0) && !MIN_VERSION_ghc(9,7,0)
originGenerated = Generated
#endif
#if __GLASGOW_HASKELL__ == 908
#if MIN_VERSION_ghc(9,7,0) && !MIN_VERSION_ghc(9,9,0)
originGenerated = Generated SkipPmc
#endif
#if __GLASGOW_HASKELL__ >= 910
#if MIN_VERSION_ghc(9,9,0)
originGenerated = Generated OtherExpansion SkipPmc
#endif

Expand All @@ -79,47 +79,47 @@ originGenerated = Generated OtherExpansion SkipPmc

modlTraceEventIO :: Module
modlTraceEventIO =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "Debug.Trace"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.Debug.Trace"
#endif

modlEvaluate :: Module
modlEvaluate =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "GHC.IO"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.IO"
#endif

modlUnsafePerformIO :: Module
modlUnsafePerformIO =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "GHC.IO.Unsafe"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.IO.Unsafe"
#endif

modlHasCallStack :: Module
modlHasCallStack =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "GHC.Stack.Types"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.Stack.Types"
#endif

modlCallStack :: Module
modlCallStack =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "GHC.Stack"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.Stack"
#endif

modlPrettyCallStack :: Module
modlPrettyCallStack =
#if __GLASGOW_HASKELL__ < 910
#if !MIN_VERSION_ghc(9,9,0)
mkModule baseUnit $ mkModuleName "GHC.Exception"
#else
mkModule ghcInternalUnit $ mkModuleName "GHC.Internal.Stack"
Expand Down