Skip to content

Instantly share code, notes, and snippets.

@atondwal
atondwal / lisp.hs
Last active April 2, 2016 01:37 — forked from Peaker/lisp.hs
Minimal Lisp in Haskell
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE LambdaCase #-}
import Control.Applicative
import Control.Monad.State.Strict
import Data.Function (on)
import Data.Foldable (foldrM)
import Data.Attoparsec
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
# Contributor: acieroid
# Contributor: spider-mario <[email protected]>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: George Giorgidze <[email protected]>
# Contributor: William J. Bowman <[email protected]>
pkgname=coq
pkgver=8.5
pkgrel=1
pkgdesc='Formal proof management system. Full version that includes CoqIDE.'
==> Making package: libreoffice-fresh 5.0.3-1 (Sat Nov 21 20:08:11 EST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found libreoffice-5.0.3.2.tar.xz
-> Found libreoffice-5.0.3.2.tar.xz.asc
-> Found libreoffice-help-5.0.3.2.tar.xz
-> Found libreoffice-help-5.0.3.2.tar.xz.asc
-> Found libreoffice-translations-5.0.3.2.tar.xz
-> Found libreoffice-translations-5.0.3.2.tar.xz.asc
module UseInterpolation (useInterpolation) where
import qualified Data.Map as M
data Formula = Not Formula | And [Formula] | Or [Formula] | T [Var] deriving (Eq,Ord)
data Binder = Binder Var Type (M.Map Var Var) deriving (Eq,Ord)
data Var = V | S String deriving (Eq,Ord)
type Constraint = ([Binder], Type, Type)
data Type = Type { reft :: Formula } deriving (Eq,Ord)
interpolate :: Formula -> Formula -> IO Formula
module UseInterpolation (useInterpolation) where
import Data.Maybe
data Formula = Not Formula | And [Formula] | Or [Formula] | T [Var] deriving Eq
data Binder = Binder Var Type [(Var,Var)] deriving Eq
data Var = V | S String deriving Eq
type Constraint = ([Binder], Type, Type)
data Type = Type { reft :: Formula } deriving Eq
interpolate :: Formula -> Formula -> IO Formula
http://www.imarvintpa.com/dndlive/Index_LevDom.php | Index of Spells by Domains and Levels
http://www.imarvintpa.com/dndlive/LevelIndex.php?Level=Clr+1&Small=0 | Index of Spells by Level - Clr 1
http://www.imarvintpa.com/dndlive/LevelIndex.php?Level=Trickery+1 | Index of Spells by Level - Trickery 1
http://www.imarvintpa.com/dndlive/LevelIndex.php?Level=Fate+1 | Index of Spells by Level - Fate 1
http://kcdnd.com/players/spell%20sheets/DnD_3.5_Cleric_Spells.pdf | kcdnd.com/players/spell sheets/DnD_3.5_Cleric_Spells.pdf
http://brilliantgameologists.com/boards/index.php?topic=420.msg8432#msg8432 | The 3.5 Cleric Handbook
file:///home/atondwal/Downloads/D&D%203.5%20-%20Dungeon%20Master's%20Guide%20II.pdf | D&D 3.5 - Dungeon Master's Guide II.pdf
file:///home/atondwal/Downloads/Spell_Compendium.pdf | Spell_Compendium.pdf
https://app.roll20.net/editor/ | Campaign on Kysus | Roll20
http://www.dandwiki.com/wiki/SRD:Trickery_Domain | SRD:Trickery Domain - D&D Wiki
========================================================
© Copyright 2009 Regents of the University of California.
All Rights Reserved.
========================================================
.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|./.-.\.|Unsatisfied Constraints:
constraint:
env [ xsListSelector:{VV : func(1, [FAppTy (List ) @(0) ; FAppTy (List ) @(0)]) | []}
; x_Tuple77:{VV : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41# @(0)) @(1)) @(2)) @(3)) @(4)) @(5)) @(6) ; @(6)]) | []}
module CSV () where
-- | Using LiquidHaskell for CSV lists
-- c.f. http://www.reddit.com/r/scala/comments/1nhzi2/using_shapelesss_sized_type_to_eliminate_real/
data CSV = Csv { headers :: [String]
, rows :: [[String]]
}
{-@ data CSV = Csv { headers :: [String]
diff --git a/Liquid.hs b/Liquid.hs
index c5b03ac..eea1bb4 100644
--- a/Liquid.hs
+++ b/Liquid.hs
@@ -76,22 +76,24 @@ testDelta cfg target cgi info dc cons = do
ExitSuccess -> return False
ExitFailure _ -> return True
+deltaDebug _ _ _ _ _ [c] _ = return [c]
deltaDebug cfg target cgi info dc cons r = do
{-# LANGUAGE TupleSections #-}
import Data.Maybe
import Data.Monoid (mconcat, mempty)
import System.Exit
import Control.Applicative ((<$>))
import Control.Monad
import Control.DeepSeq
import Text.PrettyPrint.HughesPJ
import CoreSyn