archambaultv / sexpresso Goto Github PK
View Code? Open in Web Editor NEWFlexible Haskell library for parsing and printing S-Expressions
License: Other
Flexible Haskell library for parsing and printing S-Expressions
License: Other
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
|
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.
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?
The documentation states that foo (x ::: xs)
is equivalent to foo (SList _ (SAtom x : xs))
but this is false. It is equivalent to foo (SList b (SAtom x : ys))
with xs = SList b ys
.
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) ""
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.