servant VS semantic-source

Compare servant vs semantic-source and see what are their differences.

servant

Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! (by haskell-servant)

semantic-source

Parsing, analyzing, and comparing source code across many languages (by github)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
servant semantic-source
16 23
1,768 8,858
0.4% 0.3%
7.5 9.1
6 days ago about 1 month ago
Haskell Haskell
BSD 3-clause "New" or "Revised" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

servant

Posts with mentions or reviews of servant. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-07.
  • An alternative front end for Haskell?
    3 projects | news.ycombinator.com | 7 Oct 2023
    > do you really have to understand language extensions?

    You do when your code doesn't compile and you're trying to figure out what the error message means, or when the library you want to use makes heavy use of it for even basic functionality.

    > These days one just enables GHC2021

    My experience was pre-GHC2021. I basically had to enable at a minimum 5-6 language extensions in every single file.

    > Mostly they're just about removing unnecessary restrictions from the older standard.

    Yeah, those ones are usually fine. I have zero objection to things like FlexibleInstances or DeriveFoldable.

    > Could you give an example?

    I believe I was trying to implement Central Authentication Service using Servant. However, that required returning a custom HTTP status code. There has been an open Github issue for this since 2017, but it seems to require basically rewriting the entire framework: https://github.com/haskell-servant/servant/issues/732

    Looking back at it now Servant does have "ServerError", but that basically requires giving up all the advantages Servant claims to have and I believe it was not a viable option at the time. Looking at the timeline I was probably also on Servant 0.15, and there seems to have been a rewrite since then.

    I vaguely recall running into a similar issue trying to interact with a database, but I can't remember the details of that.

  • Question: Servant with NamedRoutes and Swagger
    1 project | /r/haskell | 25 Nov 2022
    a HasSwagger instance for NamedRoutes was added in May 2022 (in this commit) but there hasn't been a package release since March
  • Monthly Hask Anything (November 2022)
    3 projects | /r/haskell | 1 Nov 2022
    If you don't like this style, the usual alternative is to change mkDualAuthHandler to take two additional arguments, Proxy tag0 and Proxy tag1 (as e.g. lots of Servant functions do, for historical reasons).
  • How introduce `ResourceT` into my stack
    3 projects | /r/haskell | 14 Oct 2022
    Dunno if this is helpful, but I found this github issue about ResourceT and servant https://github.com/haskell-servant/servant/issues/1345
  • Introduction to Doctests in Haskell
    6 projects | /r/haskell | 19 Apr 2022
    And what about the cabal repl --with-compiler=doctest, which was added recently, in doctest v0.20? I recently submitted a PR for Servant to use this in place of GHC environment files, because it seems less finicky to me. Was this a bad idea?
  • Generate Typescript from Servant API
    5 projects | /r/haskell | 15 Mar 2022
    I asked a somewhat relevant question recently. Maybe you'll find this discussion somewhat helpful: https://github.com/haskell-servant/servant/issues/1547; two packages were talked about. One of the folks from Well Typed replied, and said they tried it recently (and worked fine).
  • Named Routes in Servant
    3 projects | /r/haskell | 9 Mar 2022
  • [ANN] Servant 0.19 release
    1 project | /r/haskell | 2 Feb 2022
    You are highly encouraged to test this release out and let us know what you think ! For bug reports, features requests or any kind of feedback, just open a ticket on our issue tracker.
  • [Servant] Best practices to not mixup routes with same signatures.
    1 project | /r/haskell | 5 Aug 2021
    Even slower than :<|> quadratic compile time in number of routes?
  • Help with servant-client
    1 project | /r/haskell | 30 Apr 2021
    Check this out https://github.com/haskell-servant/servant/issues/335#issuecomment-172300487

semantic-source

Posts with mentions or reviews of semantic-source. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-13.
  • The Meaning of Monad in MonadTrans
    2 projects | news.ycombinator.com | 13 Aug 2023
    One production example I know: GitHub code navigation is written in Haskell https://github.com/github/semantic
  • Semantic: Parsing, analyzing, and comparing source code across many languages
    1 project | news.ycombinator.com | 28 May 2023
  • How to Get Started with Tree-Sitter
    3 projects | news.ycombinator.com | 28 May 2023
    ah, easy. it's because support has not been added into https://github.com/github/semantic which is the tech that powers the GitHub UI. Adding support is pretty easy/mainly glue code [1] that imports the tree sitter API.

    [1] https://github.com/github/semantic/blob/793a876ae45d38a6bd17...

  • Scala community now has control over the official Scala grammar for tree-sitter 🎉
    3 projects | /r/scala | 3 Jan 2023
  • 2022 State of Haskell Survey
    6 projects | news.ycombinator.com | 3 Nov 2022
  • 11 Companies That Use Haskell in Production
    7 projects | dev.to | 4 May 2022
    GitHub used Haskell for implementing Semantic, a command-line tool for parsing, analyzing, and comparing source code.
  • What happened with GitHub's semantic project?
    3 projects | /r/haskell | 29 Jan 2022
    As far as engineering effort, you can read this GitHub comment for an overview of where we’d like to take the project in the future. The tl;dr here is that the open sum type view of the world made it very concise to fold over syntax trees (since such a view of data is ultimately unityped, recursion schemes Just Work), but the tradeoff thus associated—namely, that you have to parse a concrete syntax tree into an open-sum view (a complicated and painful-to-read process), that you can never really be sure how a given syntax tree is shaped, and that the types don’t help you nearly as much as they could—proved to be too onerous to deal with. Going forward, we’re generating syntax types from the AST once per target language, and working on an abstraction (probably via this generated code; I made five separate efforts at using Generics for this, and failed every time) that recovers at least some of the convenience of recursion schemes. It turns out that recursion schemes over a mutually recursive syntax tree—as pretty much every language’s syntax trees are, in practice—are pretty much an unsolved problem, especially when extended to languages like TypeScript, which have hundreds of different syntax nodes.
  • Stack Graphs
    6 projects | news.ycombinator.com | 9 Dec 2021
    Meanwhile their Tree-Sitter-based semantic parser[1] looks abandoned. There is even rotting for years pull request[2] adding support of the same stack graphs into it.

    [1] https://github.com/github/semantic

    [2] https://github.com/github/semantic/pull/535

  • Cardano relying on Haskell is not bad at all
    1 project | /r/cardano | 30 Nov 2021
    The semantic team at GitHub uses it for statically analyzing the dozens of languages that end up in GitHub repositories: https://github.com/github/semantic/blob/eaf13783838861fe5eb6cd46d59354774a8eb88d/docs/why-haskell.md
  • 7 Useful Tools Written in Haskell
    1 project | /r/functionalprogramming | 3 Nov 2021
    Yesterday I was looking for some examples of projects using tree-sitter (which is C) when I found GitHub's semantic, used to analyze and compare source code, and written in Haskell: https://github.com/github/semantic/

What are some alternatives?

When comparing servant and semantic-source you can also consider the following projects:

servant-ts - See the docs and live playground here

diffsitter - A tree-sitter based AST difftool to get meaningful semantic diffs

graphql - Haskell GraphQL implementation

massiv - Efficient Haskell Arrays featuring Parallel computation

loli

refined - Refinement types with static checking

swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

cantor-pairing - Convert data to and from a natural number representation

gc-monitoring-wai - a wai application to show `GHC.Stats.GCStats`

jump - Jump start your Haskell development

servant-blaze

Glean - System for collecting, deriving and working with facts about source code.