An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

hackage.haskell.org : fn

A Haskell web framework where you write plain old functions. Provided you have stack installed, you can run this example like a shell script (it'll listen on port 3000): Fn lets you write web code that just looks like normal Haskell code. An application has some "context", which must contain a Request, but can contain other data as well, like database connection pools, etc. This context will be passed to each of your handlers, updated with the current HTTP Request. Routes are declared to capture parameters and/or segments of the url, and then routed to handler functions that have the appropriate number and type of arguments. These functions return IO (Maybe Response), where Nothing indicates to Fn that you want it to keep looking for matching routes. All handlers just use plain old IO, which means it is easy to call them from GHCi, forkIO, etc. All of this is a small wrapper around the WAI interface, so you have the flexilibility to do anything you need to do with HTTP. The name comes from the fact that Fn emphasizes functions (over monads), where all necessary data is passed via function arguments, and control flow is mediated by return values.

Registry - Source - Homepage - JSON - codemeta.json
purl: pkg:hackage/fn
Keywords: library , web , Propose Tags , functional , haskell , web-framework
License: ISC
Latest release: over 8 years ago
First release: over 10 years ago
Dependent repositories: 25
Downloads: 9,148 total
Stars: 34 on GitHub
Forks: 7 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 9 hours ago