This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MonoLocalBinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
-- Booleans | |
data F | |
data T | |
-- Nonnegative integers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This whole thing is a direct translation from Haskell of | |
https://gist.github.com/khuldraeseth/d82c8fa8946da845a7bbb57f2077122b | |
*/ | |
struct F {}; | |
struct T {}; | |
struct Z {}; | |
template <typename N> struct S {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Z {}; | |
template <typename N> struct S {}; | |
struct Nil {}; | |
template <typename X, typename Xs> struct Cons {}; | |
template <typename Ls, typename C, typename Rs> struct Tape {}; | |
struct Inc {}; | |
struct Dec {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name":"eecs281","settings":"{\"settings\":\"{\\n \\\"editor.emptySelectionClipboard\\\": false,\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.inlayHints.enabled\\\": \\\"offUnlessPressed\\\",\\n \\\"editor.insertSpaces\\\": true,\\n \\\"files.associations\\\": {\\n \\\".clangd\\\": \\\"yaml\\\",\\n \\\".clang-format\\\": \\\"yaml\\\"\\n },\\n \\\"files.autoSave\\\": \\\"off\\\",\\n \\\"files.insertFinalNewline\\\": true,\\n \\\"lldb.launch.terminal\\\": \\\"integrated\\\",\\n \\\"lldb.dereferencePointers\\\": false,\\n \\\"[cpp]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"llvm-vs-code-extensions.vscode-clangd\\\",\\n \\\"editor.semanticHighlighting.enabled\\\": true\\n },\\n \\\"[c]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"llvm-vs-code-extensions.vscode-clangd\\\",\\n \\\"editor.semanticHighlighting.enabled\\\": true\\n }\\n}\\n\"}","tasks":"{\"tasks\":\"{\\n // See https://go.microsoft.com/fwlink/?LinkId=7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
A Haskell source file begins with zero or more file-scope pragmas that tell tools how to treat the file. | |
Pragmas look like multiline comments `{- ... -}` that begin and end with `#`. | |
The LANGUAGE pragma is a common one. it enables language extensions. | |
Oh, yeah. Haskell allows nested multiline comments, by the way. | |
-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} |