File: Library.hs

package info (click to toggle)
haskell-persistent 0.9.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 200 kB
  • sloc: haskell: 2,270; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE CPP #-}
#include "cabal_macros.h"
module Database.Persist.TH.Library
    ( apE
    ) where

#if MIN_VERSION_base(4,3,0)
import Control.Applicative
#endif

apE :: Either x (y -> z) -> Either x y -> Either x z

#if MIN_VERSION_base(4,3,0)
apE = (<*>)
#else
apE (Left x)   _         = Left x
apE _          (Left x)  = Left x
apE (Right f)  (Right y) = Right (f y)
#endif