resource MicroResKor = open Prelude, Hangul in {
  param
    VForm = Lemma | VPresent | VPast ;

  oper
    Noun : Type = {s : Str} ;
    Verb : Type = {s : VForm => Str} ;
    Verb2 : Type = Verb ;
    Adjective : Type = Verb ;

    lemmaToStem : (lemma : Str) -> Str
      = \lemma -> case lemma of {
	stem + "다" => stem ;
	_ => Predef.error ("lemmaToStem was applied to a non-lemma," ++ lemma)
      } ;

    regVerb_eo : (lemma : Str) -> Verb
      = \lemma ->
      let stem = lemmaToStem lemma ;
      in {
	s = table {
	  Lemma => lemma ;
	  VPresent => stem + "어요" ;
	  VPast => stem + "었어요"
	  }
      } ;

    regVerb_a_o : (lemma : Str) -> Verb
      = \lemma ->
      let stem = lemmaToStem lemma ;
      in {
	s = table {
	  Lemma => lemma ;
	  VPresent => stem + "아요" ;
	  VPast => stem + "았어요"
	  }
      } ;

    blah : Str -> Str
      = \s -> case s of {
	_ + "ᅡ" => "아-final" ;
	_ => "not 아-final"
      } ;
}
