Skip to content
Snippets Groups Projects
Commit 51eda235 authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos Committed by Manos Koukoutos
Browse files

Definition types in Library

parent 8dd71b25
No related branches found
No related tags found
No related merge requests found
...@@ -7,12 +7,12 @@ import purescala.Definitions._ ...@@ -7,12 +7,12 @@ import purescala.Definitions._
import purescala.DefOps.searchByFullName import purescala.DefOps.searchByFullName
case class Library(pgm: Program) { case class Library(pgm: Program) {
lazy val List = lookup("leon.collection.List") lazy val List = lookup("leon.collection.List") collect { case acd : AbstractClassDef => acd }
lazy val Cons = lookup("leon.collection.Cons") lazy val Cons = lookup("leon.collection.Cons") collect { case ccd : CaseClassDef => ccd }
lazy val Nil = lookup("leon.collection.Nil") lazy val Nil = lookup("leon.collection.Nil") collect { case ccd : CaseClassDef => ccd }
lazy val String = lookup("leon.lang.string.String")
lazy val String = lookup("leon.lang.string.String") collect { case ccd : CaseClassDef => ccd }
def lookup(name: String): Option[Definition] = { def lookup(name: String): Option[Definition] = {
searchByFullName(name, pgm) searchByFullName(name, pgm)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment