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
{-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-} | |
module Main where | |
import Language.Lua.Parser | |
import Language.Lua.Types | |
import qualified Language.ECMAScript3.Syntax as JS | |
import Language.ECMAScript3.PrettyPrint (renderExpression) | |
import System.Environment (getArgs) |
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
?- length(X, 3), Term =.. [functor | X]. | |
X = [_G388, _G391, _G394], | |
Term = functor(_G388, _G391, _G394). |
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
import Prelude hiding (fail) | |
dfs | |
:: a -- initial state | |
-> path -- empty path | |
-> (a -> [a]) -- branch function to generate states in next level | |
-> (path -> a -> path) -- function to add visited state to path | |
-> (a -> Bool) -- goal checker | |
-> (a -> Bool) -- failure checker, used for backtracking | |
-> [path] -- result is list of paths |
This file has been truncated, but you can view the full file.
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
Tue Jul 2 13:03 2013 Time and Allocation Profiling Report (Final) | |
Shen.hs +RTS -p -RTS --shen K Lambda | |
total time = 443.39 secs (443389 ticks @ 1000 us, 1 processor) | |
total alloc = 124,775,518,168 bytes (excludes profiling overheads) | |
COST CENTRE MODULE %time %alloc | |
>>= Control.Monad.Trans.Error 42.9 15.6 |
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
package net.osa1.WikiaLyricsParser; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.util.List; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; |
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
AddPath "/home/omer/sf/" as. | |
Require Export Basics. | |
Inductive bin : Set := | |
| Zero : bin | |
| TwoZero : bin -> bin | |
| TwoZeroPOne : bin -> bin. | |
Fixpoint inc (b : bin) : bin := | |
match b with |
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
fs = require "fs" | |
path = require "path" | |
cp = require "child_process" | |
goUp = (depth) -> | |
if depth == 0 | |
return "" | |
_path = "" | |
for i in [0..depth-1] |
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
➜ ghc git:(ticket3452) ✗ ../inplace/bin/ghc-stage2 --interactive | |
GHCi, version 7.7.20130806: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
ghci> :set +t | |
ghci> 1 | |
1 | |
it :: Num a => a | |
ghci> id |
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
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Main where |
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
module CONCAT-SYNTAX | |
syntax Concat ::= List{Concat1, " "} | |
syntax Concat1 ::= Id | |
| "|" Concat1 "|" // quotation | |
| "[" Concat "]" | |
| Int | |
| "print" | |
| "pop" |