github / semantic

Parsing, analyzing, and comparing source code across many languages
8.94k stars 454 forks source link

Semantic as a library #645

Closed dciug closed 3 years ago

dciug commented 3 years ago

Is there any way to use Semantic as a library? Right now, I'm using semantic as an external executable, and capturing the output using readProcess and https://hackage.haskell.org/package/semantic-source.

Thanks.

patrickt commented 3 years ago

Though I think your solution is pretty good, there’s nothing stopping you from using this as a library (except the fact that we haven’t uploaded this to Hackage). I would probably start by looking at Semantic.Task. I’m going to close this now, but feel free to leave comments if you run into trouble.