Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: start recovering errors locally instead of at the top level #177

Merged
merged 5 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,145 @@
]
, aexps =
[ Typed
([] :=> TVar (TV (-1) Star))
([] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "String" Star) "prelude"))
(TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "Integer" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude")))
(Area (Loc 0 1 1) (Loc 58 2 24))
(TypedExp
(Typed
([] :=> TVar (TV (-1) Star))
([] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "String" Star) "prelude"))
(TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "Integer" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude")))
(Area (Loc 35 2 1) (Loc 58 2 24))
(Assignment
"fn"
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "String" Star) "prelude"))
(TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "String" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude")))
(Area (Loc 40 2 6) (Loc 58 2 24))
(Abs
(Typed
([] :=> TVar (TV (-1) Star)) (Area (Loc 41 2 7) (Loc 42 2 8)) "a")
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TCon (TC "String" Star) "prelude")
(Area (Loc 41 2 7) (Loc 42 2 8))
"a")
[ Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TCon (TC "String" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude"))
(Area (Loc 40 2 6) (Loc 58 2 24))
(Abs
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TCon (TC "String" Star) "prelude")
(Area (Loc 44 2 10) (Loc 45 2 11))
"b")
[ Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TCon (TC "Boolean" Star) "prelude")
(Area (Loc 51 2 17) (Loc 57 2 23))
(App
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TApp
(TApp
(TCon
(TC "(->)" (Kfun Star (Kfun Star Star)))
"prelude")
(TCon (TC "String" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude"))
(Area (Loc 51 2 17) (Loc 57 2 23))
(App
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
Nothing
] :=>
TApp
(TApp
(TCon
(TC
"(->)" (Kfun Star (Kfun Star Star)))
"prelude")
(TCon (TC "String" Star) "prelude"))
(TApp
(TApp
(TCon
(TC
"(->)"
(Kfun Star (Kfun Star Star)))
"prelude")
(TCon (TC "String" Star) "prelude"))
(TCon (TC "Boolean" Star) "prelude")))
(Area (Loc 53 2 19) (Loc 55 2 21))
(Var "==" False))
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TCon (TC "String" Star) "prelude")
(Area (Loc 51 2 17) (Loc 52 2 18))
(Var "a" False))
False))
(Typed
([] :=> TVar (TV (-1) Star))
([ IsIn
"Eq"
[ TCon (TC "String" Star) "prelude" ]
(Just (Area (Loc 53 2 19) (Loc 55 2 21)))
] :=>
TCon (TC "String" Star) "prelude")
(Area (Loc 56 2 22) (Loc 57 2 23))
(Var "b" False))
True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,48 @@
]
, aexps =
[ Typed
([] :=> TVar (TV (-1) Star))
([] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TApp
(TCon (TC "List" (Kfun Star Star)) "prelude")
(TCon (TC "String" Star) "prelude")))
(TCon (TC "{}" Star) "prelude"))
(Area (Loc 0 1 1) (Loc 71 8 2))
(TypedExp
(Typed
([] :=> TVar (TV (-1) Star))
([] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TApp
(TCon (TC "List" (Kfun Star Star)) "prelude")
(TCon (TC "String" Star) "prelude")))
(TCon (TC "{}" Star) "prelude"))
(Area (Loc 0 1 1) (Loc 71 8 2))
(Assignment
"main"
(Typed
([] :=> TVar (TV (-1) Star))
([] :=>
TApp
(TApp
(TCon (TC "(->)" (Kfun Star (Kfun Star Star))) "prelude")
(TApp
(TCon (TC "List" (Kfun Star Star)) "prelude")
(TCon (TC "String" Star) "prelude")))
(TCon (TC "{}" Star) "prelude"))
(Area (Loc 7 1 8) (Loc 71 8 2))
(Abs
(Typed
([] :=> TVar (TV (-1) Star)) (Area (Loc 70 8 1) (Loc 70 8 1)) "_")
([] :=>
TApp
(TCon (TC "List" (Kfun Star Star)) "prelude")
(TCon (TC "String" Star) "prelude"))
(Area (Loc 70 8 1) (Loc 70 8 1))
"_")
[ Typed
([] :=> TVar (TV (-1) Star))
([] :=> TCon (TC "String" Star) "prelude")
(Area (Loc 17 2 3) (Loc 69 7 4))
(If
(Typed
Expand Down
Loading
Loading