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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- | Ch04a
module Ch04a where
multThree :: (Num a) => a -> a -> a -> a
multThree x y z = x * y * z
compareWithHundred :: (Num a, Ord a) => a -> Ordering
compareWithHundred = flip compare 100
divideByTen :: (Floating a) => a -> a
divideByTen = (/ 10)
isUpperAlphanum :: Char -> Bool
isUpperAlphanum = (`elem` ['A'..'... | codingiam/sandbox-hs | src/Ch04a.hs | bsd-3-clause | 2,303 | 0 | 12 | 598 | 1,423 | 771 | 652 | 66 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import Brick.Main (App(..), defaultMain, resizeOrQuit, neverShowCursor)
import Brick.Types
( Widget
, Padding(..)
)
import Brick.Widgets.C... | sjakobi/brick | programs/MarkupDemo.hs | bsd-3-clause | 1,202 | 0 | 13 | 289 | 422 | 250 | 172 | 35 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Protocol.ROC.PointTypes.PointType48 where
import Data.Binary.Get (getByteString,getWord8,Get)
import Data.ByteString (ByteString)
import Data.Word (Word8)
import Prelude (($),
return,
Eq,
... | plow-technologies/roc-translator | src/Protocol/ROC/PointTypes/PointType48.hs | bsd-3-clause | 13,232 | 0 | 9 | 7,280 | 1,020 | 564 | 456 | 216 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DataKinds #-}
#if __GLASGOW_HASKELL__ < 800
{-# OPTIONS_GHC -fcontext-stack=26 #-}
#else
{-# OPTIONS_GHC -freduction-depth=0 #-}
#endif
--------------------------------------------------------------------------------
-- |
-- Module : Databas... | YoEight/eventstore | Database/EventStore/Internal/Operation/ReadEvent/Message.hs | bsd-3-clause | 2,800 | 0 | 11 | 428 | 355 | 210 | 145 | 40 | 1 |
module Day11 where
import Control.Arrow
import Data.Function
import Data.List
import Data.Maybe
partOne = nextGoodPass input
partTwo = nextGoodPass partOne
nextGoodPass :: String -> String
nextGoodPass s = fromJust $ find goodPass $ filter (/= s) $ iterate nextWord s
nextWord... | z0isch/advent-of-code | src/Day11.hs | bsd-3-clause | 1,085 | 0 | 12 | 232 | 418 | 222 | 196 | 27 | 1 |
-- | All types.
module Senza.Types
(Senza)
where
import Text.Blaze.Html (Markup)
-- | The type for an HTML value. In case blaze changes its type again.
type Senza = Markup
| chrisdone/senza | src/Senza/Types.hs | bsd-3-clause | 179 | 0 | 5 | 37 | 30 | 20 | 10 | 4 | 0 |
module TestImportFile (tests) where
import Asserts
import Bucket.Import
import Bucket.Types
import Control.Exception
import Fixtures
import Prelude hiding (catch)
import System.FilePath
import Test.Hspec.HUnit()
import Test.Hspec.Monadic
import Test.Hspec.QuickCheck
import Test.HUnit
import Test.QuickCheck
tests = de... | rickardlindberg/orgapp | tests/TestImportFile.hs | bsd-3-clause | 3,329 | 0 | 21 | 804 | 827 | 402 | 425 | -1 | -1 |
module MatchTheTypes where
import Data.List (sort)
i :: Num a => a
i = 1
f :: Fractional a => a
f = 1.0
g :: RealFrac a => a
g = 1.0
freud :: Ord a => a -> a
freud x = x
freud' :: Int -> Int
freud' x = x
myX = 1 :: Int
sigmund :: Int -> Int
sigmund x = myX
jung :: Ord a => [a] -> a
jung xs = head (sort xs)
j... | chengzh2008/hpffp | src/ch06-Typeclasses/matchTheTypes.hs | bsd-3-clause | 714 | 0 | 7 | 184 | 367 | 195 | 172 | 31 | 1 |
module RDSTests.EventSubscriptionTests
( runEventSubscriptionTests
)
where
import Control.Applicative ((<$>))
import Control.Monad.IO.Class (liftIO)
import Data.Text (Text)
import Test.Hspec
import Cloud.AWS.RDS
import Cloud.AWS.RDS.Types (SourceType(..), DBInstance(..))
import Util
import RDSTests.Util
... | worksap-ate/aws-sdk | test/RDSTests/EventSubscriptionTests.hs | bsd-3-clause | 3,090 | 0 | 24 | 928 | 536 | 272 | 264 | 68 | 1 |
module Main where
import AOC2015.Day01
import AOC2015.Day02
import AOC2015.Day03
import AOC2015.Day04
import AOC2015.Day05
import AOC2015.Day06
import AOC2015.Day07
import AOC2015.Day08
import AOC2015.Day09
import AOC2015.Day10
import AOC2015.Day11
import AOC2015.Day12
import AOC2015.Day13
import AOC2015.Day14
import ... | bitrauser/aoc | src/Main.hs | bsd-3-clause | 599 | 0 | 7 | 68 | 146 | 86 | 60 | 28 | 1 |
module Main where
import ABS
(x:i:ni:num_div:obj:i_divides:f:n:primeb:reminder:res:the_end) = [1..]
main_ :: Method
main_ [] this wb k =
Assign n (Val (I 2500)) $
Assign x (Sync is_prime [n]) $
k
is_prime :: Method
is_prime [pn] this wb k =
Assign i (Val (I 1)) $
Assign ni (Val (I pn)) $
Assign num_d... | abstools/abs-haskell-formal | benchmarks/2_primality_test/progs/2500.hs | bsd-3-clause | 1,111 | 0 | 20 | 295 | 677 | 340 | 337 | 37 | 1 |
module Prosper.Money where
type Money = Double
| WraithM/prosper | src/Prosper/Money.hs | bsd-3-clause | 48 | 0 | 4 | 8 | 12 | 8 | 4 | 2 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Physics.Falling2d.OrthonormalBasis2d
(
)
where
import Data.Vect.Double.Base
import Physics.Falling.Math.OrthonormalBasis
instance OrthonormalBasis Vec2 Normal2 where
canonicalBasis = [ toNormalUnsafe $ Vec2 1.0 0.0, toNormalUnsafe $ Vec2 0.0 1.0 ]
completeBasis n = ... | sebcrozet/falling2d | Physics/Falling2d/OrthonormalBasis2d.hs | bsd-3-clause | 409 | 0 | 13 | 79 | 115 | 63 | 52 | 9 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
module Lucid.Foundation.Callouts.Joyride where
import Lucid.Base
import Lucid.Html5
import qualified Data.Text as T
import Data.Monoid
joyride_list_ :: T.Text
joyride_list_ = " joyride-list "
joyride_tip_guide_ :: T.Text
joyride_tip_guide_ = ... | athanclark/lucid-foundation | src/Lucid/Foundation/Callouts/Joyride.hs | bsd-3-clause | 632 | 0 | 5 | 80 | 105 | 65 | 40 | 19 | 1 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : Indexed.Command
-- Copyright : (C) 2012 Edward Kmett
-- License : BSD-style (see the file LICENSE)... | ekmett/indexed | src/Indexed/Command.hs | bsd-3-clause | 734 | 5 | 9 | 130 | 128 | 78 | 50 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
-- |
-- Module : Codec.Rot13
-- Description : Fast ROT13 cipher for Haskell.
-- Copyright : (c) Kyle Van Berendonck, 2014
-- License : BSD3
-- Maintainer : kvanberendonck@gmail.com
-- Stability : experim... | kvanberendonck/codec-rot13 | src/Codec/Rot13.hs | bsd-3-clause | 6,251 | 0 | 11 | 1,397 | 899 | 517 | 382 | 102 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Graphics.Storyboard.Box where
import Data.Monoid
import qualified Data.Set as Set
import Data.Set (Set)
import Data.Text (Text)
import Graphics.Blank as Blank
import qualified Graphics.Blank.Style as Style
import Graphics.Sto... | tonymorris/story-board | src/Graphics/Storyboard/Box.hs | bsd-3-clause | 4,086 | 0 | 17 | 1,166 | 1,138 | 607 | 531 | 95 | 2 |
{-# LANGUAGE RankNTypes #-}
module Node.Message.Decoder
( Decoder (..)
, DecoderStep (..)
, ByteOffset
, continueDecoding
, hoistDecoder
, hoistDecoderStep
, pureDone
, pureFail
, purePartial
) where
import qualified Data.ByteString as BS
import Data.Int (Int64)
impor... | input-output-hk/pos-haskell-prototype | networking/src/Node/Message/Decoder.hs | mit | 1,954 | 0 | 12 | 507 | 690 | 352 | 338 | 63 | 3 |
module Data.String.Util (
split
) where
-- | /O(n)/ Splits a 'String' into components delimited by separators,
-- where the predicate returns True for a separator element. The
-- resulting components do not contain the separators. Two adjacent
-- separators result in an empty component in the output. eg.
--
-- >>... | beni55/string | src/Data/String/Util.hs | mit | 557 | 0 | 11 | 125 | 111 | 65 | 46 | 7 | 2 |
module TypeConstraint where
{-- snippet OrdStack --}
data (Ord a) => OrdStack a = Bottom
| Item a (OrdStack a)
deriving (Show)
{-- /snippet OrdStack --}
{-- snippet isIncreasing --}
isIncreasing :: (Ord a) => OrdStack a -> Bool
isIncreasing (Item a rest@(Item b ... | binesiyu/ifl | examples/ch10/TypeConstraint.hs | mit | 550 | 0 | 10 | 163 | 168 | 89 | 79 | 11 | 1 |
{- |
Module : ./MMT/Hets2mmt.hs
Description : interface for MMT jar
Copyright :
License :
Maintainer : a.jakubauskas@jacobs-university.de
Stability : experimental
Portability :
-}
module MMT.Hets2mmt (
mmtRes,
callSpec
)
where
import System.Process
import System.IO
import Common.Resul... | spechub/Hets | MMT/Hets2mmt.hs | gpl-2.0 | 2,619 | 0 | 14 | 837 | 692 | 356 | 336 | 67 | 2 |
module GameLogic.StartLogic
( newGame
) where
import System.Random
import Control.Lens
import GameLogic.Data.Facade
import GameLogic.Util.Shuffle
newGame::IO GameData
newGame = newGame' defSeed
newGame':: Int -> IO GameData
newGame' seed
| 0 == seed
= fmap mkStartGameGen newStdGen
| otherwise
... | EPashkin/gamenumber-freegame | src_gl/GameLogic/StartLogic.hs | gpl-3.0 | 2,138 | 0 | 14 | 447 | 658 | 347 | 311 | 49 | 1 |
-- Copyright (c) 2014 Contributors as noted in the AUTHORS file
--
-- 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 3 of the License, or
-- (at your option) any later version.
-... | frp-arduino/frp-arduino | examples/Combine.hs | gpl-3.0 | 1,162 | 0 | 11 | 243 | 133 | 67 | 66 | 10 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : Glome.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:42
Warning : this file is machine generated - do not mod... | keera-studios/hsQt | extra-pkgs/Glome/Qt/Glome.hs | bsd-2-clause | 682 | 0 | 5 | 119 | 77 | 54 | 23 | 12 | 0 |
module Main where
import Lib
main :: IO ()
main = someFunc
{-99 Haskell Problems-}
{-| Get the last element of a list-}
myLast :: [a] -> a
myLast [x] = x
myLast (_:xs) = myLast xs
{-| Get the second to last element of a list-}
myButtLast :: [a] -> a
myButtLast [x, _] = x
myButtLast (_:xs) = myButtLast xs
{-| Get... | MauriceIsAG/HaskellScratch | .stack-work/intero/intero1846heo.hs | bsd-3-clause | 7,113 | 0 | 18 | 2,344 | 3,627 | 1,921 | 1,706 | 187 | 3 |
import Development.Shake
import Development.Shake.System
import System.FilePath
main :: IO ()
main = shake $ do
("subdirectory" </> "foo") *> \x -> do
system' $ ["touch",x]
want ["subdirectory/foo"]
| beni55/openshake | tests/creates-directory-implicitly/Shakefile.hs | bsd-3-clause | 218 | 0 | 13 | 46 | 77 | 41 | 36 | 8 | 1 |
module ShallowVector where
import qualified Data.Vector.Unboxed as V
import Types
import Debug.Trace
{-# RULES "darkenBy.brightenBy" forall im1 n. darkenBy n (brightenBy n im1) = im1 #-}
{-# RULES "brightenBy.darkenBy" forall im1 n. brightenBy n (darkenBy n im1) = im1 #-}
-- TODO: overload + and - to be brightenBy ... | robstewart57/small-image-processing-dsl-implementations | haskell/small-image-processing-dsl/src/ShallowVector.hs | bsd-3-clause | 2,036 | 0 | 16 | 575 | 662 | 354 | 308 | 35 | 1 |
{-# LANGUAGE PatternGuards #-}
module Main (main) where
import Network.HTTP hiding (password)
import Network.Browser
import Network.URI (URI(..), parseRelativeReference, relativeTo)
import Distribution.Client
import Distribution.Client.Cron (cron, rethrowSignalsAsExceptions,
Signal(..... | agrafix/hackage-server | BuildClient.hs | bsd-3-clause | 35,442 | 0 | 25 | 11,191 | 7,902 | 4,077 | 3,825 | 640 | 12 |
-----------------------------------------------------------------------------
--
-- Object-file symbols (called CLabel for histerical raisins).
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module CLabel (
CLabel, -- abstract type... | mcmaniac/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | 46,035 | 0 | 14 | 13,148 | 9,229 | 4,860 | 4,369 | 703 | 21 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
TcInstDecls: Typechecking instance declarations
-}
{-# LANGUAGE CPP #-}
module ETA.TypeCheck.TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where
import ETA.HsSyn.HsSyn
import ETA.TypeCheck.TcBinds
import ETA.TypeCheck.TcTyCl... | pparkkin/eta | compiler/ETA/TypeCheck/TcInstDcls.hs | bsd-3-clause | 64,101 | 6 | 26 | 18,840 | 8,168 | 4,246 | 3,922 | 578 | 7 |
-- | This module defines 'TriggerEvent', which describes actions that may create
-- new 'Event's that can be triggered from 'IO'.
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
module Reflex.TriggerEvent.Class
( TriggerEvent (..)
) where
import Refl... | ryantrinkle/reflex | src/Reflex/TriggerEvent/Class.hs | bsd-3-clause | 2,839 | 0 | 14 | 431 | 432 | 236 | 196 | -1 | -1 |
module Dwarf.Types
( -- * Dwarf information
DwarfInfo(..)
, pprDwarfInfo
, pprAbbrevDecls
-- * Dwarf frame
, DwarfFrame(..), DwarfFrameProc(..), DwarfFrameBlock(..)
, pprDwarfFrame
-- * Utilities
, pprByte
, pprData4'
, pprDwWord
, pprWord
, pprLEBWord
, pprLEBInt
, wordAlign
, sec... | urbanslug/ghc | compiler/nativeGen/Dwarf/Types.hs | bsd-3-clause | 17,462 | 0 | 21 | 4,499 | 3,905 | 2,043 | 1,862 | 308 | 8 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Quit
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : por... | TOSPIO/yi | src/library/Yi/Keymap/Vim/Ex/Commands/Quit.hs | gpl-2.0 | 4,052 | 0 | 17 | 1,316 | 1,104 | 600 | 504 | 79 | 4 |
{-
Physical Engine Simulation
*Main> plotSpeed simuldata1
*Main> plotD
plotDispl plotDots
*Main> plotDispl simuldata1
*Main>
*Main> plotDispl simuldata2
*Main> plotSpeed simuldata2
-}
import Graphics.Gnuplot.Simple
type Time = Double
type Displ = Double
type Speed = Double
type Accel = Double
type State = (Time... | Khady/Functional-Programming | codes/newton.hs | unlicense | 4,190 | 1 | 14 | 842 | 963 | 526 | 437 | 56 | 1 |
{-|
Module : Idris.Elab.Type
Description : Code to elaborate types.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
module Idris.Elab.Type (
buildType, elabType, elabType'
, elabPostulate, elabExtern
) where
import Idris.AbsSyntax
import Idris.ASTUtils... | ozgurakgun/Idris-dev | src/Idris/Elab/Type.hs | bsd-3-clause | 11,785 | 0 | 19 | 3,919 | 3,506 | 1,751 | 1,755 | 228 | 10 |
module A5 where
import D5
main = sumFun [1..4] + (sum ( map (f f_gen) [1..7]))
| kmate/HaRe | old/testing/generaliseDef/A5_TokOut.hs | bsd-3-clause | 93 | 0 | 11 | 30 | 49 | 27 | 22 | 3 | 1 |
{-# OPTIONS_JHC -fno-prelude -fffi #-}
module System.C.Stdio where
import Jhc.Basics
import Jhc.Type.C
import Jhc.Type.Ptr
type FILE = Ptr CFile
foreign import ccall "stdio.h fopen" c_fopen :: Ptr CChar -> Ptr CChar -> IO FILE
foreign import ccall "stdio.h popen" c_popen :: Ptr CChar -> P... | m-alvarez/jhc | lib/jhc/System/C/Stdio.hs | mit | 1,772 | 7 | 11 | 393 | 461 | 242 | 219 | -1 | -1 |
{-# LANGUAGE CPP, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Server.Packages.PackageIndex
-- Copyright : (c) David Himmelstrup 2005,
-- Bjorn Bringert 2007,
-- ... | ocharles/hackage-server | Distribution/Server/Packages/PackageIndex.hs | bsd-3-clause | 12,567 | 0 | 14 | 2,872 | 2,894 | 1,548 | 1,346 | 180 | 5 |
module Aws.Sqs.Commands (
module Aws.Sqs.Commands.Message,
module Aws.Sqs.Commands.Permission,
module Aws.Sqs.Commands.Queue,
module Aws.Sqs.Commands.QueueAttributes
) where
import Aws.Sqs.Commands.Message
import Aws.Sqs.Commands.Permission
import Aws.Sqs.Commands.Queue
import Aws.Sqs.Commands.QueueAttributes
| RayRacine/aws | Aws/Sqs/Commands.hs | bsd-3-clause | 320 | 0 | 5 | 30 | 69 | 50 | 19 | 9 | 0 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="az-AZ">
<title>Getting started Guide</title>
<maps>
<homeID>top</homeID>
<mapref locat... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/gettingStarted/resources/help_az_AZ/helpset_az_AZ.hs | apache-2.0 | 968 | 79 | 66 | 158 | 411 | 208 | 203 | -1 | -1 |
{-# OPTIONS_GHC -fglasgow-exts -O -ddump-simpl -fno-method-sharing #-}
module Roman where
import Control.Monad.ST
newtype T s a = T { unT :: Int -> ST s a }
instance Monad (T s) where
return = T . const . return
T p >>= f = T $ \i -> do { x <- p i
; unT (f x) i }
myIndex :: T s Int... | ezyang/ghc | testsuite/tests/eyeball/inline1.hs | bsd-3-clause | 916 | 0 | 12 | 317 | 170 | 92 | 78 | 14 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
-- | This holds the certificate authority (without the private key)
module Types.CA where
import Control.Lens
import Data.Data (Data, Typeable)
import D... | tazjin/herbert | src/Types/CA.hs | mit | 733 | 0 | 8 | 178 | 111 | 65 | 46 | 15 | 0 |
module Spear.Math.Ray
(
Ray(..)
, raylr
, rayfb
)
where
import Spear.Math.Utils
import Spear.Math.Vector
data Ray = Ray
{ origin :: {-# UNPACK #-} !Vector2
, dir :: {-# UNPACK #-} !Vector2
}
-- | Classify the given point's position with respect to the given ray. Left/Righ... | jeannekamikaze/Spear | Spear/Math/Ray.hs | mit | 650 | 0 | 11 | 192 | 188 | 101 | 87 | 18 | 1 |
module Numeric.LinearCombination
( LinearCombination(..)
, Term(..)
, multiplyUsing
, operationUsing
, basisChangeUsing
, Numeric.LinearCombination.filter
, find
, elementsToList
, scalarMult
, zero
, showUsing
, simplify
) where
import GHC.Exts (sortWith)
import Data.AEq
import Numeric (sho... | pnutus/geometric-algebra | src/Numeric/LinearCombination.hs | mit | 5,080 | 0 | 12 | 1,448 | 2,053 | 1,076 | 977 | 116 | 4 |
-- 1
take 1 $ map (+1) [undefined, 2, 3] -- ⊥
-- 2
take 1 $ map (+1) [1, undefined, 3] -- [2]
-- 3
take 2 $ map (+1) [1, undefined, 3] -- ⊥
-- 4
-- itIsMystery takes string and return list of bools where True correspond to vowel and False to consonant for input string
itIsMystery :: String -> [Bool]
itIsMystery xs = m... | ashnikel/haskellbook | ch09/ch09.9_ex.hs | mit | 473 | 0 | 10 | 95 | 199 | 111 | 88 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Helpers.Database where
import Database.Groundhog
import Database.Groundhog.Core
import Database.Groundhog.Sqlite
import Data.Proxy
db :: Proxy Sqlite
db = undefined
intToKey :: (PrimitivePersistField (Key a b)) => Int -> Key a b
intToKey p = integralToKey p
integralToKey ::... | archaeron/chatty-server | src/Helpers/Database.hs | mit | 471 | 0 | 8 | 66 | 136 | 73 | 63 | 12 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module AltParsing where
import Control.Applicative
import Text.Trifecta
import Text.RawString.QQ
type NumberOrString = Either Integer String
parseNos :: Parser NumberOrString
parseNos =
skipMany (oneOf "\n")
>>
(Left <$> integer)
<|> (Right <$> some letter)
eitherOr... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter24/AltParsing/src/AltParsing.hs | mit | 365 | 0 | 9 | 73 | 93 | 54 | 39 | 14 | 1 |
module Lab6 where
import System.CPUTime
import System.Random
import Control.Monad
import Lecture6
-- Exercise 1
-- Catches some edge cases and then use the exMsq to calculate squared modulo.
exM :: Integer -> Integer -> Integer -> Integer
exM b e m
| e < 0 = 0
| e == 0 = 1 `mod` m
| otherwise = exMsq b e... | Gurrt/software-testing | week-6/Lab6.hs | mit | 7,815 | 0 | 13 | 2,049 | 1,603 | 818 | 785 | 99 | 2 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Y2018.M04.D04.Exercise where
{--
So you have the data from the last two day's exercises, let's start storing
those data into a PostgreSQL database. Today's exercise is to store just
the authors.
But there's a catch: you have to consider you're doing this as a da... | geophf/1HaskellADay | exercises/HAD/Y2018/M04/D04/Exercise.hs | mit | 2,012 | 0 | 7 | 296 | 249 | 154 | 95 | 28 | 1 |
{-# LANGUAGE OverloadedStrings #-}
--
-- | Test SQL queries using SQLite interpreter
--
module Codex.Tester.Sql (
sqliteTester
) where
import Codex.Tester
import Control.Applicative ((<|>))
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import Data.List (sort)... | pbv/codex | src/Codex/Tester/Sql.hs | mit | 5,242 | 0 | 20 | 1,728 | 1,409 | 701 | 708 | 107 | 6 |
module Triplet (isPythagorean, mkTriplet, pythagoreanTriplets) where
isPythagorean :: (Int, Int, Int) -> Bool
isPythagorean (a, b, c) = a * a + b * b + c * c == 2 * m * m
where m = maximum [a, b, c]
mkTriplet :: Int -> Int -> Int -> (Int, Int, Int)
mkTriplet a b c = (a, b, c)
pythagoreanTriplets :: Int -> Int -> [... | c19/Exercism-Haskell | pythagorean-triplet/src/Triplet.hs | mit | 484 | 0 | 12 | 94 | 239 | 136 | 103 | 8 | 1 |
import Test.Hspec
import Control.Exception (evaluate)
import qualified Data.Map.Strict as Map
import Go
import Go.UI.Color
main :: IO ()
main = hspec $ do
describe "Go.addMove" $ do
it "adds a black stone to an empty board" $ do
let point = Point (3, 4)
Right game = addMove new... | tsujigiri/gosh | spec/Spec.hs | mit | 2,748 | 0 | 22 | 935 | 916 | 470 | 446 | 56 | 1 |
module RandomForest where
import Data.List
import Numeric.LinearAlgebra
import Predictor
import Utils
import CART
type RandomForest = EnsembleLearner CART_Tree
newtype EnsembleLearner learner = EL [learner]
instance (Predictor l) => Predictor (EnsembleLearner l) where
predict v (EL ls) = (sum' (map (predict v) ls... | jvictor0/OnlineRandomForest | src/RandomForest.hs | mit | 518 | 0 | 12 | 93 | 211 | 111 | 100 | 13 | 1 |
-- Copyright 2015 Mitchell Kember. Subject to the MIT License.
-- Project Euler: Problem 11
-- Summation of primes
module Problem11 where
import Data.Maybe (catMaybes)
type Coord = (Int, Int)
grid :: [[Int]]
grid =
[ [08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08]
, [49, 49,... | mk12/euler | haskell/Problem11.hs | mit | 2,717 | 0 | 13 | 747 | 1,677 | 1,069 | 608 | 44 | 1 |
module Note.Character where
import Control.Arrow
import Control.Applicative hiding ( (<|>) )
import Control.Name
import Data.List
import Data.String.Utils
import Data.Utils
import Note
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.TagWiki
import Text.Pin ( fromName )
import qualified Control.Modifi... | Soares/tagwiki | src/Note/Character.hs | mit | 4,677 | 0 | 13 | 1,078 | 1,131 | 622 | 509 | 63 | 4 |
-- Take a number of items from the beginning of a list.
module Take where
import Prelude hiding (take)
take :: Integer -> [t] -> [t]
take _ [] = []
take numberOfItems list
| numberOfItems < 0 = error "Negative number."
| otherwise = take' numberOfItems list
where
take' 0 _ = []
take' numberOfIte... | pascal-knodel/haskell-craft | Examples/· Recursion/· Primitive Recursion/Lists/Take.hs | mit | 630 | 0 | 11 | 169 | 142 | 78 | 64 | 10 | 2 |
module ScoreToLilypond.UtilsTest where
import Data.ByteString.Builder
import Data.Either.Combinators (fromRight')
import Data.Ratio
import qualified Data.Set as Set
import Music.RealSimpleMusic.Music.Data
import Music.RealSimpleMusic.Music.Utils
import Music.... | tomtitchener/RealSimpleMusic | tests/ScoreToLilypond/UtilsTest.hs | cc0-1.0 | 6,069 | 0 | 17 | 916 | 2,156 | 1,202 | 954 | 85 | 1 |
{-# OPTIONS_GHC -Wall #-}
import Control.Monad (void)
import Test.HUnit
import CreditCard
digitsTest1, digitsTest2, digitsTest3, digitsTest4 :: Test
digitsTest1 = TestCase $ assertEqual "in digits decomposition"
[1,2,3,4] (toDigits 1234)
digitsTest2 = TestCase $ assertEqual "in reverse digits decomposition"
[... | mgrabovsky/upenn-cis194 | hw01/testCreditCard.hs | cc0-1.0 | 1,819 | 0 | 10 | 502 | 445 | 248 | 197 | 41 | 1 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module NLP.Grabber.Duden where
import Data.Text (Text)
import qualified Data.Text as T
import Text.XML.HXT.Core hiding (when)
import NLP.Grabber.Download
import Data.List
import Data.Monoid
import NLP.Types
import Control.Monad... | azapps/nlp.hs | src/NLP/Grabber/Duden.hs | gpl-3.0 | 2,469 | 4 | 15 | 539 | 845 | 421 | 424 | 65 | 2 |
module Kevin.Types (
Kevin(Kevin),
KevinIO,
KevinS,
Privclass,
Chatroom,
User(..),
Title,
PrivclassStore,
UserStore,
TitleStore,
kevin,
use_,
get_,
gets_,
put_,
modify_,
-- lenses
users, privclasses, titles, joining, loggedIn,
-- other access... | ekmett/kevin | Kevin/Types.hs | gpl-3.0 | 2,440 | 0 | 11 | 787 | 759 | 431 | 328 | -1 | -1 |
module Scheme.Internal (
LispVal (..)
, LispError (..)
, ThrowsError, IOThrowsError
, throwError, catchError, throwParserError
, liftIO, liftThrows, runErrorT
, showValPretty
, Env, Frame, Cell
) where
import Control.Monad.Error
import System.IO (Handle)
import Text.PrettyPrint.ANSI.Leijen (Doc)
imp... | Altech/haScm | src/Scheme/Internal.hs | gpl-3.0 | 4,789 | 0 | 13 | 1,075 | 1,708 | 894 | 814 | 102 | 3 |
-- | The Sprites component of the Lamdu Theme
{-# LANGUAGE TemplateHaskell, DerivingVia #-}
module Lamdu.Config.Theme.Sprites where
import qualified Control.Lens as Lens
import qualified Data.Aeson.TH.Extended as JsonTH
import GUI.Momentu.Animation.Id (ElemIds)
import Lamdu.Prelude
data Sprites a... | Peaker/lamdu | src/Lamdu/Config/Theme/Sprites.hs | gpl-3.0 | 628 | 0 | 8 | 123 | 150 | 89 | 61 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs | mpl-2.0 | 6,812 | 0 | 18 | 1,486 | 881 | 520 | 361 | 125 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs | mpl-2.0 | 6,199 | 0 | 20 | 1,532 | 939 | 547 | 392 | 132 | 1 |
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func = x + x
| lspitzner/brittany | data/Test424.hs | agpl-3.0 | 127 | 0 | 5 | 16 | 11 | 6 | 5 | 1 | 1 |
module HaskellPU.Algorithms.QR where
import qualified Prelude
import Prelude (($), (-), (==), Int, Float, undefined)
import Data.Word
import HaskellPU.HighDataTypes
import HaskellPU.Data.Matrix
import Data.Functor
unsplit :: Word -> Word -> HighMatrix (Matrix Float) -> Matrix Float
unsplit _ _ _ = undefined
qr_lu f1... | hsyl20/HaskellPU | lib/HaskellPU/Algorithms/QR.hs | lgpl-3.0 | 1,204 | 0 | 12 | 270 | 531 | 280 | 251 | 28 | 2 |
module PoemLines where
myWords :: String -> [String]
myWords [] = []
myWords (s:str)
| s == ' ' = myWords str
| otherwise = takeWhile (/= ' ') (s:str) : myWords (dropWhile (/= ' ') (s:str))
firstSen :: String
firstSen = "Tyger Tyger, burning bright\n"
secondSen :: String
secondSen = "In the forests of the night\n... | thewoolleyman/haskellbook | 09/06/eric/PoemLines.hs | unlicense | 1,237 | 0 | 11 | 243 | 448 | 238 | 210 | 37 | 1 |
module Git.Command.ReadTree (run) where
run :: [String] -> IO ()
run args = return () | wereHamster/yag | Git/Command/ReadTree.hs | unlicense | 86 | 0 | 7 | 15 | 42 | 23 | 19 | 3 | 1 |
{-# LANGUAGE FlexibleInstances #-}
-- | The RLP module provides a framework within which serializers can be built, described in the Ethereum Yellowpaper (<http://gavwood.com/paper.pdf>).
--
-- The 'RLPObject' is an intermediate data container, whose serialization rules are well defined. By creating code that converts... | zchn/ethereum-analyzer | ethereum-analyzer-deps/src/Blockchain/Data/RLP.hs | apache-2.0 | 6,324 | 0 | 17 | 1,360 | 1,885 | 968 | 917 | 134 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
{-
HSStructMain.hs
Copyright 2014 Sebastien Soudan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unle... | ssoudan/hsStruct | src/HSStructMain.hs | apache-2.0 | 4,013 | 0 | 14 | 968 | 1,000 | 507 | 493 | 62 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTextCursor.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:35
Warning : this file is machine generated - do n... | uduki/hsQt | Qtc/Enums/Gui/QTextCursor.hs | bsd-2-clause | 7,402 | 0 | 18 | 1,595 | 1,984 | 1,006 | 978 | 202 | 1 |
--
-- Copyright 2014, NICTA
--
-- This software may be distributed and modified according to the terms of
-- the BSD 2-Clause license. Note that NO WARRANTY is provided.
-- See "LICENSE_BSD2.txt" for details.
--
-- @TAG(NICTA_BSD)
--
-- Printer for C source format to be consumed by the CapDL initialiser.
-- Note: corr... | smaccm/capDL-tool | CapDL/PrintC.hs | bsd-2-clause | 14,280 | 0 | 45 | 3,567 | 4,635 | 2,357 | 2,278 | 275 | 26 |
{-# LANGUAGE CPP, OverloadedStrings #-}
-- Requires the network-bytestring library.
--
-- Start server and run
-- httperf --server=localhost --port=5002 --uri=/ --num-conns=10000
-- or
-- ab -n 10000 -c 100 http://localhost:5002/
import Args (ljust, parseArgs, positive, theLast)
import Control.Concurrent (forkIO,... | tibbe/event | benchmarks/PongServer.hs | bsd-2-clause | 3,719 | 0 | 14 | 941 | 980 | 538 | 442 | 82 | 2 |
module Application.Scaffold.Generate.Darcs where
import System.Process
import System.Exit
darcsInit :: IO ExitCode
darcsInit = system "darcs init"
darcsFile :: FilePath -> IO ExitCode
darcsFile fp = do
putStrLn $ "add " ++ fp
system ("darcs add " ++ fp)
darcsRecord :: String -> IO ExitCode
darcsRecord patchna... | wavewave/scaffold | lib/Application/Scaffold/Generate/Darcs.hs | bsd-2-clause | 387 | 0 | 9 | 72 | 112 | 58 | 54 | 12 | 1 |
module Animation where
import Graphics.UI.SDL
import Graphics.UI.SDL.Image
import Control.Monad
type Animation = [Surface]
loadAnimation :: FilePath -> Int -> IO Animation
loadAnimation folder size = do
frames <- forM [0..size-1] $ \i -> do
load $ folder ++ show i ++ ".png"
return $ cycle frames | alexisVallet/hachitai-haskell-shmup | Animation.hs | bsd-2-clause | 307 | 0 | 14 | 56 | 113 | 60 | 53 | 10 | 1 |
{-# LANGUAGE PatternGuards #-}
module Idris.PartialEval(partial_eval, getSpecApps, specType,
mkPE_TyDecl, mkPE_TermDecl, PEArgType(..),
pe_app, pe_def, pe_clauses, pe_simple) where
import Idris.AbsSyntax
import Idris.Delaborate
import Idris.Core.TT
import Idris.Core.... | BartAdv/Idris-dev | src/Idris/PartialEval.hs | bsd-3-clause | 13,072 | 1 | 20 | 4,382 | 4,286 | 2,230 | 2,056 | 215 | 17 |
import Control.Concurrent
import Control.Monad
foreign import ccall input :: Int
foreign import ccall output :: Int -> IO ()
main :: IO ()
main = do
m <- newEmptyMVar
forkIO $ putMVar m input
r <- takeMVar m
output r
| bosu/josh | t/progs/MVar.hs | bsd-3-clause | 235 | 1 | 8 | 58 | 93 | 44 | 49 | 10 | 1 |
{-# LANGUAGE CPP, GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Math.Combinatorics.Species.AST.Instances
-- Copyright : (c) Brent Yorgey 2010
-- License : BSD-style (see LICENSE)
-- Maintainer : byorgey@cis.upenn.edu
-- Stability : experimen... | timsears/species | Math/Combinatorics/Species/AST/Instances.hs | bsd-3-clause | 13,095 | 0 | 11 | 5,227 | 3,514 | 1,786 | 1,728 | 226 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_ray_tracing_pipeline - device extension
--
-- == VK_KHR_ray_tracing_pipeline
--
-- [__Name String__]
-- @VK_KHR_ray_tracing_pipeline@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 348
--
-- [__Revision__]
-- 1
--
-... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_ray_tracing_pipeline.hs | bsd-3-clause | 195,430 | 2 | 22 | 34,423 | 14,953 | 9,377 | 5,576 | -1 | -1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
-- https://github.com/Gabriel439/post-rfc/blob/master/sotu.md#scripting--command-line-applications
module Lib
( someFunc
) where
import qualified Data.ByteString.Char8 as BS
import qualified Data.Tex... | minimal/build-lib | src/Lib.hs | bsd-3-clause | 1,322 | 0 | 14 | 406 | 371 | 198 | 173 | 35 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE EmptyDataDecls, MultiParamTypeClasses, FunctionalDependencies,
Rank2Types, DeriveDataTypeable, FlexibleInstances,
UndecidableInstances, FlexibleContexts,ScopedTypeVariables,
TypeFamilies
#-}
------------------------------------------------------... | coreyoconnor/type-level-tf | src/Data/TypeLevel/Bool.hs | bsd-3-clause | 5,146 | 0 | 10 | 1,123 | 842 | 511 | 331 | -1 | -1 |
-- | All the solutions of the 4-queens puzzle.
module Example.Monad.Queens4All
( run )
where
import Control.Applicative
import Control.Monad ( join )
import Data.Maybe
import qualified Data.Traversable as T
import Z3.Monad
run :: IO ()
run = do
sols <- evalZ3With Nothing opts script
putStrLn "Solutions: "
... | sukwon0709/z3-haskell | examples/Example/Monad/Queens4All.hs | bsd-3-clause | 2,355 | 0 | 16 | 733 | 824 | 412 | 412 | 62 | 3 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UnicodeSyntax #-}
module Test.Complexity.Pretty (prettyStats, printStats) where
import "base-unicode-symbols" Data.Function.Unicode ( (∘) )
import qualified "vector" Data.Vector as V
import "this" Test.Complexity.Types ( MeasurementStats... | roelvandijk/complexity | Test/Complexity/Pretty.hs | bsd-3-clause | 1,204 | 0 | 13 | 404 | 306 | 169 | 137 | 21 | 1 |
{-# LANGUAGE ViewPatterns, GADTs, FlexibleContexts, DataKinds #-}
module Sprite.GUI where
import Graphics.UI.Gtk.OpenGL
import Graphics.UI.Gtk hiding (Point, Object)
import Graphics.Rendering.OpenGL
import Control.Concurrent.STM
import Control.Monad.Trans
import Data.List.PointedList
import Sprite.Widget (graph... | paolino/sprites | Sprite/GUI.hs | bsd-3-clause | 1,071 | 0 | 15 | 224 | 326 | 165 | 161 | 33 | 1 |
module Rules.Libffi (libffiRules, libffiDependencies) where
import Base
import Expression
import GHC
import Oracles
import Rules.Actions
import Settings.Builders.Common
import Settings.Packages.Rts
import Settings.TargetDirectory
import Settings.User
rtsBuildPath :: FilePath
rtsBuildPath = targetPath Stage1 rts -/- "... | quchen/shaking-up-ghc | src/Rules/Libffi.hs | bsd-3-clause | 3,933 | 0 | 21 | 941 | 863 | 432 | 431 | 82 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.KO.Corpus
( corpus ) where
import Prelude
import D... | facebookincubator/duckling | Duckling/Numeral/KO/Corpus.hs | bsd-3-clause | 5,023 | 0 | 11 | 2,235 | 891 | 507 | 384 | 144 | 1 |
-- | Yesod.Test.Json provides convenience functions for working
-- with Test.Hspec and Network.Wai.Test on JSON data.
module Yesod.Test.Json (
testApp,
APIFunction,
assertBool,
assertString,
assertOK,
assertJSON,
Session(..),
H.Assertion,
module Test.Hspec,
module Data.Aeson,
SResponse(..)
) where
... | bogiebro/yesod-test-json | Yesod/Test/Json.hs | bsd-3-clause | 2,449 | 26 | 17 | 539 | 743 | 407 | 336 | 61 | 3 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Plots.Axis.Labels where
import Con... | AjayRamanathan/plots | src/Plots/Axis/Labels.hs | bsd-3-clause | 3,989 | 0 | 11 | 927 | 850 | 478 | 372 | 73 | 1 |
module Rules.Generators.GhcVersionH (generateGhcVersionH) where
import Base
import Expression
import Oracles
import Settings.User
generateGhcVersionH :: Expr String
generateGhcVersionH = do
when trackBuildSystem . lift $
need [sourcePath -/- "Rules/Generators/GhcVersionH.hs"]
version <- getSetting... | quchen/shaking-up-ghc | src/Rules/Generators/GhcVersionH.hs | bsd-3-clause | 1,412 | 0 | 12 | 397 | 201 | 110 | 91 | 35 | 1 |
{-# LANGUAGE DeriveDataTypeable, RecordWildCards
, OverloadedStrings, StandaloneDeriving
, ScopedTypeVariables, CPP #-}
module Database where
import Data.Typeable
import Data.TCache.IndexQuery
import Data.TCache.DefaultPersistence
import Data.TCache.AWS
import Data.Monoid
import qualified Data.Te... | agocorona/MFlow | Demos/Database.hs | bsd-3-clause | 2,521 | 0 | 20 | 689 | 543 | 290 | 253 | 47 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.Sock.Handler.Common
where
------------------------------------------------------------------------------
import Control.Concurrent.MVar.Lifted
import Control.Concurrent.STM
import Control.Concurrent.STM.... | Palmik/wai-sockjs | src/Network/Sock/Handler/Common.hs | bsd-3-clause | 9,309 | 0 | 24 | 2,940 | 2,031 | 1,044 | 987 | 152 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Definition where
import qualified Data.Text as T
import Language
data Definition = Definition
{ word :: T.Text
, sourceLang :: Language
, definitionLang :: Language
, partOfSpeechList :: [(T.Text, [T.Tex... | aupiff/def | src/Definition.hs | bsd-3-clause | 963 | 0 | 12 | 424 | 196 | 113 | 83 | 22 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module PeerTrader where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM (atomically, dupTChan,
readTChan, writeTChan)
import Control.Exception ... | WraithM/peertrader-backend | src/PeerTrader.hs | bsd-3-clause | 5,958 | 0 | 20 | 1,621 | 1,412 | 691 | 721 | -1 | -1 |
module NAA.Loop (runNoughtsAndArrs) where
import NAA.AI
import NAA.Logic
import NAA.State
import NAA.Data hiding (player)
import NAA.Interface
import NAA.Interface.CLI
import Control.Monad.Trans
import Control.Monad.State.Lazy
-- So not only do we need to keep running the GameState over IO but we probably
-- want som... | fatuhoku/haskell-noughts-and-crosses | src/NAA/Loop.hs | bsd-3-clause | 3,522 | 0 | 19 | 790 | 557 | 300 | 257 | 43 | 3 |
module Math.Misc.Permutation where
import Math.Misc.Parity
import Misc.Misc
import Math.Algebra.Monoid
-- | A permutation is represented as a pair of lists. The condition
-- that the two lists contain precisely the same elements is /not
-- checked/.
type Permutation a = ([a], [a])
-- | Calculate the parity of a give... | michiexile/hplex | pershom/src/Math/Misc/Permutation.hs | bsd-3-clause | 748 | 0 | 11 | 207 | 177 | 100 | 77 | 12 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Himpress.Plumbing where
import qualified Himpress.Format as F
import Paths_himpress
import System.INotify
import System.FilePath (takeExtension)
import Control.Concurrent (threadDelay)
import Control.Arrow ((&&&),(***))
import Control.Monad (mapM_)
import... | matthewSorensen/himpress | Himpress/Plumbing.hs | bsd-3-clause | 4,258 | 0 | 14 | 1,151 | 1,117 | 604 | 513 | 78 | 3 |
module Pos.Chain.Ssc.Error
( module Pos.Chain.Ssc.Error.Seed
, module Pos.Chain.Ssc.Error.Verify
) where
import Pos.Chain.Ssc.Error.Seed
import Pos.Chain.Ssc.Error.Verify
| input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Ssc/Error.hs | mit | 213 | 0 | 5 | 56 | 44 | 33 | 11 | 5 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./CSMOF/As.hs
Description : abstract CSMOF syntax
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : dcalegar@fing.edu.uy
Stability : provisional
Portability : portable
-... | spechub/Hets | CSMOF/As.hs | gpl-2.0 | 4,559 | 0 | 9 | 1,448 | 985 | 553 | 432 | 102 | 0 |
{-| Implementation of the generic daemon functionality.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the ab... | apyrgio/ganeti | src/Ganeti/Daemon.hs | bsd-2-clause | 17,864 | 0 | 15 | 4,043 | 3,718 | 1,940 | 1,778 | 361 | 4 |
module Language.Haskell.GhcMod.Lint where
import Exception (ghandle)
import Control.Exception (SomeException(..))
import Language.Haskell.GhcMod.Logger (checkErrorPrefix)
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types
import Language.Haskell.HLint (hlin... | cabrera/ghc-mod | Language/Haskell/GhcMod/Lint.hs | bsd-3-clause | 754 | 0 | 12 | 128 | 199 | 112 | 87 | 16 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.