This file contains hidden or 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
| import scala.reflect.runtime.universe._ | |
| import scala.tools.reflect.Eval | |
| object O { | |
| type A = { | |
| type B = { | |
| type C = O.type | |
| } | |
| } | |
| } |
This file contains hidden or 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 TemplateHaskell, QuasiQuotes, FlexibleContexts #-} | |
| module Main where | |
| import Text.Peggy hiding ( Expr, parse ) | |
| import Text.Peggy.LeftRec | |
| import Prelude | |
| type Id = String | |
| data Prog = Prog Id [Decl] Stmt deriving (Show) |
This file contains hidden or 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
| data T = SymT Id | |
| | StrT String | |
| | IntT Integer | |
| | ChrT Char | |
| | LisT [T] | |
| | CloT Env Id T | |
| ------------------------------------------------------------------------- | |
| (~|~) = (() <$) .: (<|>) |
This file contains hidden or 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
| (defvar *source-storage* (make-hash-table)) | |
| (defun source-of (name) | |
| (gethash name *source-storage*)) | |
| (defun source-save-hook (expander form env) | |
| (when (eq (car form) 'defun) | |
| (setf (gethash (cadr form) *source-storage*) | |
| form)) | |
| (funcall expander form env)) |
NewerOlder