functor module

This commit is contained in:
Stephen Diehl
2016-04-09 15:13:13 -04:00
parent 959cd272f7
commit 7a62c5d489
3 changed files with 39 additions and 9 deletions
+1
View File
@@ -35,6 +35,7 @@ library
Monad
Show
Unsafe
Functor
default-extensions:
NoImplicitPrelude
+9 -9
View File
@@ -1,15 +1,15 @@
{-# LANGUAGE NoImplicitPrelude #-}
module Debug (
undefined
, error
, trace
, traceM
, traceIO
, traceShow
, traceShowM
, notImplemented
) where
undefined,
error,
trace,
traceM,
traceIO,
traceShow,
traceShowM,
notImplemented,
) where
import qualified Prelude as P
import qualified Debug.Trace as T
+29
View File
@@ -0,0 +1,29 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Functor (
Functor(..),
($>),
(<$>),
void,
) where
#if (__GLASGOW_HASKELL__ >= 710)
import Data.Functor (
Functor(..)
, ($>)
, (<$>)
, void
)
#else
import Data.Functor (
Functor(..)
, (<$>)
)
($>) :: Functor f => f a -> b -> f b
($>) = flip (<$)
void :: Functor f => f a -> f ()
void x = () <$ x
#endif