aboutsummaryrefslogtreecommitdiff
path: root/src/testsuite/interpreter/sf-2910351.spad
blob: f634e07766b96d6f74c07735142b296ea76b1926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
)abbrev package BUG Bug
Bug(): Public == Private where
  Public == with
    getCtorKindInString: Identifier -> String    
    getCtorKind:         Identifier -> ConstructorKind
  Private == add
    getCtorKind(c: Identifier): ConstructorKind == 
      kind(retract(findConstructor(c)$Constructor)$(Maybe Constructor))$Constructor

    getCtorKindInString(c: Identifier): String ==
      k : ConstructorKind := getCtorKind(c)
      k = category$ConstructorKind =>  "Category"
      k = package$ConstructorKind  =>  "Package"
      k = domain$ConstructorKind   => "Domain"
      "unknown constructor kind! "