Coder Social home page Coder Social logo

sexpresso's People

Contributors

0xd34df00d avatar archambaultv avatar chris-martin avatar hanstolpo avatar ocharles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sexpresso's Issues

Cannot build with `megaparsec` 9

src/Data/SExpresso/Parse/Location.hs:47:12: error:
    • Could not deduce (TraversableStream s)
        arising from a use of ‘getSourcePos’
      from the context: MonadParsec e s m
        bound by the type signature for:
                   located :: forall e s (m :: * -> *) a.
                              MonadParsec e s m =>
                              m a -> m (Located a)
        at src/Data/SExpresso/Parse/Location.hs:45:1-54
      Possible fix:
        add (TraversableStream s) to the context of
          the type signature for:
            located :: forall e s (m :: * -> *) a.
                       MonadParsec e s m =>
                       m a -> m (Located a)
    • In a stmt of a 'do' block: begin <- getSourcePos
      In the expression:
        do begin <- getSourcePos
           result <- parser
           end <- getSourcePos
           return $ At (Span begin end) result
      In an equation for ‘located’:
          located parser
            = do begin <- getSourcePos
                 result <- parser
                 end <- getSourcePos
                 ....
   |
47 |   begin <- getSourcePos
   |

Add recursion scheme for SExpr

Recursion scheme based on the recursion-scheme package.

Also consider modifying the withLocation function so that location information is added as a recursion scheme instead of modifying the b and a parameter.

Maintainership request

Hi @archambaultv, I just saw

If you wish to take over the project please contact me.

As we actively use sexpresso at work I'm interested in keeping it buildable. We don't anticipate needing any changes, so I'd like to request to be a co-maintainer so I can do basic tasks like adjusting version bounds and uploading to Hackage. If you're interested in this, could you add me as a collaborator to this GitHub repository, and grant OliverCharles maintainer rights on Hackage?

r5rs & negative numbers

hello - in the test below "-1" won't parse? - it says "The previous two atoms are not separated by space" - i think r5rs scheme allows this? - ie. writing negative numbers without applying unary negate as (- 1) - best, rd

import Data.Void {- base -}

import qualified Text.Megaparsec as M {- megaparsec -}

import qualified Data.SExpresso.Parse as S {- sexpresso -}
import qualified Data.SExpresso.SExpr as S {- sexpresso -}
import qualified Data.SExpresso.Language.SchemeR5RS as S {- sexpresso -}

-- > parse_sexp "-1"
parse_sexp :: String -> Either (M.ParseErrorBundle String Void) [S.SExpr S.SExprType S.SchemeToken]
parse_sexp = M.parse (S.decode S.sexpr) ""

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.