wip
This commit is contained in:
parent
1f973384cb
commit
38616c4aa1
|
@ -44,9 +44,9 @@ outputs = { self, nixpkgs, haskell-flake-utils, ... }@inputs:
|
|||
# shell = ./shell.nix
|
||||
|
||||
# Additional build intputs of the default shell
|
||||
# shellExtBuildInputs = {pkgs}: with pkgs; [
|
||||
# haskellPackages.haskell-language-server
|
||||
# ];
|
||||
shellExtBuildInputs = {pkgs}: with pkgs; [
|
||||
haskellPackages.haskell-language-server
|
||||
];
|
||||
|
||||
# Wether to build hoogle in the default shell
|
||||
# shellWithHoogle = true;
|
||||
|
|
|
@ -161,20 +161,24 @@ parseSyntax :: forall c . MegaConstraints c
|
|||
parseSyntax = parse (merely (syntax sc)) "input"
|
||||
|
||||
top :: forall c . MegaConstraints c => Parser [Syntax c]
|
||||
top = sc >> many (topStmt <|> syntax scTop)
|
||||
|
||||
topStmt :: forall c . MegaConstraints c => Parser (Syntax c)
|
||||
topStmt = do
|
||||
scTop
|
||||
top = many $ do
|
||||
t <- topStmt
|
||||
sc
|
||||
pure t
|
||||
|
||||
topTerm :: forall c . MegaConstraints c => Parser (Syntax c)
|
||||
topTerm = do
|
||||
sc
|
||||
co <- MegaContext . Just <$> getOffset
|
||||
|
||||
s0 <- symbol scTop
|
||||
ss <- many (syntax scTop)
|
||||
|
||||
void eol <|> eof
|
||||
pure $ List co (s0:ss)
|
||||
|
||||
topStmt :: forall c . MegaConstraints c => Parser (Syntax c)
|
||||
topStmt = topTerm <|> syntax scTop
|
||||
|
||||
parseTop :: forall c . MegaConstraints c
|
||||
=> String -> Either ParseFail [Syntax c]
|
||||
|
||||
|
|
Loading…
Reference in New Issue