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
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, DeriveDataTypeable #-} | |
module Unittest.Compat.Containers (Containers(..)) where | |
import qualified Bond.Imports as B' | |
import qualified Unittest.Compat.Another.Another | |
import qualified Unittest.Compat.Another.EnumType | |
import qualified Unittest.Compat.BasicTypes | |
import qualified Unittest.Compat.EnumType1 | |
data Containers = Containers{l_bool :: [B'.Bool], | |
l_str :: [B'.Utf8], l_int8 :: [B'.Int8], l_int16 :: [B'.Int16], |
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
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, GADTs #-} | |
module ZZ where | |
import Data.Proxy | |
class Def a where | |
def :: a | |
data TWrapper a b where | |
TW :: (Foo a, Foo b, Base a ~ b) => Proxy a -> Maybe (Proxy b) -> TWrapper a b |
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
[1 of 1] Compiling ZZ ( hang.hs, hang.o ) | |
hang.hs:19:31: | |
Could not deduce (Foo' (Base a)) arising from a use of ‘setBase’ | |
from the context (Foo' a) | |
bound by the type signature for setBase :: Foo' a => a | |
at hang.hs:16:12-32 | |
In the expression: setBase | |
In an equation for ‘d’: d = setBase | |
In the expression: |
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
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, FlexibleContexts #-} | |
module ZZ where | |
import Data.Proxy | |
class Def a where | |
def :: a | |
class Def a => Foo a where | |
type Base a :: * |
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 Main where | |
import Control.Applicative | |
import Control.Monad | |
import Data.Binary.Get | |
import Data.Bits | |
import Data.Word | |
import qualified Data.ByteString.Lazy as BS | |
import Debug.Trace |
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
class ConverterInterface { | |
void WriteInt(int, int); | |
void WriteDouble(int, double); | |
} | |
void convert_stream(Stream stream, ConverterInterface *writer) { | |
for (auto record : stream) { | |
if (record.type == INT) { | |
writer->WriteInt(record.fieldnumber, record.intvalue); | |
} else if (record.type == DOUBLE) { |
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
[24 of 24] Compiling Main ( Main.hs, Main.o ) | |
Main.hs:35:27: | |
Could not deduce (Typeable a0) arising from a use of ‘mkT’ | |
from the context (Data a) | |
bound by a type expected by the context: Data a => a -> a | |
at Main.hs:35:15-43 | |
The type variable ‘a0’ is ambiguous | |
Note: there are several potential instances: | |
instance Typeable Compat -- Defined in ‘Unittest.Compat.Compat’ |
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 Unittest.Compat.BasicTypes (BasicTypes(..)) where | |
import qualified Bond.Imports as B' | |
import qualified Unittest.Compat.Another.Another | |
import qualified Unittest.Compat.Another.EnumType | |
import qualified Unittest.Compat.EnumType1 | |
data BasicTypes = BasicTypes{base' :: | |
Unittest.Compat.Another.Another.Another, | |
m_bool :: B'.Bool, m_str :: B'.Utf8, m_wstr :: B'.Utf16, | |
m_uint64 :: B'.Word64, m_uint16 :: B'.Word16, |
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
class BaseC t where | |
foo :: t -> Int | |
class BaseC t => ImmedC t where | |
bar :: t -> Int | |
class ImmedC t => ChildC t where | |
buz :: t -> Float | |
instance BaseC Base |
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
#define CHECK(x) \ | |
do { \ | |
NTSTATUS __l_status = (x); \ | |
if (! BCRYPT_SUCCESS(__l_status)) { \ | |
printf("ERROR: `%s` returned %x\n", #x, __l_status); \ | |
return 1; \ | |
} \ | |
} while (0) | |
UCHAR masterSecret[128]; |