Copyright | (c) 2011 - 2016 Björn Peemöller |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines several operations to construct and emit compiler messages to the user.
Synopsis
- class Monad m => MonadIO (m :: Type -> Type) where
- status :: MonadIO m => Options -> String -> m ()
- putMsg :: MonadIO m => String -> m ()
- putErrLn :: MonadIO m => String -> m ()
- putErrsLn :: MonadIO m => [String] -> m ()
- abortWith :: [String] -> IO a
- abortWithMessage :: Message -> IO a
- abortWithMessages :: [Message] -> IO a
- warnOrAbort :: WarnOpts -> [Message] -> IO ()
- internalError :: String -> a
- data Message
- message :: Doc -> Message
- posMessage :: HasPosition p => p -> Doc -> Message
Output of user information
class Monad m => MonadIO (m :: Type -> Type) where #
Monads in which IO
computations may be embedded.
Any monad built by applying a sequence of monad transformers to the
IO
monad will be an instance of this class.
Instances should satisfy the following laws, which state that liftIO
is a transformer of monads:
Instances
status :: MonadIO m => Options -> String -> m () Source #
Print a status message, depending on the current verbosity
program abortion
abortWithMessage :: Message -> IO a Source #
Print a single error message on stderr
and abort the program
abortWithMessages :: [Message] -> IO a Source #
Print a list of error messages on stderr
and abort the program
warnOrAbort :: WarnOpts -> [Message] -> IO () Source #
Print a list of warning messages on stderr
and abort the program
|if the -Werror option is set
internalError :: String -> a Source #
Raise an internal error
creating messages
Compiler message
Instances
Eq Message | |
Ord Message | |
Show Message | |
HasPosition Message | |
Defined in Curry.Base.Message getPosition :: Message -> Position # setPosition :: Position -> Message -> Message # | |
Pretty Message | |
Defined in Curry.Base.Message |
posMessage :: HasPosition p => p -> Doc -> Message #
Construct a message from an entity with a Position
and a text