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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-|
Module : Language.SAL
Description : Public API for sal-lang, a package for representing and generating
SAL models and syntax.
Copyright : (c) Galois Inc, 2015
License : MIT
Maintainer : Benjamin F Jones <[email protected]>
Stability : experimental
Portability : Yes
See "Language.SAL.Syn... | GaloisInc/language-sal | src/Language/SAL.hs | mit | 554 | 0 | 4 | 107 | 37 | 27 | 10 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module ConfigSpec
( configSpec
) where
import DarkSky.App.Config
import DarkSky.Types (Coordinate(..), Degrees)
import Data.Aeson (decode)
import qualified Data.ByteString.Lazy as BL
import Data.Monoid ((<>))
import D... | peterstuart/dark-sky | test/ConfigSpec.hs | mit | 1,944 | 0 | 20 | 419 | 468 | 258 | 210 | 54 | 1 |
module Text.Noise.Parser
( parse
, ParseError
) where
import Control.Applicative
import Text.ParserCombinators.Parsec (ParseError, sepBy1, eof, option)
import Text.Parsec.Prim (try, (<?>))
import Text.Parsec.Pos (initialPos)
import qualified Text.Parsec.Expr as Expr
import qualified Text.Parsec.Prim (runParser)
import... | brow/noise | src/Text/Noise/Parser.hs | mit | 3,577 | 0 | 12 | 624 | 1,008 | 527 | 481 | 90 | 4 |
{-# LANGUAGE OverloadedStrings #-}
----------------------------------
-- | There are two ways in which to use this module.
--
-- The first is to use the renderer directly with the pandoc API. A
-- very simple program to render the API documentation as a mediawiki
-- document might look as follows.
--
-- > import Text.... | mpickering/servant-pandoc | src/Servant/Docs/Pandoc.hs | mit | 12,712 | 0 | 24 | 3,999 | 2,723 | 1,530 | 1,193 | 186 | 13 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LA... | YLiLarry/db-model | src/DB/Model/Internal/Remove.hs | mit | 1,618 | 0 | 14 | 295 | 387 | 217 | 170 | 35 | 1 |
{-# LANGUAGE PatternSynonyms #-}
module Fun.Desugar (desugar) where
import ClassyPrelude
import Data.Traversable (mapAccumR)
import GHC.Err (errorWithoutStackTrace)
import Fun.SExpression (pattern A, Expression (..), pattern ID, pattern KW, pattern L, pattern LIT,
Literal (..), patter... | jBugman/fun-lang | src/Fun/Desugar.hs | mit | 3,221 | 0 | 12 | 1,020 | 1,239 | 654 | 585 | 63 | 2 |
{-# LANGUAGE Arrows #-}
module World where
--------------------
-- Global Imports --
import Prelude hiding ((.))
import Control.Wire
import Linear.V2
-------------------
-- Local Imports --
import Render
import Snake
import Food
----------
-- Code --
-- | The world data type.
data World = World Int Food Snake
inst... | crockeo/netwire-vinyl | src/World.hs | mit | 1,360 | 1 | 14 | 357 | 456 | 246 | 210 | 36 | 2 |
module Render
(
renderRay
)
where
import Color ( Color(..) )
import Core ( Ray )
import Scene ( Scene, Intersection(..), sceneIntersection )
import Surface ( Surface(..) )
renderRay :: Ray -> Scene -> Color
renderRay ray scene =
getColor maybeIntersection
where
maybeIntersection = sceneInterse... | stu-smith/rendering-in-haskell | src/experiment01/Render.hs | mit | 470 | 0 | 13 | 133 | 146 | 82 | 64 | 13 | 2 |
module Main (main) where
import System.FilePath.Glob (glob)
import Test.DocTest (doctest)
includeDirs :: [String]
includeDirs = []
doctestWithIncludeDirs :: [String] -> IO ()
doctestWithIncludeDirs fs = doctest (map ((++) "-I") includeDirs ++ fs)
main :: IO ()
main = do
glob "src/**/*.hs" >>= doctestWithIncludeDi... | rcook/github-api-haskell | test/Main.hs | mit | 324 | 0 | 10 | 50 | 118 | 65 | 53 | 10 | 1 |
main = do
putStrLn "Hello! What's your name?"
inpStr <- getLine
putStrLn $ "Welcome to HaskHell, " ++ inpStr ++ "!" | nadyac/haskell-gol | src/input.hs | mit | 118 | 0 | 9 | 23 | 34 | 15 | 19 | 4 | 1 |
module Main where
import Idris.Core.TT
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.REPL
import Idris.Main
import Idris.ModeCommon
import IRTS.Compiler
import IRTS.CodegenClean
import System.Environment
import System.Exit
import Paths_idris_clean
data Opts = Opts
{ inputs :: [FilePath]
, outp... | timjs/idris-clean | Sources/Main.hs | mit | 1,062 | 0 | 12 | 253 | 370 | 191 | 179 | 38 | 3 |
module Reversi.AI.Common where
import System.Random (StdGen)
import Reversi (Reversi, Row, Col)
-- | Type representing a general AI function
-- | If there are no valid moves, AI should return bottom (error)
type AI = StdGen -> Reversi -> (Row, Col)
| sunjay/reversi | src/Reversi/AI/Common.hs | mit | 252 | 0 | 7 | 44 | 53 | 34 | 19 | 4 | 0 |
module Handler.PoolSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getPoolR" $ do
error "Spec not implemented: getPoolR"
| sramekj/lunchvote | test/Handler/PoolSpec.hs | mit | 168 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
{- | Filter.hs
Gregory W. Schwartz
Pertains to functions that help filter the fasta file for clone size
-}
{-# LANGUAGE OverloadedStrings #-}
module Filter where
-- Built-in
import Data.List
import Data.Function (on)
import qualified Data.Text.Lazy as T
-- Local
import Data.Fasta.Text.Lazy
-- | Filter those entit... | GregorySchwartz/clone-size-filter | src/Filter.hs | gpl-2.0 | 1,027 | 0 | 12 | 255 | 261 | 149 | 112 | 15 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Comorphism from CASL to OWL2
Copyright : (c) C. Maeder, DFKI GmbH 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portab... | nevrenato/HetsAlloy | OWL2/CASL2OWL.hs | gpl-2.0 | 10,653 | 0 | 25 | 2,788 | 3,745 | 1,891 | 1,854 | 244 | 5 |
solve :: Int -> Int -> Int -> Int
solve num n start = sum $ map aux [start..upper]
where
upper = ceiling $ (fromIntegral num) ** (1 / (fromIntegral n))
aux x
| num - x^n == 0 = 1
| num - x^n < 0 = 0
| otherwise = solve (num - x^n) n (x + 1)
main = do
conten... | m00nlight/hackerrank | functional/recursion/The-Sum-of-Powers/main.hs | gpl-2.0 | 437 | 0 | 12 | 156 | 226 | 112 | 114 | 11 | 1 |
{-# OPTIONS -w -O0 #-}
{- |
Module : SoftFOL/ATC_SoftFOL.der.hs
Description : generated Typeable, ShATermConvertible instances
Copyright : (c) DFKI Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : non-portable(overla... | nevrenato/Hets_Fork | SoftFOL/ATC_SoftFOL.der.hs | gpl-2.0 | 6,229 | 0 | 4 | 691 | 151 | 126 | 25 | 13 | 0 |
module H40 where
primes :: (Integral i) => [i]
primes = sieve [2..]
where
sieve (p:ps) = p : sieve [p' | p' <- ps, p' `mod` p /= 0]
primesN n = takeWhile (< n) primes
goldbach :: (Integral i) => i -> (i, i)
goldbach n
| n <= 2 || n `mod` 2 /= 0 = error "invalid parameter"
| otherwise = findSum... | hsinhuang/codebase | h99/H40.hs | gpl-2.0 | 542 | 0 | 12 | 175 | 308 | 163 | 145 | 13 | 3 |
-- find the prime factors of a number
-- and the multiple of the number
import Data.List (group)
p35 n = f n primes where
f n p@(x:xs)
| n < 2 = []
| mod n x == 0 = x : f (div n x) p
| otherwise = f n xs
primes = sieve [2..] where
sieve (... | yalpul/CENG242 | H99/31-41/p36.hs | gpl-3.0 | 450 | 0 | 14 | 185 | 220 | 110 | 110 | 10 | 1 |
type IO a = RealWorld -> (a, RealWorld) | hmemcpy/milewski-ctfp-pdf | src/content/3.5/code/haskell/snippet33.hs | gpl-3.0 | 39 | 0 | 6 | 7 | 18 | 11 | 7 | 1 | 0 |
module Problem34Spec where
import Test.Hspec
import Problem34 (totient)
spec :: Spec
spec = context "" $ do
describe "subsets" $ do
it "determine that totien of 10 is 4" $ do
totient 10
`shouldBe` 4
| wando-hs/H-99 | test/Problem34Spec.hs | gpl-3.0 | 223 | 0 | 15 | 59 | 66 | 34 | 32 | 9 | 1 |
-- |
module ExercisesMonad where
| capitanbatata/sandbox | my-typeclassopedia/my-typeclassopedia-haskell/src/ExercisesMonad.hs | gpl-3.0 | 34 | 0 | 2 | 6 | 5 | 4 | 1 | 1 | 0 |
module S.Gen where
import S.Type
import S.Table
import qualified Data.Map as M
import Data.List (nub, inits)
import Data.Maybe (isJust)
import Control.Applicative ( (<$>), (<*>) )
invert :: M.Map (Int,Int) Int -> M.Map Int [Maybe (Int,Int)]
invert m = M.fromListWith (++) $ (0, [Nothing]) : do
((p,q),r) <- M.toLi... | jwaldmann/s | S/Gen.hs | gpl-3.0 | 1,705 | 0 | 23 | 567 | 811 | 429 | 382 | 46 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/BindDeviceToGateway.hs | mpl-2.0 | 6,409 | 0 | 16 | 1,347 | 782 | 457 | 325 | 126 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP
----------------------------------------------------------------------
-- |
-- Module : Shady.CompileImageSimple
-- Copyright : (c) 2015 Tab... | conal/shady-graphics | src/Shady/CompileImageSimple.hs | agpl-3.0 | 1,494 | 0 | 12 | 239 | 339 | 203 | 136 | 20 | 1 |
module Main (
main
) where
import Control.Monad.State
import Data.Maybe
import Data.List
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
import Text.Printf
import Robotics.NXT
data Option = Help | Device FilePath deriving (Eq, Show)
isDevice :: Option -> Bool
isDevice (D... | mitar/nxt | src/Status.hs | lgpl-3.0 | 2,364 | 0 | 17 | 575 | 693 | 339 | 354 | 52 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Graphics.UI.Gtk
import Control.Concurrent.MVar
import Control.Monad ( liftM )
import Data.Maybe ( fromMaybe )
import Data.List ( findIndex )
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Text as T
main = do
initGUI
win <- windowNew
... | juhp/gtk2hs | gtk/demo/menu/ComboDemo.hs | lgpl-3.0 | 1,214 | 0 | 15 | 250 | 321 | 156 | 165 | 33 | 2 |
--題目:https://zerojudge.tw/ShowProblem?problemid=a034
{-
內容
還記得計算機概論嗎?還記得二進位嗎?
現在我們來計算一下將一個10進位的數字換成二進位數字
輸入說明
一個十進位的數值
輸出說明
輸出二進位制的結果
範例輸入
3
6
範例輸出
11
110
-}
main :: IO()
main = do | bestian/haskell-sandbox | Quizs/q034_binary.hs | unlicense | 350 | 1 | 6 | 31 | 17 | 10 | 7 | -1 | -1 |
module Main where
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.Framework.Providers.HUnit
import qualified Haskoin.Script.Tests (tests)
import qualified Units (tests)
main = defaultMain
( Haskoin.Script.Tests.tests
++ Units.tests
)
| OttoAllmendinger/haskoin-script | testsuite/Main.hs | unlicense | 283 | 0 | 8 | 44 | 65 | 42 | 23 | 9 | 1 |
import Test.Tasty
import PackItForms.MsgFmtTests
import PackItForms.ICS213Tests
import PackItForms.LADamageTests
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [ packItFormsMsgFmtTests
, ics213Tests
, laDamageTests ]
| pack-it-forms/msgfmt | tests/main.hs | apache-2.0 | 308 | 0 | 6 | 85 | 63 | 35 | 28 | 10 | 1 |
import Network
import System.IO
import Text.Printf
main = "Hello World" | selbert/haskell-irc-client | main.hs | bsd-2-clause | 72 | 0 | 4 | 10 | 19 | 11 | 8 | 4 | 1 |
-- | Core Process code
{-# LANGUAGE ExistentialQuantification, FlexibleInstances,
GeneralizedNewtypeDeriving,
ScopedTypeVariables,
DeriveDataTypeable,
MultiParamTypeClasses, CPP #-}
module Process (
-- * Types
Process
-- * Interface
, runP
, spa... | beni55/combinatorrent | src/Process.hs | bsd-2-clause | 3,459 | 0 | 18 | 984 | 845 | 447 | 398 | 68 | 1 |
module Nlp4 (answers) where
import Zak.Utf8
import Zak.Morph
import qualified Data.ByteString.Char8 as BS
import Data.ByteString.Char8 (ByteString)
import Control.Monad
import Data.List (group, sort, sortBy)
import Data.List.HT (chop)
import Control.Arrow
import Graphics.Gnuplot.Simple
answers = map (morphemeBook >>=... | Iruyan-Zak/Nlp100 | src/Nlp4.hs | bsd-3-clause | 3,213 | 0 | 14 | 836 | 1,368 | 755 | 613 | 83 | 2 |
-- 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.
module Duckling.Quantity.RO.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import ... | facebookincubator/duckling | tests/Duckling/Quantity/RO/Tests.hs | bsd-3-clause | 507 | 0 | 9 | 78 | 79 | 50 | 29 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Lichen.Diagnostics.Main where
import System.Directory
import Data.Aeson
import Data.Aeson.Types (Pair)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Semigroup ((<>))
import qualified Data.Text as T
import qualified Data.Text.Lazy.Encoding as T.L.E
import qualifi... | Submitty/AnalysisTools | src/Lichen/Diagnostics/Main.hs | bsd-3-clause | 3,572 | 0 | 24 | 1,084 | 1,052 | 530 | 522 | 71 | 6 |
module JDec.Class.Typesafe.MethodHandle (
MethodHandle(GetFieldMethodHandle, GetStaticMethodHandle, PutFieldMethodHandle, PutStaticMethodHandle, InvokeVirtualMethodHandle, InvokeStaticMethodHandle, InvokeSpecialMethodHandle, NewInvokeSpecialMethodHandle, InvokeInterfaceMethodHandle),
getFieldRef,
getStaticFieldRef,
put... | rel-eng/jdec | src/JDec/Class/Typesafe/MethodHandle.hs | bsd-3-clause | 2,488 | 0 | 8 | 396 | 221 | 156 | 65 | 35 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Util.StringProp
-- Description : Internal utility functions for storing Strings with the root window.
-- Copyright : (c) Nicolas Pouillard 2009
-- License : BSD-style (see LICENSE)
--
-- Maintainer : N... | xmonad/xmonad-contrib | XMonad/Util/StringProp.hs | bsd-3-clause | 2,150 | 0 | 12 | 406 | 462 | 246 | 216 | 25 | 1 |
-- | This module implements QuickCheck tests to test the Series module.
module Tests where
import Test.QuickCheck
import Series
-- I import (~==) to enable use of approximate equality on test cases.
import Data.AEq(AEq, (~==))
import Data.List (sort, nub)
-- |The first and second examples given in the assignment pdf... | nebasuke/Gamesys | src/Tests.hs | bsd-3-clause | 3,623 | 0 | 17 | 947 | 827 | 438 | 389 | 60 | 2 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
-- | Main stack tool entry point.
m... | deech/stack | src/main/Main.hs | bsd-3-clause | 39,081 | 0 | 27 | 12,976 | 8,004 | 4,050 | 3,954 | 766 | 7 |
{-# language CPP #-}
-- No documentation found for Chapter "ImageTiling"
module Vulkan.Core10.Enums.ImageTiling (ImageTiling( IMAGE_TILING_OPTIMAL
, IMAGE_TILING_LINEAR
, IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
... | expipiplus1/vulkan | src/Vulkan/Core10/Enums/ImageTiling.hs | bsd-3-clause | 3,479 | 1 | 10 | 584 | 336 | 209 | 127 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, OverlappingInstances, GADTs, RecordWildCards, TypeFamilies #-}
module YaLedger.Reports.Turnovers where
import YaLedger.Reports.API
data Turnovers = Turnovers
data TOptions =
TNoZeros
| TLedgerBalances
| TBothBalances
| TShowTotals
| TShowSaldo
| Comm... | portnov/yaledger | YaLedger/Reports/Turnovers.hs | bsd-3-clause | 9,532 | 0 | 20 | 3,283 | 2,756 | 1,428 | 1,328 | 210 | 10 |
module Main where
import Prelude hiding (lines)
import Botworld hiding (limit, Error(..), memory, contents)
import Control.Arrow
import Control.Applicative
import Control.Monad
import Data.Char
import Data.List (elemIndex)
import Data.Monoid
import Data.Set (Set)
import qualified Data.Set as Set
import System.Environme... | machine-intelligence/Botworld | ct2hs.hs | bsd-3-clause | 8,583 | 0 | 21 | 2,024 | 3,269 | 1,645 | 1,624 | 207 | 13 |
-- 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.
module Duckling.Distance.IT.Tests
( tests
) where
import Data.String
import Test.Tasty
import Duckling.Dime... | facebookincubator/duckling | tests/Duckling/Distance/IT/Tests.hs | bsd-3-clause | 494 | 0 | 9 | 78 | 76 | 48 | 28 | 10 | 1 |
{-|
Module : Reactive.DOM.Widget.Tabular
Description : Definition of tabs, for tabular widgets.
Copyright : (c) Alexander Vieth, 2016
Licence : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Overloade... | avieth/reactive-dom | Reactive/DOM/Widget/Tabular.hs | bsd-3-clause | 3,434 | 0 | 17 | 829 | 731 | 394 | 337 | 50 | 1 |
module Data.String.Additional where
import Data.Char (toLower)
import Data.Char (isUpper)
import Data.Char (isLower)
-- | Convert "CamelCASEDString" to "camel_cased_string"
camelToUnderscore :: String -> String
camelToUnderscore = map toLower . go2 . go1
where go1 "" = ""
go1 (x:u:l:xs) | isUpper u && i... | k-bx/redis-tlz | src/Data/String/Additional.hs | bsd-3-clause | 519 | 0 | 11 | 146 | 233 | 118 | 115 | 12 | 5 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Scripts.ComadIntake where
import Appian.Client
import Scripts.Common
import Scripts.ReviewCommon
import Scripts.ComadReview
import Control.Monad.Logger
import ClassyPrelude
import Data.Aeson
import Control.L... | limaner2002/EPC-tools | USACScripts/src/Scripts/ComadIntake.hs | bsd-3-clause | 3,378 | 0 | 20 | 684 | 774 | 386 | 388 | 61 | 3 |
{-# LANGUAGE QuasiQuotes #-}
-- | This module defines a generator for @getopt_long@ based command
-- line argument parsing. Each option is associated with arbitrary C
-- code that will perform side effects, usually by setting some global
-- variables.
module Futhark.CodeGen.Backends.GenericC.Options
( Option (.... | CulpaBS/wbBach | src/Futhark/CodeGen/Backends/GenericC/Options.hs | bsd-3-clause | 3,657 | 0 | 12 | 1,057 | 460 | 272 | 188 | 46 | 3 |
module Distribution.FreeBSD.Update where
import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.Reader
import Data.Char
import Data.Function
import Data.List
import Data.Maybe
import Data.Version
import qualified Data.Map as DM
import qualified Data.Text as DT
import Distribution.Fre... | freebsd-haskell/hsporter | Distribution/FreeBSD/Update.hs | bsd-3-clause | 9,356 | 0 | 19 | 2,051 | 3,400 | 1,780 | 1,620 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
module React.Flux.Mui.Toggle where
import Protolude
import Data.Aeson
import Data.Aeson.Casing
import Data.String (String)
import React.Flux
import React.Flux.Mui.Types
import React.Flux.Mui.Util
data Toggle = Toggle
{ to... | pbogdan/react-flux-mui | react-flux-mui/src/React/Flux/Mui/Toggle.hs | bsd-3-clause | 1,015 | 0 | 15 | 161 | 297 | 167 | 130 | 37 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Quant.MatchingEngine.Tests (main,runTests) where
import Data.List
import qualified Data.Set as S
import Quant.MatchingEngine.BasicTypes
import Quant.MatchingEngine.Book
import T... | tdoris/StockExchange | Quant/MatchingEngine/Tests.hs | bsd-3-clause | 3,293 | 0 | 15 | 610 | 1,142 | 588 | 554 | 60 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Mismi.Arbitrary where
import Network.AWS.Types
import Test.Mismi.Kernel.Arbitrary ()
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import ... | ambiata/mismi | mismi-core/test/Test/Mismi/Arbitrary.hs | bsd-3-clause | 850 | 0 | 8 | 165 | 159 | 96 | 63 | 18 | 0 |
import Data.Char (isDigit)
import Data.Either
import Data.List
import System.Console.GetOpt
import System.Directory
import System.Environment
import System.Exit
import System.IO
import System.Process
import Text.ParserCombinators.ReadP
import Text.Printf (printf)
-- The basic data structure. Most of the time, we will... | pimlott/diff-du | diff-du.hs | bsd-3-clause | 12,003 | 0 | 23 | 3,152 | 4,182 | 2,219 | 1,963 | 216 | 4 |
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE TypeApplications #-}
module Algebra4
where
import qualified Prelude as P
import LocalPrelude hiding ((.))
import Lattice
import Tests
import Topology1 hiding (Lawful (..), Semigroup (..), isLawful)
-- import Union
import Category
import Test.SmallCheck.Series... | mikeizbicki/homoiconic | old/Algebra4.hs | bsd-3-clause | 15,422 | 0 | 13 | 4,302 | 6,073 | 3,141 | 2,932 | -1 | -1 |
-- | Possibly convenient facilities for constructing constants.
module Futhark.IR.Prop.Constants
( IsValue (..),
constant,
intConst,
floatConst,
)
where
import Futhark.IR.Syntax.Core
-- | If a Haskell type is an instance of 'IsValue', it means that a
-- value of that type can be converted to a Futhark... | HIPERFIT/futhark | src/Futhark/IR/Prop/Constants.hs | isc | 1,844 | 0 | 7 | 348 | 388 | 213 | 175 | 42 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.KMS.Types.Sum
-- Copyrigh... | olorin/amazonka | amazonka-kms/gen/Network/AWS/KMS/Types/Sum.hs | mpl-2.0 | 3,648 | 0 | 12 | 795 | 655 | 338 | 317 | 86 | 0 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QShowEvent.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:21
Warning : this file is machine generated - do no... | uduki/hsQt | Qtc/Gui/QShowEvent.hs | bsd-2-clause | 1,815 | 0 | 12 | 298 | 431 | 232 | 199 | 43 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following condit... | onponomarev/ganeti | test/hs/Test/Ganeti/OpCodes.hs | bsd-2-clause | 36,499 | 0 | 58 | 10,558 | 6,331 | 3,199 | 3,132 | 636 | 78 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | danse/haskellers | tests/Settings.hs | bsd-2-clause | 3,044 | 0 | 9 | 612 | 369 | 234 | 135 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module OpenCV.JSON ( ) where
import "aeson" Data.Aeson
import "aeson" Data.Aeson.Types ( Parser )
import "aeson" Data.Aeson.TH
import "base" Data.Int ( Int32 )
import "base" Data.Monoid (... | Cortlandd/haskell-opencv | src/OpenCV/JSON.hs | bsd-3-clause | 4,709 | 0 | 20 | 1,457 | 1,412 | 747 | 665 | -1 | -1 |
{-# OPTIONS -#include "HsPosix.h" #-}
-- Haskell Binding for dl{open,sym,...} -*-haskell-*-
--
-- Author : Volker Stolz <[email protected]>
--
-- Created: 2001-11-22
--
-- Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs
-- I left the API more or less the same, mo... | alekar/hugs | fptools/hslibs/posix/DL.hs | bsd-3-clause | 3,627 | 15 | 18 | 1,057 | 683 | 380 | 303 | 54 | 3 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, DeriveDataTypeable #-}
module TcEvidence (
-- HsWrapper
HsWrapper(..),
(<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams, mkWpLams, mkWpLet, mkWpCast,
mkWpFun, idHsWrapper, isIdHsWrapper, pprHsWrapper,
-- Evidence bindings
TcEvBinds(..), EvB... | elieux/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | 45,142 | 0 | 17 | 12,154 | 9,082 | 4,696 | 4,386 | 581 | 17 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/Attoparsec/Types.hs" #-}
-- |
-- Module : Data.Attoparsec.Types
-- Copyright : Bryan O'Sullivan 2007-2015
-- License : BSD3
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : unknown
--
-- Simple, efficient parser combinator... | phischu/fragnix | tests/packages/scotty/Data.Attoparsec.Types.hs | bsd-3-clause | 559 | 0 | 6 | 112 | 69 | 52 | 17 | 10 | 0 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Buffer.Region
-- License : GPL-2
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- This module defines buffer operation on regions
module Yi.Buffer.Region
( module Yi... | noughtmare/yi | yi-core/src/Yi/Buffer/Region.hs | gpl-2.0 | 5,095 | 0 | 21 | 1,317 | 1,235 | 643 | 592 | 88 | 3 |
-- | A non-validating XML parser. For the input grammar, see
-- <http://www.w3.org/TR/REC-xml>.
module Text.XML.HaXml.ParseLazy
(
-- * Parse a whole document
xmlParse -- , xmlParse'
-- * Parse just a DTD
, dtdParse -- , dtdParse'
-- * Parse a partial document
, xmlParseWith
-- * Individual parser... | alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ParseLazy.hs | gpl-3.0 | 31,573 | 0 | 22 | 9,488 | 8,206 | 4,206 | 4,000 | 589 | 4 |
module Foo where
-- |
--
-- >>> import Acme.Dont
-- >>> don't foo
foo :: IO ()
foo = error "foo"
| juhp/stack | test/integration/tests/4783-doctest-deps/files/src/Foo.hs | bsd-3-clause | 98 | 0 | 6 | 23 | 26 | 16 | 10 | 3 | 1 |
{-
ToDo [Oct 2013]
~~~~~~~~~~~~~~~
1. Nuke ForceSpecConstr for good (it is subsumed by GHC.Types.SPEC in ghc-prim)
2. Nuke NoSpecConstr
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[SpecConstr]{Specialise over constructors}
-}
{-# LANGUAGE CPP #-}
module SpecConstr(
specConstrProgram
#... | christiaanb/ghc | compiler/specialise/SpecConstr.hs | bsd-3-clause | 83,984 | 5 | 27 | 25,551 | 10,943 | 5,807 | 5,136 | -1 | -1 |
module B1 where
import Control.Parallel.Strategies
-- test when already import strategies the import doesn't change.
qsort (x:xs) = lsort_2 ++ [x] ++ hsort_2
where
lsort = qsort (filter (<) x xs)
hsort = qsort (filter (>=) x xs)
(lsort_2, hsort_2)
= runEval
(do lsort_2 <- ... | RefactoringTools/HaRe | old/testing/evalAddEvalMon/B1_TokOut.hs | bsd-3-clause | 419 | 0 | 12 | 140 | 129 | 69 | 60 | 10 | 1 |
module SubPatternIn3 where
-- takes into account general type variables
-- within type implementation.
-- here T has its arguments instantiated within g
-- selecting 'b' should instantiate list patterns
-- selecting 'c' should give an error.
--
data T a b = C1 a b | C2 b
g :: Int -> T Int [Int] -> Int
g z (C1 b c) ... | kmate/HaRe | old/testing/subIntroPattern/SubPatternIn3.hs | bsd-3-clause | 449 | 0 | 8 | 114 | 183 | 97 | 86 | 10 | 1 |
import StockMarket
import Data.Tuple.Curry (uncurryN)
import GTL.Data.Mockup (Mockup, Role(..), mockupToArray, arrayToMockup)
import GTL.Data.History.Instances (History0)
import GTL.Numeric.Probability ((?!))
import Numeric.Probability.Distribution hiding (pretty, map)
import Control.Monad (replicateM_)
import Text.Pr... | dudebout/cdc_2012_dudebout_shamma | simulations/simulation_theoretical.hs | isc | 1,426 | 0 | 11 | 334 | 487 | 271 | 216 | 32 | 1 |
-- Bin to Decimal
-- https://www.codewars.com/kata/57a5c31ce298a7e6b7000334
module BinToDecimal where
import Data.Char (digitToInt)
binToDec :: String -> Int
binToDec = sum . zipWith (\p n -> n*2^p) [0..] . map digitToInt . reverse
| gafiatulin/codewars | src/8 kyu/BinToDecimal.hs | mit | 235 | 0 | 12 | 35 | 71 | 40 | 31 | 4 | 1 |
module Parser.TestUtils where
import Data.Either (isRight)
import Parser.Internal
import Test.Hspec
import Text.Parsec
import Text.Parsec.String
shouldSucceed :: (Show a, Eq a) => Parser a -> String -> IO ()
shouldSucceed parser input = input `shouldSatisfy` su... | badi/super-user-spark | test/Parser/TestUtils.hs | mit | 1,547 | 0 | 10 | 309 | 542 | 278 | 264 | 29 | 2 |
module RE where
-- Regular Expression
import DFA
import State
import Prelude hiding (concat)
import Data.List hiding (concat, union)
import Control.Monad
data RE a = Concat [RE a]
| Union [RE a]
| Closure (RE a)
| Symbol a
| Epsilon
| EmptySet
instance (Eq a) => Eq... | shouya/thinking-dumps | automata/RE.hs | mit | 2,260 | 0 | 13 | 795 | 968 | 486 | 482 | 66 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
module Prelude.String (
module Prelude.String.Type,
module Prelude.String.Show,
module Prelude.String.Read,
) where
import Prelude.String.Type
import Prelude.String.Show
import Prelude.String.Read
| scott-fleischman/cafeteria-prelude | src/Prelude/String.hs | mit | 248 | 0 | 5 | 37 | 49 | 34 | 15 | 8 | 0 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-|
Module : Main
Description : Main module for 'update-breadu-server' program.
Stability : experimental
Portability : POSIX
This program updates 'breadu-exe' server. Assumed that:
1. New executable, common food and static files already copied here from ... | denisshevchenko/breadu.info | src/update/Main.hs | mit | 3,799 | 0 | 19 | 1,207 | 654 | 338 | 316 | 61 | 5 |
module Lab3 where
-----------------------------------------------------------------------------------------------------------------------------
-- LIST COMPREHENSIONS
------------------------------------------------------------------------------------------------------------------------------
-- =====================... | adz/real_world_haskell | edx-fp1/lab3.hs | mit | 1,400 | 0 | 10 | 190 | 290 | 167 | 123 | 13 | 1 |
-- some definitions for OR
import Prelude hiding ((||))
False || False = False
_ || _ = True
False || b = b
True || _ = True
b || False = b
_ || True = True
b || c
| b == c = b
| otherwise = True
b || c
| b == c = c
| otherwise = True
test = [
("F || F", False || False),
("F || T", False ||... | calebgregory/fp101x | wk2/disjunction.hs | mit | 387 | 0 | 8 | 127 | 196 | 100 | 96 | 18 | 1 |
module POV (fromPOV, tracePathBetween) where
import Data.Tree (Tree)
fromPOV :: Eq a => a -> Tree a -> Maybe (Tree a)
fromPOV x tree = error "You need to implement this function."
tracePathBetween :: Eq a => a -> a -> Tree a -> Maybe [a]
tracePathBetween from to tree = error "You need to implement this function."
| exercism/xhaskell | exercises/practice/pov/src/POV.hs | mit | 318 | 0 | 10 | 61 | 115 | 58 | 57 | 6 | 1 |
-- file: ch03/Tree.hs
-- From chapter 3, http://book.realworldhaskell.org/read/defining-types-streamlining-functions.html
data Tree a = Node a (Tree a) (Tree a)
| Empty
deriving (Show)
simpleTree = Node "parent" (Node "left child" Empty Empty)
(Node "right child" Empty Empty)
| Sgoettschkes/learning | haskell/RealWorldHaskell/ch03/Tree.hs | mit | 291 | 0 | 8 | 50 | 71 | 38 | 33 | 5 | 1 |
{-# LANGUAGE OverloadedLists #-}
-- | This is simply a test to make sure things work until I can come up with
-- some real examples.
module Main where
import qualified Linear as L
import qualified Iris.Backends.GLFW as W
import Iris.Camera
import Iris.Reactive
import Iris.SceneGraph
im... | jdreaver/iris | examples/Line.hs | mit | 2,498 | 0 | 18 | 1,052 | 749 | 392 | 357 | 59 | 1 |
module HarmLang.ChordProgressionDatabase
where
--import qualified Data.Text
import Data.List
import Data.Maybe
import qualified Data.Map
import HarmLang.Types
import HarmLang.Interpreter
import HarmLang.Utility
--TODO This should be generic, so they could be used with TimedChordProgression and TimedTimedChordProgre... | cyruscousins/HarmLang | src/HarmLang/ChordProgressionDatabase.hs | mit | 3,006 | 0 | 16 | 371 | 817 | 449 | 368 | 42 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.RTCIceCandidate (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.RTCIceCandidate
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.G... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/RTCIceCandidate.hs | mit | 358 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
-- | Parallel quicksort.
import Control.Monad
import Control.Monad.ST (ST (..), runST)
import Data.Array.ST
import Control.Parallel.Strategies
qsortImpl :: (Integral i, Ix i, Ord e, MArray arr e m) => arr i e -> i -> i -> m ()
qsortImpl arr l r = when (r > l) $ do
let mid = l + (r - l) `div` 2
nmid ... | sighingnow/sighingnow.github.io | resource/quicksort_in_haskell/par-sort.hs | mit | 1,348 | 0 | 17 | 424 | 712 | 355 | 357 | 34 | 2 |
{-
- Map file loader
-}
module Resources.Map
( MapData(..)
, loadData
) where
import Control.Monad (replicateM)
import qualified Data.ByteString as B
import Data.Binary.Strict.Get
import Data.Bits
import Data.Char (chr)
import Data.Wo... | vTurbine/w3dhs | src/Resources/Map.hs | mit | 5,263 | 0 | 16 | 1,982 | 1,711 | 907 | 804 | 134 | 3 |
module Rebase.Data.Tree
(
module Data.Tree
)
where
import Data.Tree
| nikita-volkov/rebase | library/Rebase/Data/Tree.hs | mit | 71 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
module Problem28 where
main = print $ sum $ takeWhile (<=1001^2) $ iterate (\n -> n + (ringDelta n)) 1
ringDelta :: Int -> Int
ringDelta n = let n' = floor $ sqrt (fromIntegral n) in
if even n'
then n'
else n' + 1
| DevJac/haskell-project-euler | src/Problem28.hs | mit | 272 | 0 | 12 | 104 | 111 | 58 | 53 | 7 | 2 |
{-# LANGUAGE TypeOperators
, Arrows
, TypeFamilies
, OverloadedStrings
, ViewPatterns
#-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Document.Phase.Expressions where
--
-- Modules
--
import Document.ExprScope as ES
import Document.Pipeline
import Document.Phase as P
import Document.Ph... | literate-unitb/literate-unitb | src/Document/Phase/Expressions.hs | mit | 37,497 | 6 | 20 | 12,643 | 12,828 | 6,581 | 6,247 | -1 | -1 |
module Main where
import Data.List (find)
main :: IO ()
main = print $ find productOfThreeDigits palindromes
palindrome :: Int -> Int -> Int -> Int
palindrome x y z = 100000 * x + 10000 * y + 1000 * z + 100 * z + 10 * y + x
palindromes :: [Int]
palindromes = [palindrome x y z | x <- [9,8..1], y <- [9,8..0], z <- [9... | jBugman/euler | part1/p004.hs | mit | 470 | 0 | 14 | 102 | 263 | 144 | 119 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.MessagePack
import Network.Simple.TCP
import qualified Data.Map as M
-- | Echo server
main :: IO ()
main =
withSocketsDo $ runRPC methods HostAny "3000"
where
methods = M.singleton "echo" echo
echo = return . Right
| rodrigosetti/messagepack-rpc | tests/Main.hs | mit | 300 | 0 | 8 | 60 | 74 | 43 | 31 | 10 | 1 |
{-|
Module : Datatypes
Description : Helper module to get data types and functions on them.
License : CC0
Maintainer : [email protected]
Stability : experimental
-}
module System.KSP.Datatypes
( Object(..)
, Celestial(..)
, Body(..)
, Orbit(..)
, System(..)
, GravConst
, KSyst... | frosch03/kerbal | src/System/KSP/Datatypes.hs | cc0-1.0 | 544 | 0 | 5 | 142 | 87 | 60 | 27 | 18 | 0 |
module Logic.AbstractLogic where
import Notes
import Functions.Application.Macro
import Logic.FirstOrderLogic.Macro
import Logic.PropositionalLogic.Macro
import Logic.AbstractLogic.Macro
import Logic.AbstractLogic.Terms
abstractLogic :: Note
abstractLogic... | NorfairKing/the-notes | src/Logic/AbstractLogic.hs | gpl-2.0 | 6,700 | 6 | 23 | 1,986 | 1,850 | 951 | 899 | 139 | 1 |
import Test.QuickCheck
myLast :: [a] -> Maybe a
myLast [] = Nothing
myLast xs = Just $ reverse xs !! 0
testMyLast :: [Int] -> Bool
testMyLast xs =
case myLast xs of
Nothing -> null xs
Just x -> last xs == x
main = quickCheck testMyLast
| CmdrMoozy/haskell99 | 001.hs | gpl-3.0 | 244 | 2 | 9 | 56 | 112 | 55 | 57 | 10 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
module HelloWorld where
import Foreign.C.Types
import Foreign.C.String
foreign export ccall
hello :: CString -> IO CInt
hello :: CString -> IO CInt
hello c_str = do
str <- peekCString c_str
result <- hsHello str
return $ fromIntegral result
hsHello :: String -> IO ... | KenetJervet/mapensee | haskell/ffi/DotNet/HelloWorld/HelloWorld.hs | gpl-3.0 | 393 | 0 | 9 | 78 | 127 | 63 | 64 | 15 | 1 |
{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
module Data.VectorSpace.QuickCheck where
import Data.VectorSpace
import Test.QuickCheck
import Control.Monad (liftM)
import Foreign.Storable
import System.Random (Random)
-- | Normalized vector
newtype NormalizedV a = NormalizedV a
deriving ... | bgamari/GGen | Data/VectorSpace/QuickCheck.hs | gpl-3.0 | 1,081 | 0 | 11 | 310 | 338 | 182 | 156 | 22 | 0 |
module GUI.InfoConsole ( configInfoConsoleTV
, printInfoMsg
, printErrorMsg) where
import Graphics.UI.Gtk hiding (get)
import GUI.Utils
import GUI.GState
import qualified GUI.Console as Console
import Control.Lens
import Control.Monad.Trans.RWS
configInfoConsoleTV :: Te... | alexgadea/fun-gui | GUI/InfoConsole.hs | gpl-3.0 | 1,008 | 0 | 15 | 280 | 260 | 140 | 120 | 21 | 1 |
{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
module KlcParse
( parseKlcLayout
) where
import BasePrelude hiding (try)
import Prelude.Unicode
import Data.Monoid.Unicode ((... | 39aldo39/klfc | src/KlcParse.hs | gpl-3.0 | 9,053 | 0 | 25 | 1,918 | 3,652 | 1,894 | 1,758 | 201 | 6 |
{-# 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/Folders/Exclusions/Get.hs | mpl-2.0 | 5,042 | 0 | 15 | 1,085 | 709 | 417 | 292 | 103 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings... | zerobuzz/webtest | src/Test/WebApp/Script.hs | agpl-3.0 | 35,786 | 1 | 42 | 9,248 | 9,444 | 4,993 | 4,451 | 494 | 9 |
module Haskoin.Crypto
-- ECDSA module
( ECDSA
, Signature
, withECDSA
, signMessage
, verifyMessage
-- Hash module
, Hash256
, Hash160
, CheckSum32
, hash256
, hash256BS
, hash160
, hash160BS
, doubleHash256
, doubleHash256BS
, chksum32
-- Keys module
, PublicKey
, PrivateKey
, derivePublicKey
, publicKeyAddress
, m... | lynchronan/haskoin-crypto | src/Haskoin/Crypto.hs | unlicense | 504 | 0 | 4 | 76 | 104 | 70 | 34 | 29 | 0 |
-- These are the tests for our api. The only real interesting parts are
-- the 'testDbDSLInServant' and 'app' functions.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Control.Mo... | cdepillabout/testing-code-that-accesses-db-in-haskell | without-db/free-monad/test/Test.hs | apache-2.0 | 7,693 | 0 | 17 | 1,907 | 1,406 | 759 | 647 | 104 | 6 |
module Data.MarkovChain where
import Data.Default
import Data.List
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.RandSet as RandSet
import Data.RandSet(RandSet)
import System.Random
newtype NGram a = NGram [a] deriving (Eq, Ord, Show)
shiftAppend :: ... | jameseb7/markov | Data/MarkovChain.hs | bsd-2-clause | 1,713 | 0 | 13 | 491 | 690 | 366 | 324 | 35 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.