Created
May 21, 2019 02:16
-
-
Save romanofski/12eb051803a93d1be5e9654ad031f4c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkEntity = EntityCommand | |
(const . pure) | |
(tmpfileResource (view mhKeepTemp cmd)) | |
(\_ fp -> toProcessConfigWithTempfile (view mhMakeProcess cmd) fp) | |
mkConfig :: (MonadError Error m) => m (EntityCommand a FilePath) | |
mkConfig = | |
case maybeEntity of | |
Nothing -> throwError (GenericError "No attachment selected") | |
Just e -> either throwError (pure . mkEntity) $ entityToBytes e | |
{- | |
src/UI/Actions.hs:1055:21-73: error: | |
• Couldn't match type ‘a’ with ‘m0’ | |
‘a’ is a rigid type variable bound by | |
the type signature for: | |
mkConfig :: forall (m :: * -> *) (a :: * -> *). | |
MonadError Error m => | |
m (EntityCommand a FilePath) | |
at src/UI/Actions.hs:1051:7-70 | |
Expected type: m (EntityCommand a FilePath) | |
Actual type: m (EntityCommand m0 FilePath) | |
• In the expression: | |
either throwError (pure . mkEntity) $ entityToBytes e | |
In a case alternative: | |
Just e -> either throwError (pure . mkEntity) $ entityToBytes e | |
In the expression: | |
case maybeEntity of | |
Nothing -> throwError (GenericError "No attachment selected") | |
Just e -> either throwError (pure . mkEntity) $ entityToBytes e | |
• Relevant bindings include | |
mkConfig :: m (EntityCommand a FilePath) | |
(bound at src/UI/Actions.hs:1052:7) | |
mkEntity :: C8.ByteString -> EntityCommand m0 FilePath | |
(bound at src/UI/Actions.hs:1047:7) | |
| | |
1055 | Just e -> either throwError (pure . mkEntity) $ entityToBytes e | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment