moss: Haskell client for Moss

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Please see the README on Github at https://github.com/mbg/moss#readme


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.0
Change logChangeLog.md
Dependenciesbase (>=4.7 && <5), bytestring, conduit-extra, mtl, network, network-simple, unix-compat [details]
LicenseMIT
CopyrightCopyright (c) 2018 Michael B. Gale
AuthorMichael B. Gale
Maintainerm.gale@warwick.ac.uk
CategoryWeb
Home pagehttps://github.com/mbg/moss#readme
Bug trackerhttps://github.com/mbg/moss/issues
Source repositoryhead: git clone https://github.com/mbg/moss
UploadedSat Dec 15 15:54:57 UTC 2018 by mbg

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for moss-0.1.0.0

[back to package description]

moss

Haskell client library for Moss.

Example

In order to use Moss, you need to register on the Moss website. Once you have your access token, using the library is fairly easy:

import Stanford.Moss

cfg :: MossCfg
cfg = defaultMossCfg {
    mossLanguage = Haskell,
    mossUser = "[YOUR ACCESS TOKEN HERE]"
}

main :: IO ()
main = do
    url <- withMoss cfg $ do
        addBaseFile "Skeleton" "Skeleton.hs"
        addFile "StudentA" "StudentA.hs"
        addFile "StudentB" "StudentB.hs"
        query "Test"
    print url

This example establishes a connection with Moss using Haskell as the selected programming language. We assume that some skeleton code (Skeleton.hs) has been made available to students and relevant parts from that file should be ignored for plagiarism checking. The example then uploads two students' submissions (StudentA.hs and StudentB.hs) before telling Moss to run the plagiarism check with query which eventually returns a URL to the results.