Skip to content

Instantly share code, notes, and snippets.

View christiaanb's full-sized avatar

Christiaan Baaij christiaanb

  • QBayLogic
  • Enschede, The Netherlands
View GitHub Profile
{-# LANGUAGE DeriveFoldable, DeriveFunctor, DeriveTraversable #-}
module SimpleCore where
import Bound
import Bound.Name
import Bound.Var
import Control.Applicative
import Control.Comonad
import Control.Monad
import Data.Bifunctor
This file has been truncated, but you can view the full file.
*Signal> fails
Just 2 ::
Nothing ::
take 1
(Stream instance of Prelude.Functor.Functor, method map snd
(zipWith apply
(zipWith apply
(calc ::
Delay (repeat calc))
(map fst
@christiaanb
christiaanb / LambdaPi.hs
Last active August 29, 2015 14:01
LambdaPi.hs
-- http://www.andres-loeh.de/LambdaPi/
module LambaPi where
data TermI
= Ann TermC TermC
| Star
| Pi TermC TermC
| Bound Int
| Free Name
| TermI :@: TermC
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable,
ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances,
FlexibleInstances, GADTs #-}
module Core where
import Bound
import Bound.Name
import Bound.Var
import Control.Applicative
import Control.Comonad
interface addOne_i;
task automatic run (input integer a, output integer b);
b = a + 1;
endtask
endinterface
interface map_i #( parameter N=32, parameter type ELEMTYPE=logic )
( interface f );
task automatic run ( input ELEMTYPE arg [N-1:0]
, output ELEMTYPE res [N-1:0]);
module SOP where
import Control.Applicative
import Data.Function
import Data.List
import Data.Maybe
import Data.Either
import Debug.Trace
data Expr
diff --git a/compiler/typecheck/TcInteract.lhs b/compiler/typecheck/TcInteract.lhs
index 377cd2d..a742f96 100644
--- a/compiler/typecheck/TcInteract.lhs
+++ b/compiler/typecheck/TcInteract.lhs
@@ -31,6 +31,8 @@ import FamInstEnv ( FamInstEnvs, instNewTyConTF_maybe )
import TcEvidence
import Outputable
+import TcTypeNats ( evBySOP, sopRelevantTyCon, sopToProp, sopToExpr, solveSOP )
+
@christiaanb
christiaanb / typegenerics.vhdl
Created November 20, 2013 14:05
Type and Function generics
library ieee;
use ieee.std_logic_1164.all;
entity incrementer is
generic (type data_type;
function increment (x: data_type) return data_type);
port (I : in data_type;
O : out data_type;
inc : in std_logic);
end;
diff --git a/src/Haddock.hs b/src/Haddock.hs
index a7ac5ba..2cd220c 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -113,6 +113,11 @@ handleGhcExceptions =
case e of
PhaseFailed _ code -> exitWith code
_ -> do
+ flags <- saveStaticFlagGlobals
+ unless (fst flags) $ do
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 44a6fa5..337778e 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1900,6 +1900,13 @@ linkBinary' staticLink dflags o_files dep_packages = do
then ["-Wl,-read_only_relocs,suppress"]
else [])
+ ++ (if platformOS platform == OSDarwin &&
+ not staticLink &&