Skip to content

Commit

Permalink
Add readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joald committed May 4, 2019
1 parent 4e6219e commit 2040809
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Rozwiązanie jest oddane jako projekt stack.
Jako parametry można podać więcej niż jeden plik, wtedy zostaną one połączone w jeden duży plik, zatem należy nie dopuścić do konfliktów nazw (w przeciwnym wypadku interpreter wypisze stosowny komunikat).
W szczególności należy podać tylko jeden plik zawierający funkcję main.
Względem oryginalnego planu rozwiązanie różni się dodatkowymi elementami: możliwość aliasowania typów oraz specjalny operator do oznaczania typów kontynuacyjnych.
W folderze lang_overview znajduje się odpowiednio poprawiony projekt języka.
Binary file modified lang_overview/lang_overview.pdf
Binary file not shown.
7 changes: 4 additions & 3 deletions lang_overview/lang_overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@
\section{The syntax}
\begin{align*}
% program
\texttt{program} =\ & \texttt{\{ \color{gray}typeDecl \color{black} | \color{red}funDecl \color{black} \}}\\
\texttt{program} =\ & \texttt{\{ \color{gray}typeDecl \color{black} | \color{red}funDecl \color{black} | \color{Cerulean}aliasDecl \color{black} \}}\\
% funDecl
\texttt{\color{red}funDecl\color{black}} =\ & \texttt{[\color{ForestGreen}type \color{black} ":"] [\color{ForestGreen}type \color{black} '::'] id \{ id \} "=" \color{RoyalPurple}expr \color{black}} ";"\\
% typeDecl
\texttt{\color{gray}typeDecl\color{black}} =\ &\texttt{\color{blue}'type' \color{black} ID \{ id \} "=" \color{RubineRed}typeCtor \color{black} \{ "|" \color{RubineRed}typeCtor \color{black} \}} ";"\\
% aliasDecl
\texttt{\color{Cerulean}aliasDecl\color{black}} =\ &\texttt{\color{blue}'alias' \color{black} ID "=" \color{ForestGreen}type \color{black} ";"}\\
% type
\texttt{\color{ForestGreen}type \color{black}} =\ &\texttt{\color{CadetBlue}basicType \color{black} | (\color{ForestGreen}type \color{black} \{ '->' \color{ForestGreen}type \color{black} \}) | "(" \color{ForestGreen}type \color{black} ")" | "@\{" \color{ForestGreen}type \color{black} "\}(" \color{ForestGreen}type \color{black} ")"}\\
% basicType
Expand Down Expand Up @@ -275,6 +277,5 @@

\end{lstlisting}
\section{Points}
I plan to implement all the features mentioned in the task description required for 35 points except
for type synonyms, which are not necessary and runtime errors which will are not needed in the language, in particular everything already mentioned in the language details. It might be also worth considering to add a do notation like in haskell, but for continuations (it is visible in the main function that it could simplify code greatly), however it was a last-second consideration and if I find the time, I'll do that.
I plan to implement all the features mentioned in the task description required for 35 points and runtime errors which will are not needed in the language, in particular everything already mentioned in the language details. It might be also worth considering to add a do notation like in haskell, but for continuations (it is visible in the main function that it could simplify code greatly), however it was a last-second consideration and if I find the time, I'll do that.
\end{document}

0 comments on commit 2040809

Please sign in to comment.