sof / mediawiki Goto Github PK
View Code? Open in Web Editor NEWHaskell binding to Mediawiki API
License: Other
Haskell binding to Mediawiki API
License: Other
= mediawiki - Accessing MediaWiki from Haskell = 'mediawiki' is a Haskell package providing a comprehensive binding to the programmatic interface to MediaWiki (aka, 'the MediaWiki API') - http://www.mediawiki.org/wiki/API The binding is allegedly complete (2008-11-17), letting you write applications in Haskell that accesses and (if enabled by target Wiki) manipulate content on MediaWiki pages. = Getting started = For some code samples showing you how to get started using this API binding, have a look in the examples/ directory. = Building and installing = This package is provided in Cabal form, so only thing you need to do to get going is: foo% runghc Setup configure foo% runghc Setup build foo% runghc Setup install The package depends on a bunch of other packages though, so you need to have them built&installed, as well. They are: * HTTP: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP * xml: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xml * mime: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mime * utf8-string: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string = Feedback / question = Please send them to [email protected] , and I'll try to respond to them as best/quickly as possible.
Currently this library doesn't compile due to its .cabal file not specifying version bounds. The network
package no longer exports the network-uri
package which has been moved to network-uri
. Furthermore, the mime
package has switched from String
to Text
since version 4.0. A quick fix would to simply specify the versions in the cabal file.
MediaWiki/Util/Fetch.hs:28:8:
Could not find module ‘Network.URI’
It is a member of the hidden package ‘network-uri-2.6.0.1’.
Perhaps you need to add ‘network-uri’ to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
ghc version: ghc-7.8.3-2
Cabal version: 1.20.0.3-2
OS: Linux
network-uri should be added to build-deps
When that's done I get these errors:
MediaWiki/API.hs:58:40:
Couldn't match type ‘text-1.1.1.3:Data.Text.Internal.Text’
with ‘[Char]’
Expected type: String
Actual type: text-1.1.1.3:Data.Text.Internal.Text
In the expression: showMIMEType form_mime_ty
In the expression: ("Content-Type", showMIMEType form_mime_ty)
MediaWiki/API.hs:64:30:
Couldn't match type ‘[Char]’
with ‘text-1.1.1.3:Data.Text.Internal.Text’
Expected type: SubType
Actual type: [Char]
In the first argument of ‘Application’, namely
‘"x-www-form-urlencoded"’
In the expression: Application "x-www-form-urlencoded"
In an equation for ‘form_mime_ty’:
form_mime_ty = Application "x-www-form-urlencoded"
I got these on both Windows and Linux.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.