Skip to content

Commit fe9b6a2

Browse files
authored
Merge pull request #10 from haskell-works/newhoggy/improvements
Improvements
2 parents ffee0b7 + cdd5121 commit fe9b6a2

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

hw-prelude.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ library
9292

9393
exposed-modules: HaskellWorks.Control.Monad
9494
HaskellWorks.Data.String
95+
HaskellWorks.Either
9596
HaskellWorks.Error
9697
HaskellWorks.Error.Types
9798
HaskellWorks.Error.Types.GenericError

src/HaskellWorks/Either.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module HaskellWorks.Either
2+
( orElse
3+
) where
4+
5+
import Data.Either
6+
import Data.Function
7+
8+
orElse :: Either e a -> Either e a -> Either e a
9+
orElse a b =
10+
either (const b) Right a

src/HaskellWorks/Prelude.hs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ module HaskellWorks.Prelude
7171
(&&),
7272
(||),
7373
(.),
74-
(</>),
7574

7675
void,
7776
mapM_,
@@ -102,6 +101,7 @@ module HaskellWorks.Prelude
102101
(<$!>),
103102

104103
(<$>),
104+
(<&>),
105105

106106
(<**>),
107107
liftA,
@@ -111,13 +111,6 @@ module HaskellWorks.Prelude
111111

112112
for_,
113113

114-
zip,
115-
zip3,
116-
zipWith,
117-
zipWith3,
118-
unzip,
119-
unzip3,
120-
121114
Read(..),
122115
readEither,
123116

@@ -148,6 +141,7 @@ module HaskellWorks.Prelude
148141

149142
Monad(..),
150143
MonadFail(..),
144+
MonadIO(..),
151145
MonadPlus(..),
152146
Applicative(..),
153147
Alternative(..),
@@ -194,6 +188,7 @@ module HaskellWorks.Prelude
194188
import Control.Applicative
195189
import Control.Exception
196190
import Control.Monad
191+
import Control.Monad.IO.Class
197192
import Control.Monad.Trans.Except
198193
import Data.Bifunctor
199194
import Data.Bool
@@ -205,6 +200,7 @@ import Data.Either
205200
import Data.Eq
206201
import Data.Foldable
207202
import Data.Function
203+
import Data.Functor
208204
import Data.Functor.Contravariant
209205
import Data.Functor.Contravariant.Divisible
210206
import Data.Functor.Identity
@@ -229,7 +225,6 @@ import GHC.Real
229225
import GHC.Stack
230226
import HaskellWorks.Error
231227
import Prelude
232-
import System.FilePath
233228
import System.IO (Handle)
234229
import Text.Read
235230

0 commit comments

Comments
 (0)