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
- Host: GitHub
- URL: https://github.com/romac/fixity-decl
- Owner: romac
- License: bsd-3-clause
- Created: 2016-12-17T22:10:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-24T12:51:22.000Z (over 8 years ago)
- Last Synced: 2025-04-12T13:19:04.622Z (about 1 month ago)
- Topics: haskell, megaparsec
- Language: Haskell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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))))