dce
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
Need eval for case.
|
- Support primitives
|
||||||
|
- Make DCon/TCon separate from Ref? (Or add flavor to VRef/Ref? If processing is often the same. I think I want arity though. I don't think a checked DCon can be overapplied, but it could be underapplied without special form. And special form is possibly difficult if not collecting a stack on the way down...
|
||||||
|
|
||||||
|
|
||||||
Need to typecheck case - learning stuff like `n = S k` is not happening and the final bit of the data constructor doesn't unify with the data type, because we're not handling `Bnd n =?= Val`. Cockx collects a list of constraints. We might want flags on unification to enable that?
|
Need to typecheck case - learning stuff like `n = S k` is not happening and the final bit of the data constructor doesn't unify with the data type, because we're not handling `Bnd n =?= Val`. Cockx collects a list of constraints. We might want flags on unification to enable that?
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,6 @@ data Pattern
|
|||||||
public export
|
public export
|
||||||
data RCaseAlt = MkAlt Raw Raw
|
data RCaseAlt = MkAlt Raw Raw
|
||||||
|
|
||||||
-- FC = MkPair Int Int
|
|
||||||
|
|
||||||
|
|
||||||
data Raw : Type where
|
data Raw : Type where
|
||||||
RVar : FC -> (nm : Name) -> Raw
|
RVar : FC -> (nm : Name) -> Raw
|
||||||
RLam : FC -> (nm : String) -> (icit : Icit) -> (ty : Raw) -> Raw
|
RLam : FC -> (nm : String) -> (icit : Icit) -> (ty : Raw) -> Raw
|
||||||
@@ -67,11 +64,6 @@ getFC (RParseError fc str) = fc
|
|||||||
public export
|
public export
|
||||||
data Decl : Type where
|
data Decl : Type where
|
||||||
|
|
||||||
Telescope: Type
|
|
||||||
Telescope = List Decl -- pi-forall, always typeSig?
|
|
||||||
|
|
||||||
data ConstrDef = MkCDef Name Telescope
|
|
||||||
|
|
||||||
data Decl
|
data Decl
|
||||||
= TypeSig FC Name Raw
|
= TypeSig FC Name Raw
|
||||||
| Def FC Name Raw
|
| Def FC Name Raw
|
||||||
@@ -102,11 +94,6 @@ implementation Show Raw
|
|||||||
export
|
export
|
||||||
implementation Show Decl
|
implementation Show Decl
|
||||||
|
|
||||||
covering
|
|
||||||
Show ConstrDef where
|
|
||||||
show (MkCDef str xs) = foo ["MkCDef", show str, show xs]
|
|
||||||
|
|
||||||
|
|
||||||
covering
|
covering
|
||||||
Show Decl where
|
Show Decl where
|
||||||
show (TypeSig _ str x) = foo ["TypeSig", show str, show x]
|
show (TypeSig _ str x) = foo ["TypeSig", show str, show x]
|
||||||
|
|||||||
@@ -41,6 +41,17 @@ Show BD where
|
|||||||
show Bound = "bnd"
|
show Bound = "bnd"
|
||||||
show Defined = "def"
|
show Defined = "def"
|
||||||
|
|
||||||
|
|
||||||
|
-- do we just admit string names for these and let the prim functions
|
||||||
|
-- sort it out?
|
||||||
|
-- I'd like Int / String to have syntax
|
||||||
|
|
||||||
|
data PrimType = StringType | IntType
|
||||||
|
|
||||||
|
data PrimVal : Type where
|
||||||
|
PrimString : String -> PrimVal
|
||||||
|
PrimInt : Int -> PrimVal
|
||||||
|
|
||||||
public export
|
public export
|
||||||
data Tm : Type
|
data Tm : Type
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user