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
#include "test.h" | |
void mutateint( int* p ) | |
{ | |
(*p) = 10 ; | |
} |
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 Graphics.UI.Gtk | |
import Control.Monad.Trans | |
import System.Directory | |
main :: IO () | |
main = do | |
putStrLn "file open test" | |
initGUI |
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 | |
{- an example how to select from a list | |
not satisfactory yet: | |
- there should be a simpler way to render a simple list | |
- i could not convert the model i got back to a list | |
from which to get the value | |
- the interface offers a great number of functions | |
and it is very difficult to find which ones are | |
really needed for simple tasks |
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 FlexibleContexts #-} | |
module Main where | |
import Data.Functor.Identity (Identity(..)) | |
import Control.Monad.Coroutine | |
import Control.Monad.Trans | |
import Control.Concurrent hiding (yield) | |
import Data.IORef |
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 System.IO | |
import System.Environment | |
import Graphics.Rendering.Cairo | |
data RGBA = RGBA { | |
colorR :: 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
{-# LANGUAGE ForeignFunctionInterface #-} | |
module InitDevice ( | |
initdevice | |
-- , extEventCanvas | |
) where | |
import Foreign.Ptr | |
import Foreign.C |
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 Control.Monad | |
import qualified Data.ByteString.Lazy as B | |
import qualified Codec.Compression.GZip as GZip | |
import System.IO | |
main :: IO () | |
main = do | |
putStrLn "gzip test" | |
withFile "testtest.hs.gz" ReadMode $ \h -> do | |
bcontents <- B.hGetContents h |
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 OverloadedStrings #-} | |
import Data.UUID.V5 | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Char8 as C | |
main :: IO () | |
main = do | |
putStrLn "uuid creation test" |
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.Concurrent | |
import Control.Monad | |
import Data.UUID | |
import System.Directory | |
import System.FilePath | |
import System.Process | |
import System.Posix.Files |
OlderNewer