on b52ed84 help sign in
streamly/src/Streamly/Internal/BaseCompat.hs
29 lines 645 B history raw
1{-# LANGUAGE CPP #-}
3-- |
4-- Module : Streamly.Internal.BaseCompat
5-- License : BSD3
6-- Maintainer : streamly@composewell.com
7-- Stability : experimental
8-- Portability : GHC
9--
10-- Compatibility functions for "base" package.
11--
12module Streamly.Internal.BaseCompat
13 (
14 (#.)
15 , errorWithoutStackTrace
16 )
17where
19import Data.Coerce (Coercible, coerce)
21{-# INLINE (#.) #-}
22(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
23(#.) _f = coerce
25#if !(MIN_VERSION_base(4,9,0))
26{-# NOINLINE errorWithoutStackTrace #-}
27errorWithoutStackTrace :: [Char] -> a
28errorWithoutStackTrace s = error s
29#endif