Skip to content

Instantly share code, notes, and snippets.

@odanoburu
Last active May 17, 2018 14:17
Show Gist options
  • Save odanoburu/a03239d024310ff0df233743d16f8ec4 to your computer and use it in GitHub Desktop.
Save odanoburu/a03239d024310ff0df233743d16f8ec4 to your computer and use it in GitHub Desktop.
-- hack to get the same behaviour as from variants. parses both,
-- linearizes the first.
vars : Str -> Str -> Str = \x,y -> pre { "" => x ; _ => y } ;
mkPass : Str -> Gender => Number => Str ;
-- passive form is highly predictable from singular masculine form
mkPass p = case p of {
amad + "o" => genNumForms p (amad + "a") (amad + "os") (amad + "as") ;
entregu + "e" => \\g => numForms p (entregu + "es") ;
_ => error "unknown ending" -- nothing should reach here
} ;
@odanoburu
Copy link
Author

odanoburu commented May 17, 2018

interstingly,

> cc vars "oi" "tchau" ++ []
pre {"tchau"; "oi" / strs {[]}}
> cc vars "oi" "tchau" + []
"tchau"

is this expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment