Skip to content

bowsersenior/elmi-to-json

 
 

Repository files navigation

elmi-to-json

module Lambda exposing (f)


f : a -> b -> a
f a _ =
    a
[
  {
    "unions": {},
    "aliases": {},
    "types": {
      "f": {
        "annotation": {
          "lambda": [
            {
              "name": "a",
              "type": "Var"
            },
            {
              "name": "b",
              "type": "Var"
            },
            {
              "name": "a",
              "type": "Var"
            }
          ]
        },
        "vars": [
          "a",
          "b"
        ]
      }
    },
    "binops": {}
  }
]

Usage

npm install -g elmi-to-json
elm make src/Main.elm
elmi-to-json

TODO

  • setup travis for generating bins
  • setup npm

---- cleanup

module Union exposing (Person, foo)


foo : ( Int, Int, Int ) -> ( Int, Int )
foo ( a, b, _ ) =
    ( a, b )


type alias Person =
    { name : String, email : String }
[
  {
    "unions": {},
    "aliases": {
      "Person": {
        "alias": {
          "name": null,
          "type": "Record",
          "fields": {
            "email": {
              "moduleName": {
                "module": "String",
                "package": "elm-lang/core"
              },
              "types": [],
              "name": "String",
              "type": "Type"
            },
            "name": {
              "moduleName": {
                "module": "String",
                "package": "elm-lang/core"
              },
              "types": [],
              "name": "String",
              "type": "Type"
            }
          }
        },
        "vars": []
      }
    },
    "types": {
      "foo": {
        "annotation": {
          "lambda": [
            {
              "_3": {
                "moduleName": {
                  "module": "Basics",
                  "package": "elm-lang/core"
                },
                "types": [],
                "name": "Int",
                "type": "Type"
              },
              "_2": {
                "moduleName": {
                  "module": "Basics",
                  "package": "elm-lang/core"
                },
                "types": [],
                "name": "Int",
                "type": "Type"
              },
              "type": "Tuple",
              "_1": {
                "moduleName": {
                  "module": "Basics",
                  "package": "elm-lang/core"
                },
                "types": [],
                "name": "Int",
                "type": "Type"
              }
            },
            {
              "_2": {
                "moduleName": {
                  "module": "Basics",
                  "package": "elm-lang/core"
                },
                "types": [],
                "name": "Int",
                "type": "Type"
              },
              "type": "Tuple",
              "_1": {
                "moduleName": {
                  "module": "Basics",
                  "package": "elm-lang/core"
                },
                "types": [],
                "name": "Int",
                "type": "Type"
              }
            }
          ]
        },
        "vars": []
      }
    },
    "binops": {}
  }
]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 94.3%
  • Shell 3.4%
  • JavaScript 2.3%