An open API service indexing awesome lists of open source software.

https://github.com/romac/fixity-decl

🚧 User-defined fixity declarations with Megaparsec
https://github.com/romac/fixity-decl

haskell megaparsec

Last synced: about 1 month ago
JSON representation

🚧 User-defined fixity declarations with Megaparsec

Awesome Lists containing this project

README

        

> Just an experiment in handling Haskell-style user-defined fixity declarations with Megaparsec.

`test.fd`
```haskell
prefix -
postfix ++
infixl 6 +
infix ==
infixr 2 :
infixl !!

1+2 : 2+3 : -4 + 5++ : -6 : 123
```

$ stack exec fixity-decl -- test.fd
((1 + 2) : ((2 + 3) : (((- 4) + (++ 5)) : ((- 6) : 123))))