├── .gitignore ├── .gitmodules ├── .vscode ├── launch.json ├── settings.json ├── spellright.dict └── tasks.json ├── LICENSE ├── README.md ├── Setup.hs ├── abstract ├── abstract.bib ├── abstract.tex ├── logo.png ├── mlfpaper.png ├── ocamllogo.png └── slides.tex ├── app └── Main.hs ├── benchmark ├── BinaryTrees.idr ├── Fib.idr └── pythag.idr ├── lib ├── OCaml │ ├── IO.idr │ └── Lwt.idr └── ocaml.ipkg ├── package.yaml ├── rts └── idrisobj │ ├── dune │ ├── dune-project │ ├── idrisobj.install │ ├── idrisobj.ml │ └── idrisobj.opam ├── src ├── IRTS │ ├── CodegenMalfunction.hs │ ├── CodegenUtils.hs │ ├── OCamlFFI.hs │ └── TranslateMonad.hs └── Malfunction │ ├── AST.hs │ └── Codegen.hs ├── stack.yaml ├── test-idris ├── BigInt.idr ├── CallOcamlNot.idr ├── ComplexPatterns.idr ├── Fact.idr ├── Foo.idr ├── HelloWorld.idr ├── MakeSet.idr ├── Mutual.idr ├── PatternOrders.idr ├── PrintEndline.idr ├── Reverse.idr ├── SubStr.idr ├── Test.idr ├── Unicode.idr ├── cohttp │ ├── IdrisCohttp.idr │ └── Makefile ├── graphics │ └── IdrCamlGraphics.idr └── hello-unikernel │ ├── Idrikernel.idr │ ├── META │ ├── Makefile │ ├── idrikernel.mli │ ├── test.ml │ └── unikernel │ └── config.ml └── test └── Spec.hs /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | *.fmt 10 | *.fot 11 | *.cb 12 | *.cb2 13 | .*.lb 14 | 15 | ## Intermediate documents: 16 | *.dvi 17 | *.xdv 18 | *-converted-to.* 19 | # these rules might exclude image files for figures etc. 20 | # *.ps 21 | # *.eps 22 | # *.pdf 23 | 24 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 25 | *.bbl 26 | *.bcf 27 | *.blg 28 | *-blx.aux 29 | *-blx.bib 30 | *.run.xml 31 | 32 | ## Build tool auxiliary files: 33 | *.fdb_latexmk 34 | *.synctex 35 | *.synctex(busy) 36 | *.synctex.gz 37 | *.synctex.gz(busy) 38 | *.pdfsync 39 | 40 | ## Build tool directories for auxiliary files 41 | # latexrun 42 | latex.out/ 43 | 44 | ## Auxiliary and intermediate files from other packages: 45 | # algorithms 46 | *.alg 47 | *.loa 48 | 49 | # achemso 50 | acs-*.bib 51 | 52 | # amsthm 53 | *.thm 54 | 55 | # beamer 56 | *.nav 57 | *.pre 58 | *.snm 59 | *.vrb 60 | 61 | # changes 62 | *.soc 63 | 64 | # comment 65 | *.cut 66 | 67 | # cprotect 68 | *.cpt 69 | 70 | # elsarticle (documentclass of Elsevier journals) 71 | *.spl 72 | 73 | # endnotes 74 | *.ent 75 | 76 | # fixme 77 | *.lox 78 | 79 | # feynmf/feynmp 80 | *.mf 81 | *.mp 82 | *.t[1-9] 83 | *.t[1-9][0-9] 84 | *.tfm 85 | 86 | #(r)(e)ledmac/(r)(e)ledpar 87 | *.end 88 | *.?end 89 | *.[1-9] 90 | *.[1-9][0-9] 91 | *.[1-9][0-9][0-9] 92 | *.[1-9]R 93 | *.[1-9][0-9]R 94 | *.[1-9][0-9][0-9]R 95 | *.eledsec[1-9] 96 | *.eledsec[1-9]R 97 | *.eledsec[1-9][0-9] 98 | *.eledsec[1-9][0-9]R 99 | *.eledsec[1-9][0-9][0-9] 100 | *.eledsec[1-9][0-9][0-9]R 101 | 102 | # glossaries 103 | *.acn 104 | *.acr 105 | *.glg 106 | *.glo 107 | *.gls 108 | *.glsdefs 109 | 110 | # gnuplottex 111 | *-gnuplottex-* 112 | 113 | # gregoriotex 114 | *.gaux 115 | *.gtex 116 | 117 | # htlatex 118 | *.4ct 119 | *.4tc 120 | *.idv 121 | *.lg 122 | *.trc 123 | *.xref 124 | 125 | # hyperref 126 | *.brf 127 | 128 | # knitr 129 | *-concordance.tex 130 | # TODO Comment the next line if you want to keep your tikz graphics files 131 | *.tikz 132 | *-tikzDictionary 133 | 134 | # listings 135 | *.lol 136 | 137 | # makeidx 138 | *.idx 139 | *.ilg 140 | *.ind 141 | *.ist 142 | 143 | # minitoc 144 | *.maf 145 | *.mlf 146 | *.mlt 147 | *.mtc[0-9]* 148 | *.slf[0-9]* 149 | *.slt[0-9]* 150 | *.stc[0-9]* 151 | 152 | # minted 153 | _minted* 154 | *.pyg 155 | 156 | # morewrites 157 | *.mw 158 | 159 | # nomencl 160 | *.nlg 161 | *.nlo 162 | *.nls 163 | 164 | # pax 165 | *.pax 166 | 167 | # pdfpcnotes 168 | *.pdfpc 169 | 170 | # sagetex 171 | *.sagetex.sage 172 | *.sagetex.py 173 | *.sagetex.scmd 174 | 175 | # scrwfile 176 | *.wrt 177 | 178 | # sympy 179 | *.sout 180 | *.sympy 181 | sympy-plots-for-*.tex/ 182 | 183 | # pdfcomment 184 | *.upa 185 | *.upb 186 | 187 | # pythontex 188 | *.pytxcode 189 | pythontex-files-*/ 190 | 191 | # tcolorbox 192 | *.listing 193 | 194 | # thmtools 195 | *.loe 196 | 197 | # TikZ & PGF 198 | *.dpth 199 | *.md5 200 | *.auxlock 201 | 202 | # todonotes 203 | *.tdo 204 | 205 | # easy-todo 206 | *.lod 207 | 208 | # xcolor 209 | *.xcp 210 | 211 | # xmpincl 212 | *.xmpi 213 | 214 | # xindy 215 | *.xdy 216 | 217 | # xypic precompiled matrices 218 | *.xyc 219 | 220 | # endfloat 221 | *.ttt 222 | *.fff 223 | 224 | # Latexian 225 | TSWLatexianTemp* 226 | 227 | ## Editors: 228 | # WinEdt 229 | *.bak 230 | *.sav 231 | 232 | # Texpad 233 | .texpadtmp 234 | 235 | # LyX 236 | *.lyx~ 237 | 238 | # Kile 239 | *.backup 240 | 241 | # KBibTeX 242 | *~[0-9]* 243 | 244 | # auto folder when using emacs and auctex 245 | ./auto/* 246 | *.el 247 | 248 | # expex forward references with \gathertags 249 | *-tags.tex 250 | 251 | # standalone packages 252 | *.sta 253 | 254 | # Haskell 255 | dist 256 | dist-* 257 | cabal-dev 258 | *.o 259 | *.hi 260 | *.chi 261 | *.chs.h 262 | *.dyn_o 263 | *.dyn_hi 264 | .hpc 265 | .hsenv 266 | .cabal-sandbox/ 267 | cabal.sandbox.config 268 | *.prof 269 | *.aux 270 | *.hp 271 | *.eventlog 272 | .stack-work/ 273 | cabal.project.local 274 | cabal.project.local~ 275 | .HTF/ 276 | .ghc.environment.* 277 | 278 | # Idris 279 | *.ibc 280 | *.o 281 | 282 | # idris-malfunction backend 283 | *.lang 284 | *.mlf 285 | *.js 286 | idris-codegen-malfunction.cabal 287 | 288 | #ocaml 289 | *.annot 290 | *.cmo 291 | *.cma 292 | *.cmi 293 | *.a 294 | *.o 295 | *.cmx 296 | *.cmxs 297 | *.cmxa 298 | **/_build 299 | **/.merlin 300 | *.pdf 301 | *~ 302 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "malfunction"] 2 | path = malfunction 3 | url = git@github.com:ioanluca/malfunction.git 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "ghc", 9 | "request": "launch", 10 | "name": "haskell-debug-adapter", 11 | "internalConsoleOptions": "openOnSessionStart", 12 | "workspace": "${workspaceRoot}", 13 | "startup": "/home/ioanluca/real-world-idris/app/Main.hs", 14 | "startupFunc": "main", 15 | "startupArgs": "", 16 | "stopOnEntry": false, 17 | "mainArgs": "${file} -o ${fileDirname}/${fileBasenameNoExtension}.out", 18 | "ghciPrompt": "H>>= ", 19 | "ghciInitialPrompt": "Prelude>", 20 | "ghciCmd": "stack ghci --test --no-load --no-build --main-is TARGET --ghci-options -fprint-evld-with-show", 21 | "ghciEnv": {}, 22 | "logFile": "${workspaceRoot}/.vscode/phoityne.log", 23 | "logLevel": "WARNING" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.wordWrap": "wordWrapColumn", 3 | "editor.wordWrapColumn": 80, 4 | // adding latex and haskell comment in regex and ocaml 5 | "todo-tree.regex": "((//|\\(\\*|--|#|%|