Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Cayenne

< >

Cayenne is a programming language created in 1998.

#2396on PLDB 26Years Old
Wikipedia

Cayenne is a dependently typed functional programming language created by Lennart Augustsson in 1998, making it one of the earliest dependently type programming language (as opposed to proof assistant or logical framework). A notable design decision is that the language allows unbounded recursive functions to be used on the type level, making type checking undecidable. Most dependently typed proof assistants and later dependently typed languages such as Agda included a termination checker to prevent the type checker from looping, while the contemporary Dependent ML restricted the expressivity of the type-level language to maintain decidability. Read more on Wikipedia...


Example from Wikipedia:
PrintfType :: String -> # PrintfType (Nil) = String PrintfType ('%':('d':cs)) = Int -> PrintfType cs PrintfType ('%':('s':cs)) = String -> PrintfType cs PrintfType ('%':( _ :cs)) = PrintfType cs PrintfType ( _ :cs) = PrintfType cs aux :: (fmt::String) -> String -> PrintfType fmt aux (Nil) out = out aux ('%':('d':cs)) out = \ (i::Int) -> aux cs (out ++ show i) aux ('%':('s':cs)) out = \ (s::String) -> aux cs (out ++ s) aux ('%':( c :cs)) out = aux cs (out ++ c : Nil) aux (c:cs) out = aux cs (out ++ c : Nil) printf :: (fmt::String) -> PrintfType fmt printf fmt = aux fmt Nil

- Build the next great programming language Add Issues About Search Keywords Livestreams Labs Resources Acknowledgements

Built with Scroll v154.3.0