Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created January 3, 2020 13:02
Show Gist options
  • Save AdamSaleh/72fccee2905785dea1787ee09b99998a to your computer and use it in GitHub Desktop.
Save AdamSaleh/72fccee2905785dea1787ee09b99998a to your computer and use it in GitHub Desktop.
-- 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