add namespaces to names
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
module Auto
|
||||
|
||||
ptype String
|
||||
ptype Int
|
||||
|
||||
pfunc i2s : Int -> String := `(i) => ''+i`
|
||||
pfunc _++_ : String -> String -> String := `(a,b) => a + b`
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ module Auto2
|
||||
ptype World
|
||||
pfunc log : {A : U} -> A -> World := `(_, a) => console.log(a)`
|
||||
|
||||
ptype Int
|
||||
|
||||
pfunc i_plus : Int -> Int -> Int := `(x,y) => x + y`
|
||||
|
||||
data Nat : U where
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Let
|
||||
|
||||
ptype Int
|
||||
|
||||
|
||||
foo : Int -> Int
|
||||
foo n = let x = 42 in x
|
||||
|
||||
@@ -14,8 +14,8 @@ module Oper
|
||||
infixl 8 _+_ _-_
|
||||
infixl 9 _*_ _/_
|
||||
|
||||
ptype Int
|
||||
ptype String
|
||||
|
||||
|
||||
ptype JVoid
|
||||
|
||||
-- If we had a different quote here, we could tell vscode it's javascript.
|
||||
|
||||
@@ -5,7 +5,7 @@ module TestCase
|
||||
|
||||
-- There are indexes below, but we're got pulling constraints out of them yet.
|
||||
|
||||
ptype Int
|
||||
|
||||
|
||||
data Nat : U where
|
||||
Z : Nat
|
||||
|
||||
@@ -51,7 +51,7 @@ transpose : {a : U} {m n : Nat} -> Vect m (Vect n a) -> Vect n (Vect m a)
|
||||
transpose {a} {Z} {n} Nil = vec n Nil
|
||||
transpose {a} {S z} {n} (_::_ {a'} {j} x xs) = zipWith (_::_) x (transpose xs)
|
||||
|
||||
ptype Int
|
||||
|
||||
|
||||
myArr : Vect (S (S (S Z))) (Vect (S (S Z)) Int)
|
||||
myArr = (1 :: 2 :: Nil) :: (3 :: 4 :: Nil) :: (5 :: 6 :: Nil) :: Nil
|
||||
|
||||
@@ -9,7 +9,7 @@ infixl 7 _+_
|
||||
_+_ : {A : U} {{_ : Plus A}} -> A -> A -> A
|
||||
_+_ {{MkPlus plus}} x y = plus x y
|
||||
|
||||
ptype Int
|
||||
|
||||
pfunc plusInt : Int -> Int -> Int := `(x,y) => x + y`
|
||||
|
||||
PlusInt : Plus Int
|
||||
|
||||
@@ -4,8 +4,8 @@ module TestPrim
|
||||
-- we need to be able to declare a primitive type
|
||||
-- distinct from inductive type. there are no constructors per-se but it is inhabited
|
||||
|
||||
ptype String
|
||||
ptype Int
|
||||
|
||||
|
||||
|
||||
pfunc strlen : String -> Int := `(x) => x.length()`
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ infixr 1 _,_
|
||||
data Pair : U -> U -> U where
|
||||
_,_ : ∀ A B. A -> B -> Pair A B
|
||||
|
||||
ptype Int
|
||||
|
||||
|
||||
test : Maybe Int
|
||||
test = pure 10
|
||||
|
||||
@@ -2,8 +2,8 @@ module Zoo1
|
||||
|
||||
-- I'm starting to translate ezoo 01-eval-closures-debruijn as a test cases.
|
||||
|
||||
ptype Int
|
||||
ptype String
|
||||
|
||||
|
||||
|
||||
------- Prelude stuff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user