History

Some tiny updates

Most importantly: Case operators should not be inlined indiscriminately, because that might duplicate work (e.g. via a variable pattern for the scrutinee, where the variable is used more than once)

Edwin Brady committed 6 years ago

Commit b0d640f1 parent 25843793 files · +6 −4Browse files

Showing the changes to src/Text (1 of 3 files). Show all

Unified · Split

src/Text/Parser/Core.idr+2−2
@@ -31,7 +31,7 @@ data Grammar : (tok : Type) -> (consumes : Bool) -> Type -> Type where · 30 unmodified lines
3131 Grammar tok c1 a -> (a -> Grammar tok c2 b) ->
3232 Grammar tok (c1 || c2) b
3333 Alt : {c1, c2 : Bool} ->
34− Grammar tok c1 ty -> Grammar tok c2 ty ->
34+ Grammar tok c1 ty -> Lazy (Grammar tok c2 ty) ->
3535 Grammar tok (c1 && c2) ty
3636
3737 ||| Sequence two grammars. If either consumes some input, the sequence is
@@ -69,7 +69,7 @@ join {c1 = True} p = SeqEat p id · 31 unmodified lines
6969 export
7070 (<|>) : {c1,c2 : Bool} ->
7171 Grammar tok c1 ty ->
72− Grammar tok c2 ty ->
72+ Lazy (Grammar tok c2 ty) ->
7373 Grammar tok (c1 && c2) ty
7474 (<|>) = Alt
7575

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t