Commit 3dd984e5 authored by Camil Staps's avatar Camil Staps 🍃

Add getBasicResult

parent 60c8eb36
......@@ -314,5 +314,7 @@ instance < Result
instance == FunctionKind
getBasicResult :: Result -> Maybe BasicResult
toSingleLine :: !Request -> Maybe String
parseSingleLineRequest :: !String -> MaybeErrorString Request
......@@ -135,6 +135,15 @@ where
instance == FunctionKind where == a b = a === b
getBasicResult :: Result -> Maybe BasicResult
getBasicResult (FunctionResult (br,_)) = Just br
getBasicResult (TypeResult (br,_)) = Just br
getBasicResult (ClassResult (br,_)) = Just br
getBasicResult (ModuleResult (br,_)) = Just br
getBasicResult (SyntaxResult (br,_)) = Just br
getBasicResult (ABCInstructionResult (br,_)) = Just br
getBasicResult (ProblemResult _) = Nothing
parseSingleLineRequest :: !String -> MaybeErrorString Request
parseSingleLineRequest s = case split "::" s of
["",type] -> Ok {zero & unify=Just $ trim type}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment