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
-- Problem 7 -- (0.94 secs, 458,377,840 bytes) primes = 2 : filter (null . tail . primeFactors) [3,5..] primeFactors n = factor n primes where factor n (p:ps) | p*p > n = [n] | n `mod` p == 0 = p : factor (n `div` p) (p:ps) | otherwise = factor n ps e007 = prim...
synndicate/euler
solutions/e007.hs
gpl-3.0
447
0
11
131
153
81
72
7
1
{-# LANGUAGE Rank2Types, FlexibleContexts #-} -- 3. Continue the previous exercise with Reader Bool and Maybe. -- that is Define at least two different natural transformations between Reader Bool and the Maybe functor. -- newtype Reader e a = Reader {runReader :: (e -> a) } instance Functor (Reader e) where ...
sujeet4github/MyLangUtils
CategoryTheory_BartoszMilewsky/PI_10_Natural_Transformations/Ex_3.hs
gpl-3.0
1,375
0
11
283
479
249
230
24
2
module HidingClass where import ClassA hiding (A) instance A Int where id2 = id
Helium4Haskell/helium
test/classesQualified/HidingClass.hs
gpl-3.0
84
0
5
18
26
16
10
4
0
{-# LANGUAGE CPP, ScopedTypeVariables #-} -- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version...
sheganinans/plugins
src/System/Plugins/Utils.hs
lgpl-2.1
15,334
0
18
4,042
3,539
1,888
1,651
261
6
--main = do putStrLn $ show $ p55 merge [] = 0 merge (x:xs) = x + (merge (map (\ a -> a*10) xs)) makeList 0 = [] makeList a = (makeList (div a 10)) ++ [(mod a 10)] isPalindrome a = a == merge (makeList a) reverseAdd a = a + (merge (makeList a)) worker f v tr fr |( tr == 50) = True |( fr v') = False | other...
nmarshall23/Programming-Challenges
project-euler/055/55.hs
unlicense
553
0
12
139
265
134
131
13
1
module Akarui.FOL.BinT where import Akarui.ShowTxt -- | Supported binary connectives (in order of precedence). data BinT = -- | Conjunction. Returns true only if both sides are true. And -- | Disjunction. Returns true if at least one operand is true. | Or -- | Implication is... messed up. It returns true ...
PhDP/Manticore
Akarui/FOL/BinT.hs
apache-2.0
861
0
6
190
103
61
42
15
0
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} ------------------------------------------------------------------------------ -- | This module is where all the routes and handlers are defined for your -- site. The 'app' function is the initializer that combines everything -- together and is exported by this m...
santolucito/Peers
src/Site.hs
apache-2.0
3,530
0
11
813
655
377
278
63
1
{- Copyright 2015 Rafał Nowak 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 Unless required by applicable law or agreed to in writing, software di...
rafalnowak/RaytracaH
src/RaytracaH/Math.hs
apache-2.0
2,336
0
11
479
546
292
254
46
1
{-# LANGUAGE RecordWildCards #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Parser.LHE.Formatter -- Copyright : (c) 2010-2013 Ian-Woo Kim -- -- License : GPL-3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portabil...
wavewave/LHEParser
src/HEP/Parser/LHE/Formatter.hs
bsd-2-clause
3,780
0
19
1,132
805
437
368
55
1
module Database.SqlServer.Create.Queue ( Queue ) where import Database.SqlServer.Create.Identifier hiding (unwrap) import Database.SqlServer.Create.Procedure import Database.SqlServer.Create.Entity import Test.QuickCheck import Data.Word (Word16) import Text.PrettyPrint hiding (render) import D...
fffej/sql-server-gen
src/Database/SqlServer/Create/Queue.hs
bsd-2-clause
3,588
0
17
962
905
468
437
86
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QRegExpValidator_h.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...
uduki/hsQt
Qtc/Gui/QRegExpValidator_h.hs
bsd-2-clause
17,400
0
18
3,804
5,484
2,612
2,872
-1
-1
-- Exercise 4 of chapter 4 in "Real World Haskell" splitWith :: (a -> Bool) -> [a] -> [[a]] splitWith _ [] = [[]] splitWith p (x:xs)
ploverlake/practice_of_haskell
src/splitWith.hs
bsd-2-clause
134
0
8
28
63
34
29
-1
-1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} module Quiz.Web.Prelude ( module Quiz.Web.Prelude.External ) where import Quiz.Web.Prelude.External import Control.Monad.Catch import Data.Text.Lazy.Encoding -- getPath :: Web [Text] -- getPath = pathInfo . wsRequest <$> ask -- r...
michael-swan/quick-quiz
src/Quiz/Web/Prelude.hs
bsd-3-clause
2,132
0
5
522
87
76
11
6
0
{-# LANGUAGE PackageImports, OverloadedStrings #-} module Network.PeyoTLS.Codec.Alert (Alert(..), AlertLevel(..), AlertDesc(..)) where import Control.Applicative import "monads-tf" Control.Monad.Error.Class (Error(..)) import Data.Word (Word8) import qualified Data.ByteString as BS import qualified Codec.Bytable.BigE...
YoshikuniJujo/peyotls
peyotls-codec/src/Network/PeyoTLS/Codec/Alert.hs
bsd-3-clause
3,408
8
13
633
827
465
362
73
1
{-| Module : Types.Unique Description : Type family for testing type list uniqueness. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE TypeFamilies #-} {-#...
avieth/Relational
Types/Unique.hs
bsd-3-clause
764
0
10
148
105
63
42
14
0
module Main where import Language import PrettyPrint import Parser import TiState import Utils main :: IO () main = do --program <- getContents --(putStrLn . show) (clex 0 program) --(putStrLn . show) (parse program) --let coreProgram = parse program --let states@(stack, dump, (_, _, heap), globals, stats...
caasi/spj-book-student-1992
app/Main.hs
bsd-3-clause
465
0
9
89
54
34
20
9
1
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif {- | Module : Control.Concurrent.SampleVar.Lifted Copyright : Liyang HU, Bas van Dijk License : BSD-style Maintainer : Bas van Dijk <v.dijk.bas@...
basvandijk/lifted-base
Control/Concurrent/SampleVar/Lifted.hs
bsd-3-clause
2,549
0
9
353
348
200
148
29
1
module Email where import Prelude import Data.Text import Network.Mail.Mime adminAddr, noreplyAddr :: Address adminAddr = Address (Just "Bannerstalker") "admin@bannerstalker.com" noreplyAddr = Address (Just "Bannerstalker") "noreply@bannerstalker.com" mySendmail :: Mail -> IO () mySendmail message = do let Addre...
nejstastnejsistene/bannerstalker-yesod
src/Email.hs
bsd-3-clause
554
0
15
127
155
80
75
15
2
module Experiments.MonadT.ExceptWriterStateT where import Control.Monad.Except import Control.Monad.State.Strict import Control.Monad.Writer.Strict data Token = OpenParen | CloseParen | Letter Char deriving (Eq, Show) data AST = Group [AST] | Expression [Char] deriving (Eq...
rumblesan/haskell-experiments
src/Experiments/MonadT/ExceptWriterStateT.hs
bsd-3-clause
1,333
0
18
356
442
228
214
47
5
{- Binary serialization for .hie files. -} {-# LANGUAGE ScopedTypeVariables #-} module GHC.Iface.Ext.Binary ( readHieFile , readHieFileWithVersion , HieHeader , writeHieFile , HieName(..) , toHieName , HieFileResult(..) , hieMagic , hieNameOcc ) where import GHC.Settings ( m...
sdiehl/ghc
compiler/GHC/Iface/Ext/Binary.hs
bsd-3-clause
13,244
0
18
3,508
3,764
1,875
1,889
320
5
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main where import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad import Control.Monad.IO.Class import Data.Default import Data.Time...
teuffy/interactive-brokers
executable/Requests-Simple.hs
bsd-3-clause
1,876
0
12
422
419
216
203
47
1
module GHC.VacuumTube where import Control.Applicative import Data.Binary import GHC.VacuumTube.Limbo import GHC.VacuumTube.Morgue newtype VacuumTube a = VacuumTube{unVacuumTube :: a} instance Binary (VacuumTube a) where put = vacuumPut . unVacuumTube get = VacuumTube <$> vacuumGet
alphaHeavy/vacuum-tube
GHC/VacuumTube.hs
bsd-3-clause
291
0
7
41
74
45
29
9
0
{-# LANGUAGE CPP #-} #define LAZY Strict #define BANG ! #include "base.inc"
liyang/enumfun
Data/EnumFun/Strict/Base.hs
bsd-3-clause
76
0
2
12
6
5
1
1
0
{-# OPTIONS_GHC -Wall #-} module Elm.Project.Flags ( Options(..) , Output(..) , safeCustomPath ) where import qualified System.Directory as Dir import System.FilePath ((</>)) import qualified Elm.Compiler.Objects as Obj data Options = Options { _mode :: Obj.Mode , _target :: Obj.Target , _...
evancz/builder
src/Elm/Project/Flags.hs
bsd-3-clause
679
0
12
163
187
106
81
24
2
{-| Module : Idris.CaseSplit Description : Module to provide case split functionality. Copyright : License : BSD3 Maintainer : The Idris Community. Given a pattern clause and a variable 'n', elaborate the clause and find the type of 'n'. Make new pattern clauses by replacing 'n' with all the possibly cons...
bravit/Idris-dev
src/Idris/CaseSplit.hs
bsd-3-clause
20,633
0
27
8,058
7,135
3,560
3,575
391
22
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DeriveGeneric #-} module Scripts.FCCForm471 ( module Scripts.FCCForm471 , module Scripts.FCCForm471Types ) where import ClassyPrelude hiding (take, takeWhile) import C...
limaner2002/EPC-tools
USACScripts/src/Scripts/FCCForm471.hs
bsd-3-clause
39,977
0
29
11,904
7,982
3,922
4,060
-1
-1
module Language.Promela.Tokens where data Token = Key KeyWord | Identifier String | Uname String | Number Integer | Bracket BracketType Bool | Comma | Semicolon | Plus | Dot | Equals | DoubleColon |...
hguenther/language-promela
Language/Promela/Tokens.hs
bsd-3-clause
1,034
0
6
582
154
99
55
42
0
module Fib where -- | Calculate Fibonacci number of given 'Num'. -- -- First let's set `n` to ten: -- -- >>> let n = 10 -- -- And now calculate the 10th Fibonacci number: -- -- >>> fib n -- 55 fib :: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2)
beni55/doctest-haskell
tests/integration/testCombinedExample/Fib.hs
mit
274
0
8
68
71
42
29
5
1
import List nums = Cons 1 $ Cons 2 $ Cons 3 Nil -- Should print "1 2 3 2 4 6 3 6 9" main = print $ do x <- nums y <- nums return (x * y)
raimohanska/Monads
examples/challenges/List/CartesianProduct.hs
mit
148
0
10
50
65
31
34
6
1
{-# LANGUAGE TypeFamilies #-} module Test.Pos.Block.Logic.Event ( -- * Running events and scenarios runBlockEvent , runBlockScenario , BlockScenarioResult(..) -- * Exceptions , SnapshotMissingEx(..) , DbNotEquivalentToSnapshot(..) ) where import ...
input-output-hk/pos-haskell-prototype
generator/src/Test/Pos/Block/Logic/Event.hs
mit
7,271
0
21
2,070
1,572
840
732
-1
-1
module Char where ord :: Char -> Int ord = primOrd chr :: Int -> Char chr = primChr isSpace :: Char -> Bool isSpace c = i == ord ' ' || i == ord '\t' || i == ord '\n' || i == ord '\r' || i == ord '\f' || i == ord '\v' where i = ord c isUpper :: Char -> Bool isUpper c = ord c >= ord 'A' && ord...
roberth/uu-helium
lib/Char.hs
gpl-3.0
824
0
16
248
414
196
218
28
1
-- BasicIML V01 -- Edgar F.A. Lederer, FHNW and Uni Basel, 2015 module CheckedArithmetic ( euclidDM, euclidQR, divE, modE, ArithError(DivisionByZero, Overflow), CheckedInt(negExcla, (+!), (-!), (*!), divEexcla, modEexcla, divFexcla, modFexcla, divTexcla, modTexcla), checkIntImplementation, ...
chrisjpn/CPIB_ILMCompiler
src/VM/CheckedArithmetic.hs
bsd-3-clause
8,598
0
16
2,066
3,383
1,731
1,652
207
3
{-# LANGUAGE OverloadedStrings #-} import Data.Monoid import Data.Foldable import Data.List import Data.Function (on) import Options.Applicative import qualified Data.Map as M import qualified Data.Set as S import qualified Data.ByteString as BS import qualified Data...
beni55/bayes-stack
network-topic-models/DumpCI.hs
bsd-3-clause
4,897
11
22
1,640
1,521
783
738
103
2
module Chap12 where import Data.List import Data.Char type Name = String type Age = Integer data Person = Person Name Age deriving (Show, Eq) data PersonInvalid = NameBlank | AgeTooLow deriving (Show, Eq) -- mkPerson :: Name -> Age -> Either PersonInvalid Person -- mkPerson name age -- | name /= "" && age >=0 = R...
punitrathore/haskell-first-principles
src/Chap12.hs
bsd-3-clause
5,375
0
13
1,328
2,311
1,199
1,112
133
3
{-# LANGUAGE OverloadedStrings #-} module TestImport ( module Yesod.Test , Specs ) where import Yesod.Test type Specs = SpecsConn ()
Tener/deeplearning-thesis
yesod/abaloney/tests/TestImport.hs
bsd-3-clause
147
0
6
34
32
20
12
6
0
{-| Cluster space sizing -} {- 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 conditions are met: 1. Redistributions of source code must retain the above copyright...
andir/ganeti
src/Ganeti/HTools/Program/Hspace.hs
bsd-2-clause
22,378
0
16
5,735
5,576
2,945
2,631
400
10
module Trit (Trit, rationalToTrit, getIntegral, getFraction, getFraction', neg, addTrits, subTrits, shiftLeft, shiftRight, multiply ) where import Stream import Utilities import Data.Ratio type Mantissa = Stream type Fraction = Stream type Trit = (Mantissa, Fraction) -- Convert f...
sdiehl/ghc
testsuite/tests/concurrent/prog001/Trit.hs
bsd-3-clause
2,950
0
13
1,122
948
516
432
57
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU.Matrix -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- ...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GLU/Matrix.hs
bsd-3-clause
4,696
0
19
1,173
1,370
704
666
99
2
<?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="ja-JP"> <title>OpenAPI Support Add-on</title> <maps> <homeID>openapi</homeID> <mapref l...
thc202/zap-extensions
addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_ja_JP/helpset_ja_JP.hs
apache-2.0
971
77
67
157
413
209
204
-1
-1
import Test.Cabal.Prelude main = cabalTest $ do workdir <- fmap testWorkDir getTestEnv let conf = workdir </> "cabal-config" cabalG ["--config-file", conf] "user-config" ["init"] shouldExist conf fails $ cabalG ["--config-file", workdir </> "cabal-config"] "user-config" ["init"] cabalG ["--confi...
themoritz/cabal
cabal-testsuite/PackageTests/UserConfig/cabal.test.hs
bsd-3-clause
540
0
12
111
173
84
89
13
1
{-# LANGUAGE TemplateHaskell #-} {-| Lenses for OpCodes -} {- Copyright (C) 2014 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 above c...
leshchevds/ganeti
src/Ganeti/OpCodes/Lens.hs
bsd-2-clause
1,526
0
8
229
49
27
22
6
0
-- | Take/drop tools. module Data.Conduit.List.TakeDrop where takeWhile :: Monad m => (a -> Bool) -> Conduit a m a takeWhile p = do m <- await case m of Nothing -> return () Just x | p x -> do yield x takeWhile p | otherwise -> return () dropWhile :: Mona...
josefs/hl
src/Data/Conduit/TakeDrop.hs
bsd-3-clause
512
0
13
190
212
97
115
16
2
{-# LANGUAGE RankNTypes #-} module Main where import Parallel import qualified Memo import qualified Data.Map.Lazy as M import Control.DeepSeq import Control.Monad.ST import Data.STRef fight :: Int -> Int -> [Int] fight i a = map fst $ fightVanillaM i a fightVanillaM :: Int -> Int -> [(Int, Int)] fightVanillaM = Me...
ezyang/ghc
testsuite/tests/concurrent/T13615/T13615.hs
bsd-3-clause
1,865
0
14
451
842
460
382
48
3
{-# LANGUAGE TypeFamilies, DeriveFunctor #-} module T5686 where data U a = U (G a) deriving Functor class A a where type G a
urbanslug/ghc
testsuite/tests/deriving/should_fail/T5686.hs
bsd-3-clause
130
0
8
29
37
22
15
5
0
{-# LANGUAGE PartialTypeSignatures #-} module WildcardInDeriving where data Foo a = Foo a deriving (_)
urbanslug/ghc
testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.hs
bsd-3-clause
115
0
6
27
22
14
8
-1
-1
module Main where data Hash = Hash{ (#) :: Int } deriving (Show, Read) main = do print s print (read s :: Hash) where s = show (Hash 3)
siddhanathan/ghc
testsuite/tests/deriving/should_run/drvrun004.hs
bsd-3-clause
149
3
9
43
76
40
36
7
1
digits :: Int -> [Int] digits 0 = [] digits x = (x `mod` 10):(digits (x `div` 10)) answer = sum $ filter (\x -> x == (sum $ map (^5) (digits x))) [2..999999] main = do putStrLn (show answer)
tamasgal/haskell_exercises
ProjectEuler/p030.hs
mit
193
0
14
42
129
70
59
5
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} -- | The Unison language typechecker, based on: -- "Complete and Easy Bidirectional Typechec...
paulp/unison
parser-typechecker/src/Unison/Typechecker/Context1.hs
mit
41,680
126
25
10,107
14,697
7,261
7,436
722
29
module Util.Multiline( multiline ) where import Language.Haskell.TH import Language.Haskell.TH.Quote multiline :: QuasiQuoter multiline = QuasiQuoter { quoteExp = stringE }
vinnymac/glot-www
Util/Multiline.hs
mit
179
0
6
26
42
27
15
6
1
module Main where import Queens main = print $ length (queens 12)
dmoverton/finite-domain
test/testQueens.hs
mit
68
0
8
14
25
14
11
3
1
{-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances, TypeOperators, TypeSynonymInstances #-} module Formura.Type where import Algebra.Lattice import qualified Data.Set as S import Data.Tuple(swap) import Formura.Language.Combinator import Formura.Syntax unitType :: (ElemTypeF ∈ fs) => Lang fs unitType = Elem...
nushio3/formura
src/Formura/Type.hs
mit
1,352
0
11
361
338
181
157
36
2
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Maybe as Maybe import qualified Data.Function as Function import qualified Data.List as List import qualified Data.Text as Text import qualified Data.Text.IO as Text import qualified Data.Text.Format.Strict as Format import System.FilePath ((<...
scott-fleischman/greek-grammar
haskell/greek-grammar/executables/Perseus.hs
mit
3,713
0
14
665
1,085
597
488
78
2
----------------------------------------------------------- -- | -- module: MXNet.Core.Base.DType -- copyright: (c) 2016-2017 Tao He -- license: MIT -- maintainer: sighingnow@gmail.com -- -- DType corresponding between Haskell's data type and n...
sighingnow/mxnet-haskell
mxnet/src/MXNet/Core/Base/DType.hs
mit
14,596
0
17
4,717
2,171
1,187
984
251
1
import Test.HUnit fizzbuzz n = [condition x | x <- [1 .. n]] condition x | rem x 3 == 0 && rem x 5 == 0 = "fizzbuzz" | rem x 3 == 0 = "fizz" | rem x 5 == 0 = "buzz" | otherwise = show x testFizz = TestCase (assertEqual "Should return until Fizz]" ["1", "2", "fizz"] (fizzbuzz 3)) testBuzz = ...
jefersonm/sandbox
languages/haskell/fizzbuzz.hs
mit
660
18
11
142
294
156
138
11
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeOperators #-} -- |Module : Numeric.Optimization.Algorithms.DifferentialEvolution -- Copyright : (c) 2011 Ville Tirronen -- License ...
alphaHeavy/differential-evolution
Numeric/Optimization/Algorithms/DifferentialEvolution.hs
mit
8,983
4
16
2,218
3,214
1,683
1,531
259
3
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.ClientRect (js_getTop, getTop, js_getRight, getRight, js_getBottom, getBottom, js_getLeft, getLeft, js_getWidth, getWidth, js_getHeight, getHeight, ClientRect, castToClientRect, gTypeClientR...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ClientRect.hs
mit
2,902
36
8
385
702
411
291
43
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes, ViewPatterns, DeriveGeneric, TemplateHaskell, LambdaCase #-} module Ical where import Data.Time.Clock import Data.Time.LocalTime import Data.Time.Calendar import Data.List import Network.Http.Client import qualified Data.Text.Encoding as TE import qualified Data.Text as T ...
emmanueltouzery/cigale-timesheet
src/EventProviders/Ical.hs
mit
9,976
0
15
2,050
2,599
1,339
1,260
191
3
-- -- Chapter 13, definitions from the book. -- module B'C'13 where -- Note: Chapter 5> cabal install import E'5''5 ( Shape ( Circle , Rectangle ) ) import E'5''7 ( area ) class Info a where examples :: [a] size :: a -> Int instance Info Char where examples = [ 'a' , 'A' , 'z' , 'Z' , '0' , '9...
pascal-knodel/haskell-craft
Chapter 13/B'C'13.hs
mit
1,596
0
15
511
599
336
263
38
1
{-# LANGUAGE BangPatterns, OverloadedStrings#-} module Smutt.HTTP.Server.Request where import Prelude hiding (read) import Smutt.HTTP.Method as Method import Smutt.Util.URL.Simple as URL import Smutt.HTTP.URI as URI import Smutt.HTTP.Version as Version import Smutt.HTTP.Header (Header) import qualified Smutt.HTTP....
black0range/Smutt
src/Smutt/HTTP/Server/Request.hs
mit
4,139
0
14
1,026
1,039
572
467
111
3
{-#LANGUAGE DeriveDataTypeable #-} module Crystal.RecursiveType (solveLetrec) where import Control.Arrow (second) import Control.Lens (_1, _2, _3, mapped, (^.), (.~), (&), view, to, (%~)) import Control.Lens.TH import Data.List import Data.Function import Debug.Trace import Data.Maybe import qualified Data.Map as M i...
Botje/crystal
Crystal/RecursiveType.hs
gpl-2.0
1,837
1
17
522
668
368
300
46
2
-- | A simple fight simulator for Sil 1.1.1; see the README for -- a more thorough introduction. module Main (fight, FightStats, summarize, damGiven, critsGiven, damGivenPercent, damTaken, player, opponent, ...
kryft/fsil
Fsil.hs
gpl-2.0
10,628
0
40
2,394
2,318
1,234
1,084
191
4
module Database.Design.Ampersand.Input.ADL1.LexerBinaryTrees ( BinSearchTree(..) , tab2tree , btFind , btLocateIn ) where data BinSearchTree av = Node (BinSearchTree av) av (BinSearchTree av) | Nil tab2tree :: [av] -> BinSearchTree av tab2tree tab = tree where (tree,[]) = s...
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Input/ADL1/LexerBinaryTrees.hs
gpl-3.0
2,078
0
13
883
797
405
392
56
9
-- Cryptography examples -- URL: http://www.macs.hw.ac.uk/~hwloidl/Courses/F21CN/index.html -- This file: http://www.macs.hw.ac.uk/~hwloidl/Courses/F21CN/Labs/caesar.hs -- Exercises for the Cryptography part of the above course F21CN -- -- Run the exercises on the Linux lab machines after doing the installation: -- # ...
jack793/Haskell-examples
Flipped/ceaser.hs
gpl-3.0
11,846
15
16
2,290
2,088
1,201
887
82
2
-- | -- Copyright : © 2009 CNRS - École Polytechnique - INRIA -- License : GPL -- -- A representation of module names and associated functions to map module -- names to source files and vice-versa. Qualified names, as required in the -- presence of modules, are also defined here. module Dedukti.Module ( -- * Dat...
mboes/dedukti
Dedukti/Module.hs
gpl-3.0
3,699
1
15
751
1,048
569
479
81
2
{-# LANGUAGE ExistentialQuantification #-} module Mudblood.Trigger ( module Control.Trigger -- * The trigger event type , TriggerEvent (..) -- * Trigger functions -- ** Guards , guardLine, guardSend, guardTime, guardTelneg, guardGMCP , guardBlock, joinBlock -- ** Yielding , yieldLin...
talanis85/mudblood
src/Mudblood/Trigger.hs
gpl-3.0
4,527
0
14
1,255
1,447
769
678
94
3
-- | Raw SQL insert commands module Tweet.Store.Raw.Insert where token :: String token = "insert into Token (access_token, token_type) values (?, ?);" user :: String user = "insert into User (id, name, screen_name, spammer) values (?, ?, ?, ?);" tweet :: String tweet = "insert into Tweet (text, user_id, spam) values...
cbowdon/TweetFilter
Tweet/Store/Raw/Insert.hs
gpl-3.0
333
0
4
57
39
25
14
7
1
-- | StatusBar texts {-# OPTIONS -O0 #-} {-# LANGUAGE TemplateHaskell, DerivingVia #-} module Lamdu.I18N.StatusBar 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 StatusBar a = Status...
lamdu/lamdu
src/Lamdu/I18N/StatusBar.hs
gpl-3.0
845
0
8
193
196
121
75
-1
-1
module Examples.CRC.QDSL where import Prelude hiding (Int,div,foldl) import QFeldspar.QDSL import Examples.Prelude.QDSL crcVec :: Qt (Vec Word32 -> Word32) crcVec = [|| $$foldl $$updCrc 0 ||] updCrc :: Qt (Word32 -> Word32 -> Word32) updCrc = [|| \ cc -> \ ch -> xor (xor ($$tb...
shayan-najd/QFeldspar
Examples/CRC/QDSL.hs
gpl-3.0
599
6
21
179
257
141
116
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Locations/Studies/Get.hs
mpl-2.0
4,767
5
16
1,064
694
407
287
103
1
{-# LANGUAGE FlexibleContexts #-} {- Welcome to your custom Prelude Export here everything that should always be in your library scope For more info on what is exported by Protolude check: https://github.com/sdiehl/protolude/blob/master/Symbols.md -} module Lib.Prelude ( readDef ) where import Data.String.Convers...
fros1y/patent-api
src/Lib/Prelude.hs
agpl-3.0
563
0
7
85
99
57
42
10
1
type BString = [Bool] type Schema = [Maybe Bool] matchesSchema::Schema->BString->Bool matchesSchema [] [] = True matchesSchema (Nothing:schr) (str:strr) = matchesSchema schr strr matchesSchema ((Just sch):schr) (str:strr) | sch /= str = False | otherwise = matchesSchema schr strr orderSchema::Schema->Int ord...
Crazycolorz5/Haskell-Code
schema.hs
unlicense
658
0
9
88
286
153
133
16
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Lib.Text ( showT , safeDecode , (+@) , removeTrailingNewLine , leadingZeros , lineSplit , lineSplitAfter ) where ------------------------------------------------------------------------------------ import ...
kernelim/gitomail
src/Lib/Text.hs
apache-2.0
1,926
0
15
553
577
321
256
42
3
{-# LANGUAGE OverloadedStrings #-} module Fs (getFullPath, Location(..)) where import Control.Monad (forM, msum) import System.Directory (doesDirectoryExist, getDirectoryContents) import System.FilePath ((</>), takeFileName) import Prelude data Location = Data | Vendor | Any deriving Show -- Link prefix syntax does...
gamelost/pcgen-rules
src/Fs.hs
apache-2.0
1,209
0
16
237
315
166
149
24
3
module CoinsInARow.A276163Spec (main, spec) where import Test.Hspec import CoinsInARow.A276163 (a276163) main :: IO () main = hspec spec spec :: Spec spec = describe "A276163" $ it "correctly computes the first 5 elements" $ map a276163 [1..5] `shouldBe` expectedValue where expectedValue = [1, 1, 2, 4...
peterokagey/haskellOEIS
test/CoinsInARow/A276163Spec.hs
apache-2.0
325
0
8
65
109
62
47
10
1
{-# LANGUAGE OverloadedStrings #-} module Model.Challenge where import Control.Applicative import Control.Monad import Data.Aeson import Data.ByteString (ByteString) import Data.Time (UTCTime) import qualified CouchDB.DBContract as DBContract import ...
alexandrelucchesi/pfec
server-common/src/Model/Challenge.hs
apache-2.0
1,518
0
17
606
346
194
152
38
1
-- Copyright (c) 2014-2015 Jonathan M. Lange <jml@mumak.net> -- -- 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 -- -- Unless required by ...
jml/haverer
tests/Utils.hs
apache-2.0
1,076
0
8
196
190
110
80
11
1
range :: [Integer] range = [1..100] -- cons operator onetwothree :: [Integer] onetwothree = 1 : 2 : 3 : [] hailstone :: Integer -> Integer hailstone n | n `mod` 2 == 0 = n `div` 2 | otherwise = 3*n + 1 hailstoneSeq :: Integer -> [Integer] hailstoneSeq 1 = [1] hailstoneSeq n = n : hailstoneSeq (hailstone n...
markmandel/cis194
src/week1/lecture/lists.hs
apache-2.0
726
1
9
145
274
150
124
18
1
module Permutations.A068424 (a068424, a068424T) where a068424T :: Integer -> Integer -> Integer a068424T n k | n < k = 0 | otherwise = product $ map (\i -> n - i) [0..k-1] a068424_row :: Integer -> [Integer] a068424_row n = map (a068424T n) [1..n] a068424_list :: [Integer] a068424_list = concatMap a068424_ro...
peterokagey/haskellOEIS
src/Permutations/A068424.hs
apache-2.0
391
0
10
78
171
91
80
11
1
import Data.Array md = 100000009 nmax = 5000 fact :: Array Int Integer fact = array (0, nmax) ((0, 1) : [(n, (fromIntegral n) * (fact ! (pred n))) | n <- [1 .. nmax]]) choose0 n k = (((fact ! n) `div` (fact ! k)) `div` (fact ! (n - k))) `mod` md choose n k = if k == 0 || k == n then 1 else (choo ! (pred n, pred k)...
pbl64k/HackerRank-Contests
2014-06-02-Weekly/LucyAndFlowers/laf.hs
bsd-2-clause
1,112
1
18
286
658
379
279
14
2
module Mewa.ProtocolSpec (spec) where import Mewa.Protocol import Test.Hspec spec :: Spec spec = do describe "Element by atomic number" $ it "Element by 12" $ length "ala" `shouldBe` 3
AnthillTech/mewa-sim
test-src/Mewa/ProtocolSpec.hs
bsd-2-clause
205
0
10
49
57
31
26
8
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Database.HXournal.IDMap.Client.Communication.Multipart -- Copyright : (c) 2012 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability ...
wavewave/hxournal-idmap-client
lib/Database/HXournal/IDMap/Client/Communication/Multipart.hs
bsd-2-clause
3,686
0
11
999
693
381
312
71
4
module Prim where import Control.Applicative import Control.Monad import Data.List import Data.Ord import Graphics.UI.GLUT import System.Random import Text.Printf import Data.Bits((.|.),(.&.)) import qualified Data.Bits as DB type Val = Double type ID = Int data Vec = Vec { vX :: !Val , vY :: !Val } deriving...
trbauer/gravity
src/Prim.hs
bsd-2-clause
5,383
0
18
1,419
2,274
1,227
1,047
214
3
module Noobing.Experimenting.List ( sortPermutations ) where import Data.List sortPermutations :: (Ord a) => [a] -> [a] sortPermutations l = sort $ concat $ permutations $ l
markmq/Noobing
src/Noobing/Experimenting/List.hs
bsd-3-clause
177
0
7
29
61
35
26
5
1
module Main where import Control.Applicative ((<$>), (<|>)) import Data.ByteString as B (readFile) import Data.Time.Calendar (Day, fromGregorian) import Data.Word (Word8) import System.Environment (getArgs) import qualified Data.Attoparsec.Binary as A (anyWord16le, anyWord32le) import qualified Data.Attoparsec.ByteSt...
chrisdotcode/antler
Main.hs
bsd-3-clause
9,451
0
13
3,327
1,578
859
719
202
2
module Data.MultiProto.Protobuf where
intolerable/multiproto
src/Data/MultiProto/Protobuf.hs
bsd-3-clause
39
0
3
4
7
5
2
1
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE...
haskell-distributed/distributed-process
src/Control/Distributed/Process/Management.hs
bsd-3-clause
21,440
0
22
4,573
2,130
1,258
872
197
9
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module BitD.Util.AMQP ( open , publishMsg , MsgBody(..) , declareQueuePersistent , bindQueue , Queue --, consumeMsgs , consumeMsgs' ) where #include <Imports.hs> import qualified Network.AMQP...
benma/bitd
src/BitD/Util/AMQP.hs
bsd-3-clause
3,339
0
13
1,307
760
407
353
48
1
module Color ( Color, ) where import Data.Function (on) import Data.Interpolate (Interpolate(interpolate)) import Rgb (Rgb, RgbLike(fromRgb, toRgb)) newtype Color = RgbColor Rgb deriving (Eq, Ord) instance Interpolate Color where interpolate c1 c2 = fromRgb . (interpolate `on` toRgb) c1 c2 instance ...
thomaseding/rows
src/Color.hs
bsd-3-clause
396
0
9
82
133
78
55
12
0
-- | -- Module : Crypto.Hash.SHA256 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Module containing the binding functions to work with the -- SHA256 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} {-# LA...
tekul/cryptonite
Crypto/Hash/SHA256.hs
bsd-3-clause
1,492
0
10
353
284
160
124
28
0
module Zero.KeyFetchToken.Handlers ( -- * Auth keyFetchTokenAuth , keyFetchTokenHandler -- * Routes , accountKeys ) where import Control.Monad.IO.Class (liftIO) import Data.Aeson import Data.Maybe import qualified Data.Text as T import qualified Data.ByteString.Char8 ...
et4te/zero
server/src/Zero/KeyFetchToken/Handlers.hs
bsd-3-clause
3,285
0
19
634
765
412
353
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Skeletons where import Data.FileEmbed (embedFile) import Data.ByteString.Char8 (unpack) import System.FilePath ((</>)) activateSkel :: String activateSkel = unpack $(embedFile $ "skeletons" </> "activate") cabalWrapperSkel :: String cabalWrapperSkel = unpack $(embedFile $ "sk...
Paczesiowa/virthualenv
src/Skeletons.hs
bsd-3-clause
440
0
9
54
113
64
49
11
1
module Stage.Preprocessing ( posbval , negbval , posnegbval , posbvec , negbvec , posnegbvec , posNegVol , posb0s , negb0s , posnegb0s , posseries_txt , negseries_txt , index_txt , acqparams_txt , rules ) where import Data.Yaml (decodeFile) import Development.Shake ...
reckbo/hs-hcp-pipeline
src/Stage/Preprocessing.hs
bsd-3-clause
5,598
0
19
1,671
1,549
784
765
145
4
{-# LANGUAGE TemplateHaskell #-} module Pinchot.SyntaxTree.Optics where import Data.Data (Data) import Data.List.NonEmpty (NonEmpty, toList) import qualified Control.Lens as Lens import qualified Language.Haskell.TH as T import qualified Language.Haskell.TH.Syntax as Syntax import Pinchot.Names import Pinchot.Rules i...
massysett/pinchot
pinchot/lib/Pinchot/SyntaxTree/Optics.hs
bsd-3-clause
10,813
0
18
2,706
2,869
1,473
1,396
245
5
{-# LANGUAGE ScopedTypeVariables #-} module Distribution.Solver.Modular.Builder ( buildTree , splits -- for testing ) where -- Building the search tree. -- -- In this phase, we build a search tree that is too large, i.e, it contains -- invalid solutions. We keep track of the open goals at each point. We -- non...
mydaum/cabal
cabal-install/Distribution/Solver/Modular/Builder.hs
bsd-3-clause
14,677
0
18
3,535
3,026
1,679
1,347
131
8
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DisambiguateRecordFields, Recor...
pepeiborra/narradar
src/Narradar/Types/Problem/NarrowingGoal.hs
bsd-3-clause
6,019
0
12
1,070
2,151
1,121
1,030
103
1
module OuterInner where import Control.Monad import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe import Control.Monad.Trans.Reader embedded :: MaybeT (ExceptT String (ReaderT () IO)) Int embedded = return 1 -- we can consider this return as a type-composition maybeUnwrap :: ExceptT String (ReaderT () ...
stites/composition
src/OuterInner.hs
bsd-3-clause
2,149
0
13
465
690
358
332
33
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} module Signal.Compiler.Cycles (cycles) where import Signal.Core import Signal.Core.Reify import Control.Monad.State import Control.M...
markus-git/signal
src/Signal/Compiler/Cycles.hs
bsd-3-clause
4,550
0
20
1,251
1,425
726
699
88
9
module PA.Data where import Data.Serialize -- bytes -- import qualified Data.Bytes.Serial as S -- import qualified Data.Bytes.Get as G -- import qualified Data.Bytes.Put as P -- bits import qualified Data.Bits.Coded as B import qualified Data.Bits.Coding as B -- base import Data.Word import Data.Bits import Control...
wkoiking/simulator-for-PA-interface
src/PA/Data.hs
bsd-3-clause
7,889
0
18
3,328
2,236
1,101
1,135
275
0
module Prototype.Internal ( ) where
plow-technologies/template-service
src/Prototype/Internal.hs
bsd-3-clause
44
0
3
13
9
6
3
2
0
module Options where import Data.Json.Path import Options.Applicative data Options = Options { fileArg :: Maybe String } getOptions = execParser opts opts = info (helper <*> opts') fullDesc where opts' = Options <$> optional (argument str (metavar "FILE" <> help "Input file")) glob = do s <- rea...
Prillan/haskell-jsontools
app/jless/Options.hs
bsd-3-clause
425
0
14
122
146
74
72
12
2