File: Either.hs

package info (click to toggle)
haskell-scanner 0.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 168 kB
  • sloc: haskell: 810; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE CPP #-}

module Data.Either
(
  module Export,
#if MIN_VERSION_base(4,7,0)
#else
  isRight,
  isLeft,
#endif
)
where

import "base" Data.Either as Export

#if MIN_VERSION_base(4,7,0)
#else
isRight :: Either a b -> Bool
isRight (Right _) = True
isRight _ = False

isLeft :: Either a b -> Bool
isLeft = not . isRight
#endif