This commit is contained in:
2025-07-18 20:47:45 -04:00
parent bb2ae861b3
commit 800cec28de
9 changed files with 86 additions and 64 deletions

View File

@@ -92,8 +92,8 @@ fcCol (MkFC file (l, c)) = c
class HasFC a where
getFC : a -> FC
primNS : List String
primNS = ("Prim" :: Nil)
emptyFC : FC
emptyFC = MkFC "" (0,0)

View File

@@ -1162,9 +1162,9 @@ buildLitCases ctx prob fc scnm scty = do
-- If we lookupRaw "String", we could get different answers in different contexts.
-- maybe Hardwire this one
stringType intType charType : QName
stringType = QN ("Prim" :: Nil) "String"
intType = QN ("Prim" :: Nil) "Int"
charType = QN ("Prim" :: Nil) "Char"
stringType = QN primNS "String"
intType = QN primNS "Int"
charType = QN primNS "Char"
litTyName : Literal -> QName
litTyName (LString str) = stringType
@@ -1213,6 +1213,8 @@ buildTree ctx prob@(MkProb ((MkClause fc constraints Nil expr) :: cs) ty) = do
-- If we try on creation, we're looping at the moment, because of the possibility
-- of Ord a -> Ord b -> Ord (a \x b). Need to cut earlier when solving or switch to
-- Idris method...
-- This is necessary for tests/InferenceIssue.newt
-- solveAutos below is the important part
scty' <- case scty' of
(VMeta fc1 ix sp) => do
meta <- lookupMeta ix

View File

@@ -21,9 +21,6 @@ import Lib.Syntax
import Node
import Serialize
primNS : List String
primNS = ("Prim" :: Nil)
jsonTopContext : M Json
jsonTopContext = do
top <- getTop