File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ processTypeSig ns fc names tm = do
115
115
ignore $ for names $ \nm => setDef (QN ns nm) fc ty Axiom Nil
116
116
117
117
118
-
119
118
processPrimType : List Name → FC → Name → Maybe Raw → M Unit
120
119
processPrimType ns fc nm ty = do
121
120
top <- getTop
@@ -439,6 +438,8 @@ processData ns fc nm ty cons = do
439
438
error (getFC codomain) "Constructor codomain is \{render 90 $ pprint tnames codomain} rather than \{nm}"
440
439
pure $ map (\ nm' => (MkEntry fc (QN ns nm') dty (DCon NormalCon (getArity dty) hn) Nil)) names
441
440
decl => throwError $ E (getFC decl) "expected constructor declaration")
441
+ -- type level autos like _++_
442
+ solveAutos
442
443
let entries = populateConInfo entries
443
444
for entries $ \case (MkEntry name fc dty def flags) => setDef fc name dty def flags
444
445
let cnames = map (\x => x.name) entries
Original file line number Diff line number Diff line change
1
+ module AutoInData
2
+
3
+ import Prelude
4
+
5
+ rep : ∀ a. Nat → a → List a
6
+ rep Z x = Nil
7
+ rep (S k) x = x :: rep k x
8
+
9
+ data RunLength : ∀ ty. List ty → U where
10
+ Empty : ∀ ty. RunLength {ty} Nil
11
+ Run : ∀ ty more. (n : Nat) →
12
+ (x : ty) →
13
+ RunLength more →
14
+ RunLength (rep n x ++ more)
You can’t perform that action at this time.
0 commit comments