code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Unison.Hash.Extra where
import Data.Bytes.Serial
import Data.List
import Unison.Hash
import qualified Crypto.Hash as CH
import qualified Data.ByteArray as BA
import qualified Data.ByteString as B
import qualified Data.Bytes.Put as Put
import qualified Data.Bytes.VarInt as ... | nightscape/platform | node/src/Unison/Hash/Extra.hs | mit | 1,146 | 0 | 14 | 192 | 404 | 217 | 187 | 25 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Symmetry.IL.AST where
import Prelude hiding (concatMap, mapM, foldl, concat)
import Data.Traversable
import Data.Foldable
import Control... | abakst/symmetry | checker/src/Symmetry/IL/AST.hs | mit | 21,181 | 1 | 16 | 7,118 | 9,007 | 4,614 | 4,393 | 511 | 7 |
{-# LANGUAGE FlexibleInstances, BangPatterns #-}
-- | Field operations
module FieldElt where
class Show a => FieldElt a where
zero :: a
-- | Add all elements.
(~+~) :: a -> a -> a
-- | Subtract elements from second from first.
(~-~) :: a -> a -> a
... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss-examples/raster/Fluid/src-repa/FieldElt.hs | mit | 2,210 | 0 | 9 | 1,027 | 603 | 344 | 259 | 58 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
import Hypervisor.DomainInfo
import Hypervisor.XenStore
import Hypervisor.Debug
import Data.List
import Control.Monad
import Control.Applicative
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.IVC (crea... | hackern/network-transport-ivc | benchmarks/Throughput/Main.hs | mit | 2,060 | 0 | 16 | 476 | 805 | 404 | 401 | 62 | 2 |
import Data.Char
-- Exercise 1
--
putStr' :: String -> IO ()
putStr' [] = return ()
putStr' (x:xs) = putChar x >> putStr' xs
-- Exersice 2
--
putStrLn' :: String -> IO ()
putStrLn' [] = putChar '\n'
putStrLn' xs = putStr' xs >> putStrLn' ""
-- OK
--putStrLn' [] = putChar '\n'
--putStrLn' ... | anwb/fp-one-on-one | lecture-08-hw.hs | mit | 6,376 | 1 | 13 | 2,097 | 1,279 | 715 | 564 | 56 | 2 |
module Sync.MerkleTree.Client where
import Codec.Compression.GZip
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BL
import qualified Data.Foldable as F
import Data.Function
import Data.IORef
import Data.List
import qualified Data.Map a... | ekarayel/sync-mht | src/Sync/MerkleTree/Client.hs | mit | 7,418 | 0 | 23 | 1,949 | 2,430 | 1,246 | 1,184 | -1 | -1 |
module Main where
import Grammar
import Tokens
import Data.List
data Satisfiability = SAT | UNSAT deriving (Eq, Show)
type Literal = Int
type Variable = Int
type Clause = [Literal]
type VariableAssignement = (Int,Bool)
--extract variable from literal
exv :: Literal -> Variable
exv l
| l > 0 = l
| l < 0 = -... | 0a-/Haskell-DPLL-SAT-Solver | src/Main.hs | mit | 3,349 | 0 | 15 | 828 | 1,406 | 760 | 646 | 76 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
module WhatIsThisGame.Rendering (performRender) where
--------------------
-- Global Imports --
import Graphics.Rendering.OpenGL hiding ( Shader
, Color
)
import Data.Foldable hiding (fold... | crockeo/whatisthisgame | src/WhatIsThisGame/Rendering.hs | mit | 3,449 | 0 | 16 | 789 | 1,223 | 624 | 599 | 69 | 3 |
{-# LANGUAGE RecursiveDo #-}
module Main where
import Control.Monad
import Control.Monad.Tardis
print_tardis_example :: IO ()
print_tardis_example = print $ runTardis tardis_example (0,0)
tardis_example = do
x <- getFuture
sendFuture 234
sendPast 123
y <- getPast
return (x + y)
| sordina/tardistest | src/Examples.hs | mit | 296 | 0 | 9 | 56 | 90 | 46 | 44 | 12 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./Maude/Symbol.hs
Description : Maude Symbols
Copyright : (c) Martin Kuehl, Uni Bremen 2008-2009
License : GPLv2 or higher, see LICENSE.txt
Maintainer : mkhl@informatik.uni-bremen.de
Stability : experimental
Portability : portable
Definition of sy... | gnn/Hets | Maude/Symbol.hs | gpl-2.0 | 6,146 | 0 | 12 | 1,630 | 1,627 | 845 | 782 | 136 | 3 |
{-|
Module : $Header$
Copyright : (c) 2014 Edward O'Callaghan
License : GPL-2
Maintainer : eocallaghan@alterapraxis.com
Stability : provisional
Portability : portable
This module covers L1 FEC, L2 and L3 message translation.
-}
module BTS.GSMCommon where
import Data.Maybe
import Data.Tupl... | victoredwardocallaghan/hbts | src/BTS/GSMCommon.hs | gpl-2.0 | 15,413 | 0 | 12 | 5,770 | 3,205 | 1,809 | 1,396 | 342 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module ImageFileNotify where
import Control.Concurrent
import Control.Monad (forever)
import DBus
import DBus.Client
import Filesystem.Path
import Filesystem.Path.CurrentOS
import System.FSNotify
--
import Prelude hiding (FilePath)
actpred :: Event -> Bool
actpred (Added _ _) =... | wavewave/hoodle-daemon | exe/ImageFileNotify.hs | gpl-2.0 | 904 | 0 | 20 | 213 | 291 | 147 | 144 | 29 | 3 |
{-# LANGUAGE TypeSynonymInstances, FlexibleContexts #-}
{- |
Module : ./CSL/InteractiveTests.hs
Description : Test environment for CSL
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Ewaryst.Schulz@dfki.de
Stability : experimental
Portability... | gnn/Hets | CSL/InteractiveTests.hs | gpl-2.0 | 43,779 | 0 | 23 | 10,621 | 6,822 | 3,369 | 3,453 | 431 | 16 |
-- | input: on stdin, a list of file names, e.g.
-- /space/autotool/done/196/2020/8644/OK/5837.input
-- /space/autotool/done/196/2020/8644/OK/latest.input
{-# language PatternSignatures #-}
import Scorer.Einsendung
import Operate.Recommon
import Operate.Store ( location, load, store )
import Operate.Bank ( loglin... | marcellussiegburg/autotool | db/src/Operate/Rescore.hs | gpl-2.0 | 1,702 | 0 | 16 | 361 | 441 | 251 | 190 | 40 | 3 |
import Graphics.Gloss
main :: IO ()
main = display (InWindow "Dibujo" (800,300) (20,20)) white texto
texto :: Picture
texto = Text "Figura"
| jaalonso/I1M-Cod-Temas | src/Tema_25/texto.hs | gpl-2.0 | 142 | 0 | 8 | 24 | 63 | 34 | 29 | 5 | 1 |
module Handler.Devices where
import Data.Aeson (withObject, (.:?))
import Data.Time.Clock (getCurrentTime)
import Handler.Extension
import Import
data CreateDeviceRequest = CreateDeviceRequest
Text
ByteString
(Maybe ByteString)
(Maybe Text)
instance FromJSON C... | rumuki/rumuki-server | src/Handler/Devices.hs | gpl-3.0 | 1,746 | 0 | 15 | 355 | 418 | 215 | 203 | 42 | 1 |
{-
Symbols & Symbol Table
This file is part of AEx.
Copyright (C) 2016 Jeffrey Sharp
AEx is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at yo... | sharpjs/haskell-learning | src/Aex/Symbols.hs | gpl-3.0 | 832 | 0 | 6 | 226 | 20 | 12 | 8 | 5 | 0 |
module Chap03.Exercise05 where
import Chap03.Data.BinomialHeap.Ranked
import Chap03.Data.BinomialTree.Ranked
findMin :: Ord a => BinomialHeap a -> Maybe a
findMin (BH []) = Nothing
findMin (BH (t:ts)) = myMin (root t) (findMin $ BH ts)
where
myMin :: Ord a => a -> Maybe a -> Maybe a
myMin a Nothing = ... | stappit/okasaki-pfds | src/Chap03/Exercise05.hs | gpl-3.0 | 366 | 0 | 10 | 84 | 168 | 85 | 83 | 9 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-datapipeline/gen/Network/AWS/DataPipeline/ListPipelines.hs | mpl-2.0 | 5,712 | 0 | 14 | 1,260 | 840 | 496 | 344 | 97 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.FirebaseDynamicLinks
-- Copyright : (c) 2015-2016 Brendan Hay
-- License :... | brendanhay/gogol | gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks.hs | mpl-2.0 | 7,875 | 0 | 8 | 1,624 | 749 | 531 | 218 | 195 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Update.hs | mpl-2.0 | 6,159 | 0 | 18 | 1,456 | 827 | 479 | 348 | 121 | 1 |
module Main where
import Sound.MIDI
import Pipes
import qualified Pipes.Prelude as P
import qualified Pipes.ByteString as B
import Pipes.Attoparsec
import System.IO
import System.Environment
main :: IO ()
main = do
[fp] <- getArgs
fd <- openFile fp ReadMode
runEffect $
void (parsed midiParser (... | tsahyt/midi-simple | example/MidiDump.hs | lgpl-3.0 | 383 | 0 | 15 | 82 | 129 | 69 | 60 | 15 | 1 |
module Data.Wavelet.Internal.BitOps where
import Data.Bits
import Data.Vector.Storable (Vector)
import qualified Data.Vector.Storable as VS
import Data.Word (Word64)
{- Count the number of 1-bits in vector of word64s, in the bit range x[0..n] -}
rnk1Vector64 :: Int -> Vector... | jahaynes/waveletto | src/Data/Wavelet/Internal/BitOps.hs | lgpl-3.0 | 859 | 0 | 13 | 243 | 215 | 118 | 97 | 16 | 1 |
import Data.List
sum' [] [] = []
sum' (x:xs) (y:ys) = (x+y):(sum' xs ys)
sumup' s [] = s
sumup' s (x:xs) = sumup' (sum' s x) xs
sumup (x:xs) = sumup' x xs
ans' :: [[Int]] -> [Int]
ans' x =
let s = sumup x
z = zip [1..] s
s'= sortBy (\(a,b) (c,d) -> compare d b) z
in
map fst s'
ans [] = []
ans (... | a143753/AOJ | 0505.hs | apache-2.0 | 569 | 0 | 14 | 178 | 409 | 209 | 200 | 23 | 1 |
module Kernel.CPU.Hogbom where
import Foreign.Ptr
import Foreign.C
import Data
import Vector
foreign import ccall deconvolve ::
Ptr Double -- Model
-> Ptr Double -- Dirty image
-> Ptr Double -- Psf
-> CInt -- Height
-> CInt -- Pitch
-> CInt -- Max number of iterations
-> Double ... | SKA-ScienceDataProcessor/RC | MS4/dna-programs/Kernel/CPU/Hogbom.hs | apache-2.0 | 925 | 0 | 15 | 220 | 322 | 167 | 155 | 24 | 1 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, KindSignatures,
NoMonomorphismRestriction, TupleSections, OverloadedStrings,
ScopedTypeVariables, FlexibleContexts, GeneralizedNewtypeDeriving,
LambdaCase, ViewPatterns #-}
{-# OPTIONS_GHC -Wall #-}
import Bound
impo... | christiaanb/DepCore | Test2.hs | bsd-2-clause | 16,436 | 0 | 24 | 5,123 | 8,094 | 4,020 | 4,074 | 437 | 13 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import System.Event.IntMap (IntMap)
import qualified System.Event.IntMap as IM
main = defaultMain
[ bench "insert10k" $ whnf ascFrom n
]
where
-- Number of elements
n = 10000
-- | Create an integer map with keys in ascending orde... | tibbe/event | benchmarks/IntMap.hs | bsd-2-clause | 622 | 0 | 13 | 175 | 183 | 95 | 88 | 15 | 1 |
-- http://www.codewars.com/kata/53ad7224454985e4e8000eaa
module DragonCurve where
dragon :: Int -> String
dragon n
| n < 0 = ""
| otherwise = filter (\x -> x/='a' && x/='b') $ iterate (concatMap f) "Fa" !! n where
f 'a' = "aRbFR"
f 'b' = "LFaLb"
f x = [x] | Bodigrim/katas | src/haskell/6-Dragons-Curve.hs | bsd-2-clause | 274 | 0 | 13 | 65 | 112 | 57 | 55 | 8 | 3 |
module CLasH.Utils where
-- Standard Imports
import qualified Maybe
import Data.Accessor
import qualified Data.Accessor.Monad.Trans.StrictState as MonadState
import qualified Data.Map as Map
import qualified Control.Monad as Monad
import qualified Control.Monad.Trans.State.Strict as State
import qualified Debug.Trace ... | christiaanb/clash | clash/CLasH/Utils.hs | bsd-3-clause | 2,093 | 0 | 15 | 486 | 735 | 397 | 338 | 50 | 2 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}... | ElvishJerricco/servant-router | servant-router/src/Servant/Router.hs | bsd-3-clause | 7,796 | 0 | 19 | 1,941 | 2,637 | 1,337 | 1,300 | -1 | -1 |
{-# LANGUAGE Rank2Types #-}
-- | Paragon parsing module. Parser is written using Parsec.
module Language.Java.Paragon.Parser
(
parse
, runParser
, parseError
) where
import Prelude hiding (exp)
import Control.Applicative ((<$>))
import Control.Monad (when, void)
import Data.Maybe (catMaybes, fromJust)
impo... | bvdelft/paragon | src/Language/Java/Paragon/Parser.hs | bsd-3-clause | 10,682 | 0 | 17 | 2,197 | 2,631 | 1,309 | 1,322 | 227 | 5 |
import AI.Classification
import AI.Supervised.AdaBoost as AdaBoost
import AI.Supervised.NaiveBayes as NaiveBayes
import Criterion.Config
import Criterion.Main
import Database.HDBC
import Control.Monad.Random
import Control.Monad.Writer
-- import System.Random
myConfig = defaultConfig
{
-- ... | mikeizbicki/Classification | src/Performance.hs | bsd-3-clause | 1,683 | 0 | 12 | 410 | 474 | 252 | 222 | 29 | 1 |
-- | Allows Feat properties to be used with the test-framework package.
--
-- For an example of how to use test-framework, please see
-- <http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs>
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Exi... | jfischoff/test-framework-testing-feat | src/Test/Framework/Providers/Feat.hs | bsd-3-clause | 3,016 | 0 | 18 | 778 | 664 | 361 | 303 | 47 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards,
DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-}
module Protocol.ROC.PointTypes.PointType41 where
import GHC.Generics
import qualified Data.ByteString as BS
import Data.Word
import Data... | jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType41.hs | bsd-3-clause | 20,833 | 0 | 9 | 11,160 | 1,422 | 818 | 604 | 293 | 1 |
{-# LANGUAGE NamedFieldPuns, LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables, TypeFamilies #-}
{-# LANGUAGE RecordWildCards, QuasiQuotes, OverloadedStrings, DuplicateRecordFields #-}
module Main where
import qualified Graphics.UI.GLFW as GLFW
import System.IO
import System.Exit
import Data.IORef (newIORef, readIORef... | binarin/learnopengl | src/Main.hs | bsd-3-clause | 7,213 | 0 | 19 | 1,784 | 2,263 | 1,125 | 1,138 | 177 | 3 |
{-
- Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Hacq.
- Hacq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE FlexibleContexts #-}
module Control.Monad.Quantum.CircuitBuilderToffoli (
CircuitBuilderToffol... | ti1024/hacq | src/Control/Monad/Quantum/CircuitBuilderToffoli.hs | bsd-3-clause | 1,866 | 0 | 11 | 242 | 407 | 221 | 186 | 25 | 1 |
module Tests where
import Block
import Main
import Control.Monad
import Control.Monad.Trans.State.Lazy
strangeT = clearField oneToZero $ parseField $
"0,0,0,1,1,1,0,0,0,0;0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0;" ++
"0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0;" ++
"0,... | ksallberg/block-battle | Tests.hs | bsd-3-clause | 6,396 | 0 | 13 | 2,225 | 3,849 | 2,509 | 1,340 | 161 | 1 |
-- | This module implements a "flattening" pass over RichText 'Inline'
-- values. This means that a tree structure such as
--
-- @
-- EStrong
-- [ EStrikethrough
-- [ EText "inside"
-- ]
-- , EText "outside"
-- ]
-- @
--
-- will be converted into a "flat" representation without a tree
-- struc... | matterhorn-chat/matterhorn | src/Matterhorn/Draw/RichText/Flatten.hs | bsd-3-clause | 15,142 | 0 | 19 | 5,251 | 2,876 | 1,528 | 1,348 | 223 | 21 |
import qualified Wigner.Transformations as T
import qualified Wigner.Symbols as S
import qualified Wigner.DefineExpression as D
import qualified Wigner.OperatorAlgebra as O
import Wigner.Texable
import Wigner.Expression
import qualified Data.Map as M
import qualified Data.List as L
index :: Integer -> Index
index i =... | fjarri/wigner | examples/to_symm.hs | bsd-3-clause | 1,183 | 2 | 13 | 266 | 591 | 305 | 286 | 25 | 1 |
-- | Critical pair generation.
{-# LANGUAGE BangPatterns, FlexibleContexts, ScopedTypeVariables, MultiParamTypeClasses, RecordWildCards, OverloadedStrings, TypeFamilies, GeneralizedNewtypeDeriving #-}
module Twee.CP where
import qualified Twee.Term as Term
import Twee.Base
import Twee.Rule
import Twee.Index(Index)
imp... | nick8325/kbc | src/Twee/CP.hs | bsd-3-clause | 11,211 | 0 | 18 | 2,775 | 3,445 | 1,799 | 1,646 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies#-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS -Wall #-}
module LambdaCalculus.State2 (
SECDState(SECDState), emptySECD, SECDState1
) where
import Basic.Memory (Stack, MapLike, empty, emptyM)
import LambdaCalculus.Types -- pretty ... | davidzhulijun/TAM | LambdaCalculus/State2.hs | bsd-3-clause | 1,158 | 0 | 9 | 227 | 394 | 221 | 173 | 31 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Servant.JQuery.Internal where
import Control.Lens
import Data.Monoid
import Data.Proxy
import GHC.TypeLits
import Serva... | derekelkins/servant-jquery | src/Servant/JQuery/Internal.hs | bsd-3-clause | 5,545 | 0 | 13 | 1,396 | 1,929 | 1,018 | 911 | -1 | -1 |
module Control where
import SudokuCore
import Solver
import qualified Grader
import Sequence
import Digger
import Warehouse
data Instruction = MakeSolutions Int
| MakePuzzles
| GradePuzzles
run :: Warehouse -> Instruction -> Warehouse
run wh (MakeSolutions amount) =
let (sols, new... | Stulv/sudoku | src/Control.hs | bsd-3-clause | 977 | 0 | 15 | 226 | 306 | 158 | 148 | 29 | 1 |
-- break beat
import System.Cmd(system)
import Temporal.Music.Western.P12
import Temporal.Music.Demo.GeneralMidi
tom11 = mel [qd 0, qd 0, qnr, qd 0, hd 0.5, dhnr]
tom12 = mel [qd 0, qd 0, qnr, qd 0, hd 0.5, qnr, qd 0]
scoTom = ff' $ mel [tom11, tom12]
scoSnare = mp' $ mel [hnr, hd 0, hnr, hd 0]
scoMaracas = mp' $... | spell-music/temporal-music-notation-demo | examples/break.hs | bsd-3-clause | 1,024 | 1 | 14 | 297 | 504 | 265 | 239 | 25 | 1 |
module Win32Types
( module Win32Types
, nullAddr
) where
import StdDIS
----------------------------------------------------------------
-- Platform specific definitions
--
-- Most typedefs and prototypes in Win32 are expressed in terms
-- of these types. Try to follow suit - itll make it easier to
-- get things ... | OS2World/DEV-UTIL-HUGS | libraries/win32/Win32Types.hs | bsd-3-clause | 3,379 | 27 | 12 | 725 | 648 | 378 | 270 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
, RankNTypes
#-}
{-# OPTIONS_GHC -Wno-deprecations #-}
-- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN
-- and Control.Concurrent.SampleVar imports.
---------... | ezyang/ghc | libraries/base/Control/Concurrent.hs | bsd-3-clause | 24,912 | 0 | 21 | 6,066 | 1,998 | 1,054 | 944 | 133 | 3 |
--TODO -> Maybe this module is useful at more places than just func spec rendering.
-- In that case it's not a Rendering module and it needs to be replaced
module Database.Design.Ampersand.FSpec.Motivations (Motivated(purposeOf,purposesDefinedIn,explanations,explForObj), Meaning(..))
where
import Database.Design... | guoy34/ampersand | src/Database/Design/Ampersand/FSpec/Motivations.hs | gpl-3.0 | 30,197 | 0 | 20 | 15,324 | 1,448 | 871 | 577 | 84 | 1 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Tisch.Internal.Debug
( renderSqlQuery
, renderSqlQuery'
) where
import qualified Data.Profunctor.Product.Default as PP
import qualified Opaleye.Sql as O
import qualified Opaleye.Internal.Unpackspec as OI
impor... | k0001/opaleye-sot | src/lib/Tisch/Internal/Debug.hs | bsd-3-clause | 732 | 0 | 9 | 99 | 177 | 103 | 74 | 15 | 1 |
{-# OPTIONS -cpp #-}
{-# OPTIONS_GHC -O -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
--
-- (c) The University of Glasgow 2002-2006
--
-- Binary I/O library, with special tweaks for GHC
--
-- Based on the nhc98 Binary library, which is c... | mcmaniac/ghc | compiler/utils/Binary.hs | bsd-3-clause | 24,352 | 0 | 19 | 7,182 | 7,667 | 3,792 | 3,875 | -1 | -1 |
module Fun.Make where
import Inter.Types
import Fun.Type
import Fun.Check
import Fun.Machine
import Fun.Examples
import qualified Machine.Numerical.Config as C
import qualified Machine.Numerical.Make as M
import qualified Machine.Numerical.Inter as I
import qualified Autolib.Reporter.Checker as R
import Autolib.Se... | florianpilz/autotool | src/Fun/Make.hs | gpl-2.0 | 627 | 0 | 10 | 170 | 184 | 117 | 67 | 22 | 1 |
{-# LANGUAGE BangPatterns #-}
module Data.IntPSQ.Benchmark
( benchmark
) where
import Data.List (foldl')
import qualified Data.IntPSQ as IntPSQ
import Criterion.Main
import Prelude hiding (lookup)
import BenchmarkTypes
benchmark :: String -> [BElem] -> BenchmarkSet
benc... | ariep/psqueues | benchmarks/Data/IntPSQ/Benchmark.hs | bsd-3-clause | 1,951 | 0 | 13 | 513 | 617 | 335 | 282 | 34 | 2 |
{-# OPTIONS -Wall #-}
-----------------------------------------------------------------------------
-- |
-- Module : CTest.hs (executable)
-- Copyright : (c) 2008 Duncan Coutts, Benedikt Huber
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Portability : non-portable (Data.Generics)
... | llelf/language-c | test/src/CTest.hs | bsd-3-clause | 5,046 | 1 | 21 | 1,178 | 1,177 | 598 | 579 | 93 | 7 |
-- (c) The University of Glasgow 2006
--
-- FamInstEnv: Type checked family instance declarations
{-# LANGUAGE CPP, GADTs, ScopedTypeVariables #-}
module FamInstEnv (
FamInst(..), FamFlavor(..), famInstAxiom, famInstTyCon, famInstRHS,
famInstsRepTyCons, famInstRepTyCon_maybe, dataFamInstRepTyCon,
... | olsner/ghc | compiler/types/FamInstEnv.hs | bsd-3-clause | 65,687 | 6 | 21 | 18,614 | 9,373 | 5,043 | 4,330 | -1 | -1 |
module Test15 where
f n = n * f (n - 1)
g = f 13
| kmate/HaRe | old/testing/refacFunDef/Test15_TokOut.hs | bsd-3-clause | 51 | 0 | 8 | 18 | 34 | 18 | 16 | 3 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc.Windows
-- Copyright : (c) The Uni... | tolysz/prepare-ghcjs | spec-lts8/base-pure/GHC/Conc/Windows.hs | bsd-3-clause | 10,948 | 4 | 22 | 2,367 | 2,742 | 1,418 | 1,324 | -1 | -1 |
-- This one killed GHC 6.4 because it bogusly attributed
-- the CPR property to the constructor T
-- Result: a mkWWcpr crash
-- Needs -prof -auto-all to show it up
module ShouldCompile where
newtype T a = T { unT :: a }
f = unT
test cs = f $ case cs of
[] -> T []
(x:xs) -> T $ test cs
| urbanslug/ghc | testsuite/tests/stranal/should_compile/newtype.hs | bsd-3-clause | 301 | 0 | 10 | 80 | 76 | 44 | 32 | 6 | 2 |
{-
Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This p... | gbataille/pandoc | src/Text/Pandoc/Readers/Odt/Generic/Namespaces.hs | gpl-2.0 | 2,270 | 0 | 11 | 517 | 144 | 86 | 58 | 14 | 0 |
module Language.Haskell.Session.Hint.Util where
import qualified Data.Char as Char
type Expr = String
-- @safeBndFor expr@ generates a name @e@ such that it does not
-- occur free in @expr@ and, thus, it is safe to write something
-- like @e = expr@ (otherwise, it will get accidentally bound).
-- This ought to do t... | pmlodawski/ghc-session | src/Language/Haskell/Session/Hint/Util.hs | mit | 520 | 0 | 7 | 89 | 57 | 37 | 20 | 5 | 1 |
-- Hurl
-- For doing HTTP stuff.
module Hurl
( request
, requestUrl
, requestMethod
, requestHeaders
, requestBody
, constructRequest
, doRequest
, responseCode
, responseReason
, responseHeaders
, responseBody
{-
url
, protocol
, user
, host
, port
, path
, query
, hash
, constructUrl
-}
) where
-- For us... | jtpaasch/Hurl | src/Hurl.hs | mit | 5,842 | 0 | 10 | 1,314 | 754 | 408 | 346 | 81 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- |
-- Module : Exercise4
-- Description : Fu... | twesterhout/NWI-I00032-2017-Assignments | Exercise_4/Exercise4.hs | mit | 12,706 | 0 | 17 | 3,532 | 2,486 | 1,324 | 1,162 | 174 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module Control.Monad.Future.Class
( MonadFuture (..)
) where
import Control.Monad.Writer
-- | Async monad gives the safe and straightforward way to work
-- asynchonous resources.
--
... | pxqr/monad-future | Control/Monad/Future/Class.hs | mit | 640 | 0 | 10 | 143 | 93 | 55 | 38 | 10 | 0 |
module Lex (Prim(..),
Slash(..),
Cmplx(..),
Lexicon,
createLexicon) where
import qualified Data.Map as Map
data Prim = N | NP | S deriving (Eq, Show, Ord)
data Slash = Forw | Back deriving (Eq, Ord)
instance Show Slash where
show Forw = "/"
show Back = "\\"
d... | agrasley/HaskellCCG | Lex.hs | mit | 658 | 0 | 10 | 190 | 255 | 143 | 112 | 19 | 1 |
module Galua.Util.IOVector where
import qualified Data.Vector.Mutable as MVector
import Data.Vector.Mutable (MVector)
import Control.Monad.Primitive
readMaybe :: PrimMonad m => MVector (PrimState m) a -> Int -> m (Maybe a)
readMaybe v i
| 0 <= i, i < MVector.length v = Just <$> MVector.unsafeRead v i
| otherwise ... | GaloisInc/galua | galua-rts/src/Galua/Util/IOVector.hs | mit | 379 | 0 | 10 | 79 | 130 | 68 | 62 | 9 | 1 |
module CHPrelude (module CHPrelude) where
import ClassyPrelude as CHPrelude hiding ( head -- These are unsafe
, zip, zip3, zipWith, zipWith3 -- These are somewhat unsafe (import explicitly)
... | circuithub/circuithub-prelude | CHPrelude.hs | mit | 3,049 | 0 | 5 | 2,019 | 243 | 169 | 74 | 33 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Math.Vector
( Vector2(..)
, Vector3(..)
, Unit2(..)
, Unit3(..)
, vector2
, vector3
, unit2
, unit3
, origin
, unit
, fromUnit
, len
, (&.)
, (*&)
, (&^)
, reflect'
, extract3
) where
import Data.Vect.Double
import Data.Vect.Double.In... | burz/Rayzer | Math/Vector.hs | mit | 1,040 | 0 | 10 | 241 | 368 | 213 | 155 | 46 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.StorageEvent
(newStorageEvent, initStorageEvent, getKey, getKeyUnsafe,
getKeyUnchecked, getOldValue, getO... | ghcjs/jsaddle-dom | src/JSDOM/Generated/StorageEvent.hs | mit | 6,969 | 0 | 16 | 1,387 | 1,442 | 789 | 653 | -1 | -1 |
module GHCJS.DOM.Counter (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/Counter.hs | mit | 37 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module GhciMain(peekValue) where
import System.IO.Unsafe
import Data.IORef
import Control.Concurrent
peekValue :: a -> a
peekValue value = unsafePerformIO$ do
ref <- newIORef value
result <- newEmptyMVar
_ <- forkIO (do
val <- readIORef ref
result `putMVar` val
)
readMVar resul... | ThomasHickman/haskell-debug | GhciMain.hs | mit | 322 | 0 | 14 | 82 | 101 | 51 | 50 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import HlAdif
import HlOptions
import Options.Applicative
import Prelude hiding (readFile, putStr)
import qualified Data.ByteString.Char8 as B
import Data.Semigroup ((<>))
data Options = Options
{ basedir :: String
}
getOptionsParserInfo :: IO (ParserInfo Opti... | netom/hamloghs | app/hl-export.hs | mit | 869 | 0 | 12 | 207 | 234 | 125 | 109 | 27 | 2 |
{-# LANGUAGE UnicodeSyntax #-}
module Control.Monad.Trace
( module Control.Monad.Trace.Class
) where
import Control.Monad.Trace.Class
import Control.Monad.Trace.ErrorTrace
import Control.Monad.Trans.Trace
| alephcloud/hs-trace | src/Control/Monad/Trace.hs | mit | 207 | 0 | 5 | 19 | 39 | 28 | 11 | 6 | 0 |
--
-- Copyright (c) Krasimir Angelov 2008.
--
-- Random GTK utils
--
module Yi.UI.Pango.Utils where
import Paths_yi
import System.FilePath
import Graphics.UI.Gtk
import System.Glib.GError
loadIcon :: FilePath -> IO Pixbuf
loadIcon fpath = do
iconfile <- getDataFileName $ "art" </> fpath
icoProject <- catchGError... | codemac/yi-editor | src/Yi/UI/Pango/Utils.hs | gpl-2.0 | 598 | 0 | 14 | 141 | 144 | 79 | 65 | 12 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-| Unittests for our template-haskell generated code.
-}
{-
Copyright (C) 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of th... | ribag/ganeti-experiments | test/hs/Test/Ganeti/THH.hs | gpl-2.0 | 3,191 | 0 | 14 | 647 | 457 | 257 | 200 | 43 | 3 |
module Infernu.Builtins.Object
(object)
where
import Infernu.Builtins.Util
import Infernu.Prelude
import Infernu.Types
keyObj :: Int -> Type -> TQual Type
keyObj tv = withTypeClass "StringKeys" (tvar tv)
object :: TScheme (Fix FType)
object = ts []
$ Fix $ TRow (J... | sinelaw/infernu | src/Infernu/Builtins/Object.hs | gpl-2.0 | 1,495 | 0 | 20 | 509 | 587 | 295 | 292 | 20 | 1 |
module Main where
import Language.Java.Jdi
import qualified Language.Java.Jdi.VirtualMachine as Vm
import qualified Language.Java.Jdi.Event as E
import qualified Language.Java.Jdi.EventSet as ES
import qualified Language.Java.Jdi.EventRequest as ER
import qualified Language.Java.Jdi.ReferenceType as RT
import qualifie... | VictorDenisov/jdi | Tests/Test.hs | gpl-2.0 | 10,674 | 0 | 16 | 2,624 | 3,443 | 1,662 | 1,781 | 247 | 8 |
module Language.Bitcoin.Test.Parser
(
tests
) where
import Data.Binary (encode)
import Language.Bitcoin.Parser (run_parser)
import Language.Bitcoin.Types
import Language.Bitcoin.Utils (bs)
import Test.HUnit
import qualified Data.ByteString as B
import qualified Data.List as List
tests = TestLabel "Parser" $ TestLis... | copton/bitcoin-script-tools | test/Language/Bitcoin/Test/Parser.hs | gpl-3.0 | 2,295 | 0 | 14 | 381 | 619 | 357 | 262 | 48 | 2 |
{-# LANGUAGE RankNTypes #-}
module Deserialization where
import Control.Monad (liftM2)
import Data.Foldable (traverse_)
import Data.Function (fix)
import Text.Read (readEither)
import ExpSYM
data Tree = Leaf String
| Node String [Tree]
derivi... | capitanbatata/sandbox | tagless/src/Deserialization.hs | gpl-3.0 | 4,645 | 0 | 11 | 1,128 | 1,325 | 684 | 641 | 84 | 2 |
module Vigenere where
import Alphabetical
import Data.Either
import Likelihood
import Partial
import Util
key :: String -> Letters
key = cycle . rights . letters
encrypt :: Letters -> Letters -> Letters
encrypt = zipWith (+) . cycle
decrypt :: Letters -> Letters -> Letters
decrypt = zipWith (flip (-)) . cycle
| maugier/cctk | src/CCTK/Vigenere.hs | gpl-3.0 | 317 | 0 | 8 | 58 | 103 | 59 | 44 | 12 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Lamdu.GUI.ExpressionEdit.InferredEdit(make) where
import Control.Applicative ((<$>))
import Control.Lens.Operators
import Control.MonadA (MonadA)
import Data.Monoid (mempty)
import Lamdu.Config (Config)
import Lamdu.GUI.ExpressionGui (ExpressionGui, ParentPrecedence(..))
import Lam... | sinelaw/lamdu | Lamdu/GUI/ExpressionEdit/InferredEdit.hs | gpl-3.0 | 3,212 | 0 | 18 | 466 | 853 | 467 | 386 | -1 | -1 |
-- Monadic command line checkers..
-- @2013 Angel Alvarez
module OptsCheck where
-- Main module needed imports
import Control.Monad(foldM,liftM,ap)
import Control.Monad.IO.Class
import Control.Monad.Trans.Either
import Data.List (find)
import Data.Maybe ( fromMaybe )
import Data.Either
import Text.Show.Functions
imp... | AngelitoJ/HsParser | src/OptsCheck.hs | gpl-3.0 | 5,239 | 0 | 14 | 1,092 | 982 | 542 | 440 | 68 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs | mpl-2.0 | 6,344 | 0 | 15 | 1,310 | 579 | 353 | 226 | 85 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ServiceConsumerManagement.Types
-- Copyright : (c) 201... | brendanhay/gogol | gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types.hs | mpl-2.0 | 15,530 | 0 | 7 | 4,210 | 1,799 | 1,246 | 553 | 528 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/Versions/Delete.hs | mpl-2.0 | 6,646 | 0 | 22 | 1,659 | 1,013 | 587 | 426 | 149 | 1 |
module TransPCallWhile where
import AbsWhile
import Control.Monad.State
import Data.List(insert,nub)
import Data.Maybe(fromMaybe)
import Lib(true,false)
import Data.Data -- Data
import Data.Generics.Schemes -- everywhere
import Data.Generics.Aliases -- mkT
-- import qualified Data.Map.Strict as Ma... | tetsuo-jp/while-C-ocaml | src/desugar/TransPCallWhile.hs | agpl-3.0 | 4,588 | 0 | 21 | 1,168 | 1,596 | 791 | 805 | 102 | 11 |
{-# LANGUAGE DerivingVia, StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ProjectM36.Serialise.DatabaseContextFunctionError where
import Codec.Winery
import ProjectM36.DatabaseContextFunctionError
deriving via WineryVariant DatabaseContextFunctionError instance Serialise DatabaseContextFunctionErro... | agentm/project-m36 | src/lib/ProjectM36/Serialise/DatabaseContextFunctionError.hs | unlicense | 322 | 0 | 6 | 24 | 34 | 20 | 14 | -1 | -1 |
import MyUsefulFunctions (primes, isPrime)
import Data.Bits
import Data.Word
import System.IO
type JamcoinType = Word16
asBase::JamcoinType->Int->Int
asBase l b = asBase_helper l b 0
asBase_helper::Word16->Int->Int->Int
asBase_helper 0 _ acc = acc
asBase_helper x b acc = asBase_helper (shiftR x 1) b (if (testBit x 0... | Crazycolorz5/Haskell-Code | CoinJam.hs | unlicense | 1,418 | 0 | 19 | 266 | 638 | 331 | 307 | 34 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (forM_, when)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Resource (release)
import Data.Int
import qualified Data.Text ... | flowbox-public/imagemagick | examples/wandtest.hs | apache-2.0 | 6,566 | 0 | 14 | 1,419 | 1,693 | 806 | 887 | 149 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Writer.Strict
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon Graduate Institute of S... | holoed/Junior | lib/transformers-0.4.3.0/Control/Monad/Trans/Writer/Strict.hs | apache-2.0 | 8,312 | 0 | 14 | 1,786 | 2,292 | 1,251 | 1,041 | 113 | 1 |
module Physics.Collision
(
isCollide
-- isFacing
)where
import Physics.Motion
import FRP.Yampa.VectorSpace as Yam
isCollide :: Position -> Position -> Bool
isCollide m1 m2 = pos1 == pos2
where pos1 = getGridPos m1
pos2 = getGridPos m2
isFacing :: Motion -> Motion -> Bool
isFacing = undefined
| no-moree-ria10/utsuEater | src/Physics/Collision.hs | apache-2.0 | 320 | 0 | 7 | 73 | 88 | 50 | 38 | 11 | 1 |
rfac 0 = 1
rfac n = n * rfac (n-1)
| LJKitchen/ljk-luv-fp-foss | RecFac.hs | apache-2.0 | 35 | 0 | 8 | 11 | 31 | 15 | 16 | 2 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
-- | Internal implementation of the CRF model.
module Data.CRF.Chain1.Constrained.Model
( FeatIx (..)
, Model (..)
, mkModel
, valueL
, featToIx
, featToJustIx
, featToJust... | kawu/crf-chain1-constrained | src/Data/CRF/Chain1/Constrained/Model.hs | bsd-2-clause | 8,556 | 0 | 15 | 2,126 | 1,771 | 992 | 779 | 134 | 2 |
--------------------------------------------------------------------------------
module WhatMorphism.DirectedGraph
( DirectedGraph
, fromNode
, fromEdge
, fromEdges
, nodes
, neighbours
, delete
) where
--------------------------------------------------------------------------------... | jaspervdj/what-morphism | src/WhatMorphism/DirectedGraph.hs | bsd-3-clause | 2,102 | 0 | 10 | 337 | 466 | 248 | 218 | 33 | 1 |
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import System.Exit
import System.Process
import Data.Monoid ((<>))
main :: IO ()
main = defaultMainWithHooks simpleUserHooks { postBuild = installRtsPackage }
installRtsPackag... | bamboo/idris-cil | Setup.hs | bsd-3-clause | 719 | 0 | 11 | 120 | 217 | 115 | 102 | 18 | 2 |
module ExactCover (Matrix, solve, solve', cover) where
import Matrix
import Data.List
{--
Implementation of Donald Knuth's algorithm X in haskell. Algorithm X is a well known algorithm to solve the exact cover problem.
Given a set X and a S, a collection of subsets of X, determine the collection of subsets S* of S tha... | jaapterwoerds/algorithmx | src/ExactCover.hs | bsd-3-clause | 2,328 | 0 | 11 | 673 | 392 | 199 | 193 | -1 | -1 |
module Data.Aeson.Versions ( SerializedVersion(..)
, DeserializedVersion(..)
, runSerializer
, serialize
, serialize'
, serializeAll
, serializeAll'
... | vfiles/aeson-versioned | src/Data/Aeson/Versions.hs | bsd-3-clause | 1,923 | 0 | 5 | 1,264 | 202 | 139 | 63 | 47 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Mismi.S3.Internal (
f'
, calculateChunks
, calculateChunksCapped
, bytesRange
, sinkChan
, sinkChanWithDelay
, sinkQueue
, waitForNResults
, withFileSafe
) where
import Control.Con... | ambiata/mismi | mismi-s3/src/Mismi/S3/Internal.hs | bsd-3-clause | 3,641 | 0 | 17 | 915 | 1,110 | 594 | 516 | 81 | 2 |
module Lambda.Evaluator.Eval.Util (
gointoCaseRoute,
) where
import DeepControl.Applicative
import DeepControl.Monad
import Lambda.Action
import Lambda.Compiler
import Lambda.DataType
import qualified Lambda.DataType.PatternMatch as PM
import qualified Lambda.DataType.Type as Ty
import Lambda.Util
--------------... | ocean0yohsuke/Simply-Typed-Lambda | src/Lambda/Evaluator/Eval/Util.hs | bsd-3-clause | 791 | 0 | 15 | 150 | 187 | 107 | 80 | 18 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
-- compile with: ghc -O2 --make Foo.hs -pgml /path/to/g++
module Main where
import Sprng
main = do
seed <- newSeed
gen1 :: RNG LFG <- newRng seed
[gen2, gen3, gen4] <- spawnRng gen1 3
printRandInts gen1 10
printRandDoubles gen1 10
printRandInts gen2 10
print... | bjpop/haskell-sprng | examples/Simple.hs | bsd-3-clause | 785 | 0 | 10 | 181 | 269 | 119 | 150 | 25 | 1 |
module TimeSeriesData.Summary where
import TimeSeriesData.Types
import Time
import Control.Exception (assert)
-- Intervals must be sorted in ascending order. Result in seconds
groupByDay :: [Day] -> [TSInterval] -> [[TSInterval]]
groupByDay [] _ = []
groupByDay days [] = replicate (length days) []
groupByDay (d:ds) i... | hectorhon/autotrace2 | src/TimeSeriesData/Summary.hs | bsd-3-clause | 1,868 | 0 | 13 | 536 | 677 | 354 | 323 | 37 | 3 |
module Voting.Model where
import HAppS.Server hiding (result)
import Control.Monad
import Control.Applicative
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Rfc2822 (local_part, dot_atom_text, atext) -- email address parsing
import Voting.State
vote :: Vote -> Web String
vote (Vote (Left... | eelco/voting | Voting/Model.hs | bsd-3-clause | 2,281 | 0 | 18 | 635 | 657 | 345 | 312 | 50 | 2 |
-- ------------------------------------------------------------
{- |
Module : Yuuko.Text.XML.HXT.Arrow.Pickle.Xml
Copyright : Copyright (C) 2005-2008 Uwe Schmidt
License : MIT
Maintainer : Uwe Schmidt (uwe@fh-wedel.de)
Stability : experimental
Portability: portable
Pickler functions for... | nfjinjing/yuuko | src/Yuuko/Text/XML/HXT/Arrow/Pickle/Xml.hs | bsd-3-clause | 21,043 | 288 | 18 | 5,267 | 5,317 | 2,899 | 2,418 | 300 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.