{"size": 3582, "ext": "js", "max_stars_repo_path": "output/Data.FormURLEncoded/index.js", "max_stars_repo_name": "yemi/checkmate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "output/Data.FormURLEncoded/index.js", "max_issues_repo_name": "yemi/checkmate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "output/Data.FormURLEncoded/index.js", "max_forks_repo_name": "yemi/checkmate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 46.5194805195, "max_line_length": 285, "alphanum_fraction": 0.7071468453}
// Generated by psc version 0.9.1
"use strict";
var Prelude = require("../Prelude");
var Data_String = require("../Data.String");
var Data_Maybe = require("../Data.Maybe");
var Data_Tuple = require("../Data.Tuple");
var Data_Generic = require("../Data.Generic");
var Global = require("../Global");
var Control_Apply = require("../Control.Apply");
var Data_Unit = require("../Data.Unit");
var Data_Eq = require("../Data.Eq");
var Data_Ord = require("../Data.Ord");
var Data_Show = require("../Data.Show");
var Data_Semigroup = require("../Data.Semigroup");
var Control_Semigroupoid = require("../Control.Semigroupoid");
var Data_Functor = require("../Data.Functor");
var FormURLEncoded = function (x) {
    return x;
};
var toArray = function (v) {
    return v;
};
var genericFormUrlEncoded = new Data_Generic.Generic(function (v) {
    if (v instanceof Data_Generic.SProd && (v.value0 === "Data.FormURLEncoded.FormURLEncoded" && v.value1.length === 1)) {
        return Control_Apply.apply(Data_Maybe.applyMaybe)(new Data_Maybe.Just(FormURLEncoded))(Data_Generic.fromSpine(Data_Generic.genericArray(Data_Generic.genericTuple(Data_Generic.genericString)(Data_Generic.genericMaybe(Data_Generic.genericString))))(v.value1[0](Data_Unit.unit)));
    };
    return Data_Maybe.Nothing.value;
}, function ($dollarq) {
    return new Data_Generic.SigProd("Data.FormURLEncoded.FormURLEncoded", [ {
        sigConstructor: "Data.FormURLEncoded.FormURLEncoded", 
        sigValues: [ function ($dollarq1) {
            return Data_Generic.toSignature(Data_Generic.genericArray(Data_Generic.genericTuple(Data_Generic.genericString)(Data_Generic.genericMaybe(Data_Generic.genericString))))(Data_Generic.anyProxy);
        } ]
    } ]);
}, function (v) {
    return new Data_Generic.SProd("Data.FormURLEncoded.FormURLEncoded", [ function ($dollarq) {
        return Data_Generic.toSpine(Data_Generic.genericArray(Data_Generic.genericTuple(Data_Generic.genericString)(Data_Generic.genericMaybe(Data_Generic.genericString))))(v);
    } ]);
});
var showFormUrlEncoded = new Data_Show.Show(Data_Generic.gShow(genericFormUrlEncoded));
var fromArray = FormURLEncoded;
var eqFormUrlEncoded = new Data_Eq.Eq(function (v) {
    return function (v1) {
        return Data_Eq.eq(Data_Eq.eqArray(Data_Tuple.eqTuple(Data_Eq.eqString)(Data_Maybe.eqMaybe(Data_Eq.eqString))))(v)(v1);
    };
});
var ordFormUrlEncoded = new Data_Ord.Ord(function () {
    return eqFormUrlEncoded;
}, function (v) {
    return function (v1) {
        return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(Data_Maybe.ordMaybe(Data_Ord.ordString))))(v)(v1);
    };
});
var encode = (function () {
    var encodePart = function (v) {
        if (v.value1 instanceof Data_Maybe.Nothing) {
            return Global["encodeURIComponent"](v.value0);
        };
        if (v.value1 instanceof Data_Maybe.Just) {
            return Global["encodeURIComponent"](v.value0) + ("=" + Global["encodeURIComponent"](v.value1.value0));
        };
        throw new Error("Failed pattern match at Data.FormURLEncoded line 44, column 5 - line 44, column 56: " + [ v.constructor.name ]);
    };
    return function ($26) {
        return Data_String.joinWith("&")(Data_Functor.map(Data_Functor.functorArray)(encodePart)(toArray($26)));
    };
})();
module.exports = {
    encode: encode, 
    fromArray: fromArray, 
    toArray: toArray, 
    genericFormUrlEncoded: genericFormUrlEncoded, 
    eqFormUrlEncoded: eqFormUrlEncoded, 
    ordFormUrlEncoded: ordFormUrlEncoded, 
    showFormUrlEncoded: showFormUrlEncoded
};
