mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-20 19:31:31 +03:00
5383bd89be
There was a check on evaluating lets which was in Blodwen but I hadn't added to the normaliser yet! Also, normalisation needs to reduce as patterns for unification, but not when reducing finished LHS and argument terms. This is a bit of a hack (but then, so is the implementation of as patterns in general...). So, when we're checking a nested expression, we have the as pattern as a let bound variable (so that it has the necessary computational force) but when we compile we just pass it as an ordinary argument, then it gets the desired behaviour in case trees.
8 lines
358 B
Plaintext
8 lines
358 B
Plaintext
Processing as TTImp
|
|
Written TTC
|
|
Yaffle> (Main.S (Main.S (Main.S (Main.S (Main.S Main.Z)))))
|
|
Yaffle> ((((Main.Cons [Just k = (Main.S Main.Z)]) [Just a = Integer]) 1) ((((Main.Cons [Just k = Main.Z]) [Just a = Integer]) 2) (Main.Nil [Just a = Integer])))
|
|
Yaffle> (Main.S (Main.S (Main.S Main.Z)))
|
|
Yaffle> (Main.S (Main.S (Main.S Main.Z)))
|
|
Yaffle> Bye for now!
|