Created
January 3, 2020 13:02
-
-
Save AdamSaleh/72fccee2905785dea1787ee09b99998a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- check if is in record with no errors, use the types then | |
| isInRecord completionLeadup && (null completionsFromErrors) = do | |
t <- trace "IN RECORD" (return "") | |
expr <- loadFile uri | |
(welltyped, _) <- case typecheck expr of | |
Left _ -> throwE (Log, "Could not typecheck expression to complete, while there should be no errors.") | |
Right wt -> return wt | |
case typeAt (line,col) welltyped of | |
Right (_, typeExpr) -> return $ completeFromRecordType typeExpr | |
_ -> return [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment