modulespection alternatives and similar packages
Based on the "Language" category.
Alternatively, view modulespection alternatives based on common mentions on social networks and blogs.
-
elm-compiler
Compiler for Elm, a functional language for reliable webapps. -
purescript
A strongly-typed language that compiles to JavaScript -
stylish-haskell
Haskell code prettifier [Moved to: https://github.com/haskell/stylish-haskell] -
haskell-src-exts
Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer -
haskell-tools-ast-fromghc
Developer tools for Haskell -
nirum
Nirum: IDL compiler and RPC/distributed object framework for microservices -
language-python
A parser for Python 2.x and 3.x written in Haskell -
liquid-fixpoint
Horn Clause Constraint Solving for Liquid Types -
elm-export
Create Elm types and JSON decoders from Haskell source. -
tal
An implementation of Typed Assembly Language (Morrisett, Walker, Crary, Glew) -
shentong
A Haskell implementation of the Shen programming language. -
camfort
Light-weight verification and transformation tools for Fortran -
language-c-quote
C/CUDA/OpenCL/Objective-C quasiquoting library. -
fortran-src
Fortran parsing and static analysis infrastructure -
aterm-utils
Utility functions for working with aterms as generated by Minitermite -
language-rust
Parser and pretty-printer for the Rust language -
language-ecmascript
Haskell library: ECMAScript parser, pretty-printer and additional tools -
formura
Describe stencil formurae without even translating them -
ministg
Ministg is an interpreter for a high-level, small-step, operational semantics for the STG machine.
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of modulespection or a related project?
README
modulespection
Template Haskell Module Introspection
Collect all of the declarations in a module using Template Haskell (via the GHC API).
One can either get all the names, or just the declarations (only type declarations are supported right now).
Here is a quick example:
import Language.Haskell.TH.Module.Magic (names)
data Test = Test Int
newtype OtherTest = OtherTest Test
someFunction :: String -> String
someFunction = id
-- 'names' is Template Haskell function that will collect all of the
-- toplevel declaration names of the current file.
names >>= runIO . print >> return []
Which will spew the following when compiling:
[Test,OtherTest,someFunction]
There is also declarations
which can be used, for example, to make sure that all
types have ToJSON
/FromJSON
instances.
import Data.Aeson.TH (deriveJSON, defaultOptions)
import MonadUtils (concatMapM)
import Language.Haskell.TH.Module.Magic (names)
data Test = Test Int
newtype OtherTest = OtherTest Test
concatMapM (deriveJSON defaultOptions) =<< names
Which will make JSON instances for Test
, OtherTest
and any other types
added to the file.
You can also do the same thing for an existing module.
import Data.Aeson.TH (deriveJSON, defaultOptions)
import MonadUtils (concatMapM)
import Language.Haskell.TH.Module.Magic (moduleNames)
import Data.Monoid
concatMapM (deriveJSON defaultOptions) =<< moduleNames "Data.Monoid"
Which will build instances for all the types in Data.Monoid
.