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
31 Grammar tok c1 a -> (a -> Grammar tok c2 b) ->31 Grammar tok c1 a -> (a -> Grammar tok c2 b) ->
32 Grammar tok (c1 || c2) b32 Grammar tok (c1 || c2) b
33 Alt : {c1, c2 : Bool} ->33 Alt : {c1, c2 : Bool} ->
34 Grammar tok c1 ty -> Grammar tok c2 ty ->34 Grammar tok c1 ty -> Lazy (Grammar tok c2 ty) ->
35 Grammar tok (c1 && c2) ty35 Grammar tok (c1 && c2) ty
36 36
37||| Sequence two grammars. If either consumes some input, the sequence is37||| 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
69export69export
70(<|>) : {c1,c2 : Bool} -> 70(<|>) : {c1,c2 : Bool} ->
71 Grammar tok c1 ty ->71 Grammar tok c1 ty ->
72 Grammar tok c2 ty ->72 Lazy (Grammar tok c2 ty) ->
73 Grammar tok (c1 && c2) ty73 Grammar tok (c1 && c2) ty
74(<|>) = Alt74(<|>) = Alt
75 75

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