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
diff -rN -u old-ThreadScope/GUI/SaveAs.hs new-ThreadScope/GUI/SaveAs.hs | |
--- old-ThreadScope/GUI/SaveAs.hs 2014-01-09 10:55:58.000000000 -0800 | |
+++ new-ThreadScope/GUI/SaveAs.hs 2014-01-09 10:55:58.000000000 -0800 | |
@@ -10,6 +10,20 @@ | |
-- Imports for GTK | |
import Graphics.UI.Gtk | |
import Graphics.Rendering.Cairo | |
+ ( Render | |
+ , Operator(..) | |
+ , Format(..) |
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
.cabal-sandbox | |
dist | |
cabal.sandbox.config | |
client | |
server | |
*.hi | |
*.o |
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
$ cabal sandbox init | |
$ ghci | |
h> import Control.Lens | |
<no location info>: | |
Could not find module `Control.Lens' | |
Perhaps you meant Control.Seq (from parallel-3.2.0.3) | |
$ cabal install lens | |
Resolving dependencies... | |
… |
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 TupleSections #-} | |
module DNA (count, nucleotideCounts) where | |
import Data.Map.Strict (Map, fromListWith) | |
count :: Char -> String -> Int | |
count x | |
| x `elem` "GACTU" = sum . map (fromEnum . (==x)) | |
| otherwise = error $ "invalid nucleotide " ++ show x |
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 BangPatterns #-} | |
import Data.Time (DiffTime, utctDayTime, getCurrentTime) | |
import Foreign (ForeignPtr, Int64, Ptr, mallocForeignPtr, withForeignPtr) | |
import Foreign.Storable (sizeOf, peek, poke) | |
import GHC.IO.Handle ( Handle, BufferMode(NoBuffering) | |
, hClose, hGetBuf, hSetBuffering, hPutBuf) | |
import Network ( Socket, HostName, PortID(PortNumber), PortNumber, accept | |
, connectTo, listenOn, withSocketsDo) | |
import System.Console.GetOpt ( ArgOrder(Permute), ArgDescr(..), OptDescr(..) | |
, getOpt, usageInfo) |
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
word_count.rs:7:8: 9:9 error: mismatched types: expected `char` but found `()` (expected char but found ()) | |
word_count.rs:7 unsafe { | |
word_count.rs:8 u_tolower(c); | |
word_count.rs:9 } | |
error: aborting due to previous error | |
check failed | |
FAILURES: word-count | |
[bob@res exercism.io (rust-exercises)]$ cat assignments/rust/word-count/example.rs | |
use std::hashmap::HashMap; |
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 System.Posix.Signals | |
signalsDebugFile :: String | |
signalsDebugFile = "signals.out" | |
handleUSR1 :: IO () |
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(merge_sort). | |
-export([merge_sort/1]). | |
% bottom-up merge sort | |
merge_sort([]) -> | |
[]; | |
merge_sort(L) -> | |
iterate([[X] || X <- L]). | |
iterate([Xs]) -> |
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
$ ghc -Wall -fforce-recomp ReadTill.hs | |
[1 of 1] Compiling ReadTill ( ReadTill.hs, ReadTill.o ) | |
ReadTill.hs:3:1: Warning: | |
Pattern match(es) are non-exhaustive | |
In an equation for `readTill': Patterns not matched: _ (_ : _) | |
ReadTill.hs:3:10: Warning: Defined but not used: `c' | |
ReadTill.hs:4:1: Warning: |
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 WordCount | |
( wordCount | |
) | |
where | |
import Data.Char | |
import Data.Function | |
import qualified Data.Map as M | |
import Control.Monad.Writer |