MIT licensed by Michael B. Gale
Maintained by [email protected]
This version can be pinned in stack with:moss-0.2.0.1@sha256:f89187763cafadb81032e794b49c1b1a8a1ce8c21df26ad6f179694bb7f6e137,1178

Module documentation for 0.2.0.1

Haskell client library for Moss

GitHub CI stackage-nightly Hackage

Haskell client library for Moss which is an online service for checking for code similarity, primarily aimed at detecting plagiarism.

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.

Changes

Changelog for moss

0.2.0.1

  • Compatibility with mtl-2.3 and above (#3)

0.2

  • Add more languages supported by MOSS (#2)

0.1

  • Initial release