Revert back to one lambda par, and fix issues with lambda lifter

This commit is contained in:
Martin Fredin 2023-02-11 09:59:26 +01:00
parent 78a3ed56ea
commit e212c79a44
4 changed files with 73 additions and 35 deletions

View file

@ -1,5 +1,11 @@
module Auxiliary (module Auxiliary) where
import Control.Monad.Error.Class (liftEither)
import Control.Monad.Except (MonadError)
import Data.Either.Combinators (maybeToRight)
snoc :: a -> [a] -> [a]
snoc x xs = xs ++ [x]
maybeToRightM :: MonadError l m => l -> Maybe r -> m r
maybeToRightM err = liftEither . maybeToRight err