File tree Expand file tree Collapse file tree 2 files changed +0
-19
lines changed
Expand file tree Collapse file tree 2 files changed +0
-19
lines changed Original file line number Diff line number Diff line change 6868
6969### Type Class Instances
7070
71- instance errorEitherAlt :: (Error e) => Alt (Either e)
72-
73- instance errorEitherAlternative :: (Error e) => Alternative (Either e)
74-
75- instance errorEitherPlus :: (Error e) => Plus (Either e)
76-
7771 instance errorString :: Error String
7872
7973
Original file line number Diff line number Diff line change 11module Control.Monad.Error where
22
3- import Control.Alt
4- import Control.Alternative
5- import Control.Plus
6- import Data.Either
7-
83class Error a where
94 noMsg :: a
105 strMsg :: String -> a
@@ -13,11 +8,3 @@ instance errorString :: Error String where
138 noMsg = " "
149 strMsg = id
1510
16- instance errorEitherAlt :: (Error e ) => Alt (Either e ) where
17- (<|>) (Left _) n = n
18- (<|>) m _ = m
19-
20- instance errorEitherPlus :: (Error e ) => Plus (Either e ) where
21- empty = Left noMsg
22-
23- instance errorEitherAlternative :: (Error e ) => Alternative (Either e )
You can’t perform that action at this time.
0 commit comments