Safe Haskell | None |
---|---|
Language | Haskell98 |
Simple pasting API for CodePad.org.
- type URL = String
- type Code = String
- type PasteId = String
- type PasteOutput = String
- type LangName = String
- codepadUrl :: URL
- codepadLangsURL :: URL
- pasteURL :: PasteId -> URL
- pasteAndRun :: MonadIO m => Code -> LangName -> Bool -> m (Maybe (PasteId, PasteOutput))
- pasteCode :: MonadIO m => Code -> LangName -> Bool -> Bool -> m (Maybe PasteId)
- pasteOutput :: MonadIO m => PasteId -> m (Maybe PasteOutput)
- supportedLangs :: MonadIO m => m (Maybe [LangName])
- parseOutput :: String -> Maybe PasteOutput
- parseLangs :: String -> [LangName]
Documentation
type PasteOutput = String Source
Paste output
codepadUrl :: URL Source
CodePad's domain.
A CodePad URL of a page containing a list of supported languages.
Make a CodePad URL for the given paste id.
:: MonadIO m | |
=> Code | Code to paste. |
-> LangName | Language of the code. |
-> Bool | Private? |
-> m (Maybe (PasteId, PasteOutput)) | The paste id and the run output. |
Paste some code and get the run output too.
:: MonadIO m | |
=> Code | Code to paste. |
-> LangName | Language of the code. |
-> Bool | Run it? |
-> Bool | Private? |
-> m (Maybe PasteId) | The pasted id. |
Perform a paste.
:: MonadIO m | |
=> PasteId | A CodePad paste id. |
-> m (Maybe PasteOutput) | Maybe the run output of that paste. |
Get the run output for a paste id.
supportedLangs :: MonadIO m => m (Maybe [LangName]) Source
Get the list of supported languages.
:: String | Parse a paste page for the output. |
-> Maybe PasteOutput | Maybe the paste output. |
Get the paste output.
Extract the available languages from the CodePad page.