Skip to content

Instantly share code, notes, and snippets.

@deech
deech / gist:6485616
Last active December 22, 2015 14:28
Array inside a struct ....
{-# LANGUAGE CPP #-}
module CHSTest where
import Control.Monad
import Foreign
import Foreign.C
import Foreign.Ptr
#c
typedef struct {
int x;
} A;
@deech
deech / gist:6395316
Created August 30, 2013 23:46
Extra libs not statically linked ...
$cabal build -v2
creating dist/setup
./dist/setup/setup build --verbose=2
PackageDescription {package = PackageIdentifier {pkgName = PackageName "fltkhs", pkgVersion = Version {versionBranch = [0,1,0,0], versionTags = []}}, license = MIT, licenseFile = "LICENSE", copyright = "", maintainer = "[email protected]", author = "Aditya Siram", stability = "", testedWith = [], homepage = "http://github.com/deech/fltkc", pkgUrl = "", bugReports = "", sourceRepos = [], synopsis = "FLTK bindings", description = "Low level bindings for the FLTK GUI toolkit.", category = "UI", customFieldsPD = [], buildDepends = [Dependency (PackageName "base") (IntersectVersionRanges AnyVersion (ThisVersion (Version {versionBranch = [4,6,0,1], versionTags = []})))], specVersionRaw = Right (UnionVersionRanges (ThisVersion (Version {versionBranch = [1,8], versionTags = []})) (LaterVersion (Version {versionBranch = [1,8], versionTags = []}))), buildType = Just Custom, library = Just (Library {exposedModules = [ModuleName ["Graphics","U
name: fltkhs
version: 0.1.0.0
synopsis: FLTK bindings
description:
Low level bindings for the FLTK GUI toolkit.
license: MIT
license-file: LICENSEmc
category: UI
build-type: Configure
cabal-version: >=1.8
@deech
deech / indexed-natural-numbers.shen
Created February 28, 2013 13:11
Indexed natural numbers
(datatype natnum
if (integer? X)
if (> X -1)
________________
X : (natnum X);
(let A (+ X 1));
X : (natnum X);
__________