Dependent Types and Fibred Computational Effects

  • Danel Ahman
  • Neil Ghani
  • Gordon D. Plotkin
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9634)


We study the interplay between dependent types and general computational effects. We define a language with both value types and terms, and computation types and terms, where types depend only on value terms. We use computational \(\varSigma \)-types to account for type-dependency in the sequential composition of computations. Our language design is justified by a natural class of categorical models. We account for both algebraic and non-algebraic effects. We also show how to extend the language with general recursion, using continuous families of cpos.


  1. 1.
    Adamek, J., Rosicky, J.: Locally Presentable and Accessible Categories. London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge (1994)CrossRefzbMATHGoogle Scholar
  2. 2.
    Atkey, R.: Algebras for parameterised monads. In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 3–17. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  3. 3.
    Benton, P.N.: A mixed linear and non-linear logic: proofs, terms and models. In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  4. 4.
    Borceux, F.: Handbook of Categorical Algebra. Categories and Structures, vol. 2. Cambridge University Press, Cambridge (1994)CrossRefzbMATHGoogle Scholar
  5. 5.
    Brady, E.: Programming and reasoning with algebraic effects and dependent types. In: Morrisett, G., Uustalu, T. (eds.) Proceedings of 18th International Conference on Functional Programming, ICFP 2013, pp. 133–144. ACM (2013)Google Scholar
  6. 6.
    Brady, E.: Resource-dependent algebraic effects. In: Hage, J., McCarthy, J. (eds.) TFP 2014. LNCS, vol. 8843, pp. 18–33. Springer, Heidelberg (2015)Google Scholar
  7. 7.
    Casinghino, C., Sjöbergberg, V., Weirich, S.: Combining proofs and programs in a dependently typed language. In: Sewell, P. (ed.) Proceedings of 41st Annual Symposium on Principles of Programming Languages, POPL 2014, pp. 33–45. ACM (2014)Google Scholar
  8. 8.
    Clairambault, P., Dybjer, P.: The biequivalence of locally cartesian closed categories and martin-löf type theories. In: Ong, L. (ed.) Typed Lambda Calculi and Applications. LNCS, vol. 6690, pp. 91–106. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  9. 9.
    Egger, J., Møgelberg, R.E., Simpson, A.: The enriched effect calculus: syntax and semantics. J. Log. Comput. 24(3), 615–654 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Ghani, N., Johann, P., Fumex, C.: Indexed induction and coinduction, fibrationally. Logical Methods Comput. Sci. 9(3:6), 1–31 (2013). doi: 10.2168/LMCS-9(3:6)2013 MathSciNetzbMATHGoogle Scholar
  11. 11.
    Gierz, G., Hofmann, K.H., Keimel, K., Lawson, J.D., Mislove, M., Scott, D.S.: Continuous Lattices and Domains. Cambridge University Press, Cambridge (2003)CrossRefzbMATHGoogle Scholar
  12. 12.
    Gray, J.W.: The categorical comprehension scheme. In: Gray, J.W. (ed.) Category Theory, Homology Theory and Their Applications III. Lecture Notes in Mathematics, vol. 99, pp. 242–312. Springer, Heidelberg (1969)CrossRefGoogle Scholar
  13. 13.
    Hancock, P., Setzer, A.: Interactive programs in dependent type theory. In: Clote, P.G., Schwichtenberg, H. (eds.) CSL 2000. LNCS, vol. 1862, pp. 317–331. Springer, Heidelberg (2000)Google Scholar
  14. 14.
    Hofmann, M.: On the interpretation of type theory in locally cartesian closed. In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933, pp. 427–441. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  15. 15.
    Hofmann, M.: Syntax and semantics of dependent types. In: Pitts, A.M., Dybjer, P. (eds.) Semantics and Logics of Computation, pp. 79–130. Cambridge University Press, Cambridge (1997)CrossRefGoogle Scholar
  16. 16.
    Hutton, G., Meijer, E.: Monadic parsing in Haskell. J. Funct. Program. 8(4), 437–444 (1998)CrossRefzbMATHGoogle Scholar
  17. 17.
    Hyland, M., Plotkin, G., Power, J.: Combining effects: sum and tensor. Theor. Comput. Sci. 357(1–3), 70–99 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Jacobs, B.: Categorical Logic and Type Theory. Studies in Logic and the Foundations of Mathematics, vol. 141. North Holland, Amsterdam (1999)zbMATHGoogle Scholar
  19. 19.
    Krishnaswami, N.R., Pradic, P., Benton, N.: Integrating linear and dependent types. In: Walker, D. (ed.) Proceedings of 42nd Annual Symposium on Principles of Programming Languages, POPL 2015, pp. 17–30. ACM (2015)Google Scholar
  20. 20.
    Levy, P.B.: Call-By-Push-Value: A Functional/Imperative Synthesis. Semantics Structures in Computation, vol. 2. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  21. 21.
    Linton, F.: Coequalizers in categories of algebras. In: Eckmann, B. (ed.) Seminar on Triples and Categorical Homology Theory. Lecture Notes in Mathematics, vol. 80, pp. 75–90. Springer, Heidelberg (1969)CrossRefGoogle Scholar
  22. 22.
    Martin-Löf, P.: An intuitionisitc theory of types, predicative part. In: Rose, E., Shepherdson, J.C. (eds.) Proceedings of Logic Colloquium 1973, pp. 73–118. North-Holland (1975)Google Scholar
  23. 23.
    McBride, C.: Functional pearl: Kleisli arrows of outrageous fortune. J. Funct. Program. (To appear)Google Scholar
  24. 24.
    Moggi, E.: Computational lambda-calculus and monads. In: Parikh, R. (ed.) Proceedings of 4th Annual Symposium on Logic in Computer Science, LICS 1989, pp. 14–23. IEEE (1989)Google Scholar
  25. 25.
    Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Nanevski, A., Morrisett, G., Birkedal, L.: Hoare type theory, polymorphism and separation. J. Funct. Program. 18(5–6), 865–911 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  27. 27.
    Pitts, A.M.: Categorical logic. In: Abramsky, S., Gabbay, D.M., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science. Algebraic and Logical Structures, vol. 5, pp. 39–128. Oxford University Press, Oxford (2000). chap. 2Google Scholar
  28. 28.
    Pitts, A.M., Matthiesen, J., Derikx, J.: A dependent type theory with abstractable names. In: Mackie, I., Ayala-Rincon, M. (eds.) Proceedings of 9th Workshop on Logical and Semantic Frameworks, with Applications, LSFA 2014. ENTCS, vol. 312, pp. 19–50. Elsevier (2015)Google Scholar
  29. 29.
    Plotkin, G.: Pisa notes (on domain theory) (1983)Google Scholar
  30. 30.
    Plotkin, G., Power, J.: Semantics for algebraic operations. In: Brookes, S., Mislove, M. (eds.) Proceedings of 17th Conference on the Mathematical Foundations of Programming Semantics, MFPS XVII. ENTCS, vol. 45, pp. 332–345. Elsevier (2001)Google Scholar
  31. 31.
    Plotkin, G., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  32. 32.
    Plotkin, G.D., Pretnar, M.: Handling algebraic effects. Logical Methods Comput. Sci. 9(4:23), 1–36 (2013). doi: 10.2168/LMCS-9(4:23)2013 MathSciNetzbMATHGoogle Scholar
  33. 33.
    Power, J.: Countable Lawvere theories and computational effects. In: Seda, A.K., Hurley, T., Schellekens, M., an Airchinnigh, M.M., Strong, G.(eds.) Proceedings of 3rd Irish Conference on the Mathematical Foundations of Computer Science and Information Technology, MFCSIT 2004. ENTCS, vol. 161, pp. 59–71. Elsevier (2006)Google Scholar
  34. 34.
    Pretnar, M.: The Logic and Handling of Algebraic Effects. Ph.D. thesis, School of Informatics, University of Edinburgh (2010)Google Scholar
  35. 35.
    Staton, S.: Instances of computational effects: an algebraic perspective. In: Kupferman, O. (ed.) Proceedings of 28th Annual Symposium on Logic in Computer Science, LICS 2013, pp. 519–519. IEEE, June 2013Google Scholar
  36. 36.
    Streicher, T.: Semantics of Type Theory. Birkhäuser, Boston (1991)CrossRefzbMATHGoogle Scholar
  37. 37.
    Swamy, N., Weinberger, J., Schlesinger, C., Chen, J., Livshits, B.: Verifying higher-order programs with the Dijkstra monad. In: Flanagan, C. (ed.) Proceedings of 34th Conference on Programming Language Design and Implementation, PLDI 2013, pp. 387–398. ACM (2013)Google Scholar
  38. 38.
    Vákár, M.: A categorical semantics for linear logical frameworks. In: Pitts, A. (ed.) FOSSACS 2015. LNCS, vol. 9034, pp. 102–116. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  39. 39.
    Warren, M.A.: Homotopy Theoretic Aspects of Constructive Type Theory. Ph.D. thesis, Department of Philosophy, Carnegie Mellon University (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  1. 1.LFCSUniversity of EdinburghEdinburghScotland, UK
  2. 2.MSP GroupUniversity of StrathclydeGlasgowScotland, UK

Personalised recommendations