Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird gibberish inlined #20

Open
xarvh opened this issue Sep 30, 2016 · 1 comment
Open

Weird gibberish inlined #20

xarvh opened this issue Sep 30, 2016 · 1 comment

Comments

@xarvh
Copy link

xarvh commented Sep 30, 2016

Given the input file Common.elm:

module Common exposing (..)

type alias Id =
    Int

type alias EmpireId =
    Id

type alias Empire =
    { id : EmpireId
    , name : String
    }

Running

python generate.py Common.elm

yields

decodeId =    Inttype alias EmpireId =    Idtype alias Empire : Json.Decode.Decoder Id =    Inttype alias EmpireId =    Idtype alias Empire
decodeId =    Inttype alias EmpireId =    Idtype alias Empire =
    Json.Decode.succeed Id =    Inttype alias EmpireId =    Idtype alias Empire
        |: ("id" := decodeEmpireid)
        |: ("name" := Json.Decode.string)
encodeId =    Inttype alias EmpireId =    Idtype alias Empire : Id =    Inttype alias EmpireId =    Idtype alias Empire -> Json.Encode.Value
encodeId =    Inttype alias EmpireId =    Idtype alias Empire record =
    Json.Encode.object
        [ ("id", encodeEmpireid record.id)
        , ("name", Json.Encode.string record.name)
        ]

Not sure if I'm doing something wrong o_O

@eeue56
Copy link
Owner

eeue56 commented Oct 3, 2016

not sure why this is happening and I don't have time to look right now. It looks like you have multiple read/writes happening to the file at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants