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
-- The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. -- -- Find the sum of all the primes below two million. import Utils.Primes calc :: Int calc = sum $ takeWhile (\x -> x < 2000000) $ primes main :: IO () main = do print calc
daniel-beard/projecteulerhaskell
Problems/p10.hs
mit
239
0
10
63
63
34
29
6
1
module Typed.ArithTest where import Data.Either import qualified Data.Map as M import Test.Tasty.HUnit import Preliminaries import Typed.Arith test_typeof = [ testCase "|- true : Bool" $ rights [typeof () (ArithTerm $ Ttrue)] @?= [Kbool] , testCase "|- if false then (pred 0) else (succ 0) : Nat" $ rights [typeof ...
myuon/typed
tapl/test/Typed/ArithTest.hs
mit
703
0
19
127
242
127
115
12
1
{-# LANGUAGE OverloadedStrings #-} module Joebot.Plugins.Mail.Cmds where import qualified Data.Text as T import Control.Concurrent.Chan import Joebot.Core import Joebot.Plugins.Mail.Base mail :: Chan Msg -> Command mail ch = Command "!mail" 1 (send ch) "!mail <nick> <text> -- send a message" rcv :: Chan Msg -> Com...
joeschmo/joebot2
src/Joebot/Plugins/Mail/Cmds.hs
mit
668
0
9
119
214
112
102
16
1
-------------------------------------------------------------------------------- -- | Defines a cleanup action that needs to be run after we're done with a slide -- or image. module Patat.Cleanup ( Cleanup ) where -------------------------------------------------------------------------------- type Cleanup = ...
jaspervdj/patat
lib/Patat/Cleanup.hs
gpl-2.0
326
0
6
43
26
17
9
3
0
-- Constant tag names which have special support in the runtime or the sugaring. -- Those which are supported in the runtime are repeated in JS in rts.js. module Lamdu.Builtins.Anchors ( objTag, infixlTag, infixrTag , bytesTid, floatTid, streamTid, textTid, arrayTid , headTag, tailTag, consTag, nilTag, tru...
da-x/lamdu
Lamdu/Builtins/Anchors.hs
gpl-3.0
2,131
0
7
479
637
384
253
71
1
-- Copyright 2015 Ruud van Asseldonk -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License version 3. See -- the licence file in the root of the repository. module Html ( Tag , TagProperties , makeRunIn , a...
aminb/blog
src/Html.hs
gpl-3.0
12,811
0
13
5,128
2,752
1,520
1,232
258
23
module Utils (makeMap, recsearch, (?|)) where import qualified Data.Map.Lazy as Map insertPairIntoMap :: Ord k => Map.Map k v -> (k, v) -> Map.Map k v insertPairIntoMap map (key, value) = Map.insert key value map makeMap :: Ord k => [(k, v)] -> Map.Map k v makeMap xs = foldl insertPairIntoMap Map.empty xs recsearc...
zc1036/Compiler-project
src/Utils.hs
gpl-3.0
664
0
10
183
281
151
130
14
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/Applications/Verify.hs
mpl-2.0
3,722
0
14
858
412
246
166
68
1
module Quadtree2 where import Control.Monad import Data.Bits import Data.Word data Quad a = Node !(Quad a) !(Quad a) !(Quad a) !(Quad a) | Empty | Leaf !a deriving (Eq, Show) data Direction = UP | NW | NE | SW | SE deriving (Eq, Ord, Bounded, Enum, Show) type Path = (Int, [Directi...
bflyblue/quadtree
Quadtree2.hs
unlicense
4,235
0
16
1,603
2,110
1,066
1,044
130
5
module Main where import Control.Exception import Control.Monad import Control.Monad.Error -- happstack package import Data.Acid import Happstack.Server import Happstack.Server.ClientSession import Text.I18n.Po (L10n, getL10n) -- html pages import Html.Error import Session import State import Routes main :: IO ()...
mcmaniac/blog.nils.cc
src/Main.hs
apache-2.0
1,488
0
12
290
387
207
180
40
1
{-# LANGUAGE RankNTypes #-} module Lycopene.Freer where import Control.Monad.Free (Free, foldFree, liftF, hoistFree) import Lycopene.Coyoneda (Coyoneda(..), hoistCoyoneda) -- | a.k.a. Operational Monad type Freer f = Free (Coyoneda f) liftR :: f a -> Freer f a liftR = liftF . Coyoneda id -- | Fo...
utky/lycopene
src/Lycopene/Freer.hs
apache-2.0
626
0
10
136
235
123
112
12
1
-- Copyright 2020 Google LLC -- -- 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 ...
google/cabal2bazel
src/Google/Google3/Package.hs
apache-2.0
9,080
0
15
1,963
2,122
1,158
964
143
5
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QAbstractItemDelegate.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine genera...
uduki/hsQt
Qtc/Enums/Gui/QAbstractItemDelegate.hs
bsd-2-clause
2,659
0
18
552
640
329
311
60
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} module Language.Haskell.Liquid.Bare.GhcSpec ( GhcSpec(..) , makeGhcSpec ) where -- import Debug.Trace (trace) import Prelude hiding (error)...
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Bare/GhcSpec.hs
bsd-3-clause
17,015
7
23
5,184
5,623
2,935
2,688
314
5
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.DebugKeyEvents -- Description : Track key events. -- Copyright : (c) 2011 Brandon S Allbery <[email protected]> -- License : BSD -- -- Maintainer : Brandon S Allbery <allbe...
xmonad/xmonad-contrib
XMonad/Hooks/DebugKeyEvents.hs
bsd-3-clause
4,136
0
15
1,732
659
380
279
56
3
{-# LANGUAGE TupleSections#-} -- | Abstract notifier definitions. module System.Hiernotify (Difference, DifferenceP (..), Configuration (..), Notifier (..) ) where import Data.Monoid (Monoid (..), mempty, mappend) import Data.List ((\\), nub, intersect) import Data.Int -- | Difference datatype containing a differenc...
paolino/hiernotify
System/Hiernotify.hs
bsd-3-clause
2,373
0
12
500
441
256
185
27
0
module Database.Hitcask.SpecHelper where import Database.Hitcask import Database.Hitcask.Types import Control.Monad import System.Directory createEmpty :: FilePath -> IO Hitcask createEmpty dir = createEmptyWith dir standardSettings createEmptyWith :: FilePath -> HitcaskSettings -> IO Hitcask createEmptyWith dir opti...
tcrayford/hitcask
Database/Hitcask/SpecHelper.hs
bsd-3-clause
684
0
9
129
262
128
134
23
1
module AbstractInterpreter.Constraints where import Utils.Utils import Data.Map as M import Data.Maybe import Graphs.UnionFind import Control.Monad data Constraint = SameAs Name | HasValue (Either Int String) deriving (Show, Eq) type Constraints = Map Name Constraint fromSameAsConstraint :: Constraint -...
pietervdvn/ALGT
src/AbstractInterpreter/Constraints.hs
bsd-3-clause
2,178
58
15
386
673
345
328
47
3
{-# LANGUAGE NamedFieldPuns #-} module Main (main) where import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Web.Telegram.API.Bot (runClient) import Bot (bot) import Const (tokenFile, updateIdFile) import Tools (loadOffset, loadToken, putLog, tshow) main :: IO () main ...
MCL1303/TaskBot
exe/Main.hs
bsd-3-clause
519
0
10
91
156
86
70
15
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Provers.Z3 -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : [email protected] -- Stability : experimental -- -- The connection to the Z3 SMT solver ---------------------------------...
TomMD/cryptol
sbv/Data/SBV/Provers/Z3.hs
bsd-3-clause
7,383
0
20
2,743
1,681
927
754
87
13
-------------------------------------------------------------------------------- -- | -- Module : XMonad.Prompt.FuzzyMatch -- Description : A prompt for fuzzy completion matching in prompts akin to Emacs ido-mode. -- Copyright : (C) 2015 Norbert Zeh -- License : GPL -- -- Maintainer : Norbert Zeh <norbert.z...
xmonad/xmonad-contrib
XMonad/Prompt/FuzzyMatch.hs
bsd-3-clause
4,670
0
12
1,026
724
425
299
28
2
{-# LANGUAGE RecordWildCards #-} module Beba.Process ( mkOfProtocol , mkOfDataPath ) where import Data.List (intercalate) import System.Process import Beba.Options import Numeric (showHex) mkOfProtocol :: Int -> Options -> CreateProcess mkOfDataPath :: Int -> Options -> CreateProcess mkOfProtocol ...
awgn/beba-parallel
src/Beba/Process.hs
bsd-3-clause
1,313
0
15
448
341
186
155
32
1
module ECEFRef where import Datum import Ellipsoid import qualified LatLng as L import MathExtensions {- | ECEF (earth-centred, earth-fixed) Cartesian co-ordinates are used to define a point in three-dimensional space. ECEF co-ordinates are defined relative to an x-axis (the intersection of the equatorial pl...
danfran/hcoord
src/ECEFRef.hs
bsd-3-clause
2,042
0
16
643
562
299
263
41
1
module Main where import Control.Monad import Data.Monoid import qualified Data.Text.IO as T import Options.Applicative import System.Exit import qualified Language.Grass.Transpiler.Untyped as G import Data.Version import Paths_Grassy (version) data Options = Options ...
susisu/Grassy
plant/Main.hs
bsd-3-clause
3,133
0
16
1,073
836
422
414
92
7
{-# LANGUAGE CPP #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} #include "thyme.h" #if HLINT #include "cabal_macros.h" #endif -- | Vague textual descriptions of time durations. module Data.Thyme.Format.Human ( humanTimeDiff , humanTimeDiffs , humanRelTim...
liyang/thyme
src/Data/Thyme/Format/Human.hs
bsd-3-clause
3,036
0
12
732
854
476
378
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Bugzilla ( bzRequests , BzRequest (..) , reqBug , reqComments , BugzillaSession , newBzSession ) where import Control.Applicative import Control.Arrow ((&&&), second) import ...
sethfowler/bzbeaver
src/Bugzilla.hs
bsd-3-clause
7,189
0
21
1,759
2,096
1,092
1,004
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} module GHC.Constants where -- TODO: This used to include HaskellConstants.hs, but that has now gone. -- We probably want to include the constants in platformConstants somehow -- instead. import GHC.Base () -- dummy dependency
jstolarek/ghc
libraries/base/GHC/Constants.hs
bsd-3-clause
293
0
4
45
20
15
5
4
0
-- ----------------------------------------------------------------------------- -- ALEX TEMPLATE -- -- This code is in the PUBLIC DOMAIN; you may copy it freely and use -- it for any purpose whatsoever. -- ----------------------------------------------------------------------------- -- INTERNALS and main scanner engi...
ekmett/luthor
Text/Luthor.hs
bsd-3-clause
6,175
39
23
1,132
1,473
788
685
89
9
module TinyControl.Packet ( DataPacket(..) , FeedbackPacket(..) , s , dataPacketSize , isLastDataPacket) where import Data.List(replicate) import Data.ByteString (ByteString) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import quali...
Josh211ua/TinyControl
TinyControl/Packet.hs
bsd-3-clause
2,508
0
15
1,077
658
387
271
60
1
module Core.Parser.Utils where import Core.Types import Data.Char (isDigit, isLetter) digit :: Char -> Bool digit = isDigit letter :: Char -> Bool letter = isLetter alpha :: Char -> Bool alpha '_' = True alpha c = letter c type Parser a = [Token] -> [(a, [Token])] pLit :: [Char] -> Parser [Char] pLit s = pSat (==...
Fuuzetsu/hcore
src/Core/Parser/Utils.hs
bsd-3-clause
2,323
0
12
697
1,075
565
510
55
1
-- © 2002 Peter Thiemann module Main where import WASH.CGI.CGI hiding (map, div, span, head) import DiskImages import Control.Monad helloCGI = standardQuery "Welcome to TinyShop" $ table $ do tr (td (attr "colspan" "2" ## text "If you are already a customer, \ \enter your email addr...
nh2/WashNGo
Examples/old/TinyShop.hs
bsd-3-clause
6,266
10
24
1,523
2,113
989
1,124
139
2
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2011-2014 John MacFarlane <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) a...
rgaiacs/pandoc
src/Text/Pandoc/SelfContained.hs
gpl-2.0
6,126
0
20
1,949
1,606
838
768
100
7
<?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="en-GB"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> ...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help/helpset.hs
apache-2.0
986
82
67
172
423
216
207
-1
-1
<?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="fr-FR"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
module Snap.Loader.Dynamic.TreeWatcher ( TreeStatus , getTreeStatus , checkTreeStatus ) where #ifndef MIN_VERSION_directory #define MIN_VERSION_directory(x,y,z) 1 #endif ------------------------------------------------------------------------------ import Control.Applicative import System.Directory import Sys...
snapframework/snap-loader-dynamic
src/Snap/Loader/Dynamic/TreeWatcher.hs
bsd-3-clause
1,961
0
8
231
201
123
78
16
1
module Compiler where import Syntax import PatComp (compilePatternMatch) import PPrint () -- for (Show Expr) programToExpr :: Program -> Expr programToExpr bgs = foldr Let (mainExpr (last bgs)) bgs' where bgs' = regroup (init bgs) mainExpr :: BindGroup -> Expr mainExpr bg = case bindings bg of [("@main", ...
irori/hs2lazy
Compiler.hs
bsd-3-clause
3,774
11
13
1,011
1,836
948
888
89
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module T13398a where data Nat data Rate data StaticTicks where (:/:) :: Nat -> Rate -> StaticTicks type ticks :/ rate = ticks ':/: rate c...
ezyang/ghc
testsuite/tests/indexed-types/should_compile/T13398a.hs
bsd-3-clause
509
0
7
96
123
76
47
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Main where type family F a :: * type instance F Int = (Int, ()) class C a instance C () instance (C (F a), C b) => C (a, b) f :: C (F a) => a -> Int f _ = 2 main :: IO () main = print (f (3 :: Int))
ezyang/ghc
testsuite/tests/typecheck/should_run/T3500a.hs
bsd-3-clause
318
0
8
78
144
79
65
-1
-1
{-# LANGUAGE TypeFamilies #-} module Main where import Prelude hiding (lookup) import Data.Char (ord) import qualified Data.Map as Map -- Generic maps as toplevel indexed data types ---------------------------------------------- data family GMap k :: * -> * data instance GMap Int v = GMapInt (Map.Map I...
urbanslug/ghc
testsuite/tests/indexed-types/should_run/GMapTop.hs
bsd-3-clause
2,416
14
14
691
1,031
523
508
50
1
{-# LANGUAGE CPP #-} module Cover5(choose5) where import Data.Random.Extras(choiceExtract) import Data.Random(RVar) import Data.Maybe import Data.List import Control.Monad.State(StateT, evalStateT, get, put, lift) import Control.Monad(replicateM) import Cover5.Internals -- The follow two imports are not needed -- in ...
michaelgwelch/cover5
src/Cover5.hs
mit
783
0
8
128
144
91
53
12
1
{-# htermination isSuffixOf :: [Bool] -> [Bool] -> Bool #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_isSuffixOf_6.hs
mit
72
0
3
12
5
3
2
1
0
{-# LANGUAGE BangPatterns, OverloadedStrings #-} module Main where import Data.List (unfoldr) import Data.ByteString.Char8 (ByteString, foldl') import qualified Data.ByteString.Char8 as BS type Data = ByteString checkSumFor :: Data -> Int -> Data checkSumFor from len = checkSum $ random from len checkSum :: Da...
CarstenKoenig/AdventOfCode2016
Day16/Main.hs
mit
1,555
0
10
337
613
326
287
52
2
module Protop.Core.NaturalSpec (spec) where import Protop.Core import Test.Hspec spec :: Spec spec = do addSpec mulSpec addSpec :: Spec addSpec = describe "add" $ it "should add natural numbers" $ (add .$. (42, 8)) `shouldBe` 50 mulSpec :: Spec mulSpec = describe "mul" $ it "should multipl...
brunjlar/protop
test/Protop/Core/NaturalSpec.hs
mit
383
0
9
94
124
70
54
15
1
data Tree a = Empty | Node a (Tree a) (Tree a) data Empty' = Empty' -- 1 data Node' a = Node' (a, Tree' a, Tree' a) -- a * T(a) * T(a) type Tree' a = Either Empty' (Node' a) -- 1 + a * T(a) * T(a) {- https://chris-taylor.github.io/images/tree.png -} data TZTrace a = TZTrace { tztcurr :: a ...
shouya/thinking-dumps
alg-adts/treezipper.hs
mit
1,766
0
11
769
626
346
280
44
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} module Y2020.M11.D25.Solution where {-- So, we're TOTALLY going to publish all airbases and all alliances and correct that the USA is not in NATO, even though the USA is in the graph database... ... but that's not what we're doing today. TODAY...
geophf/1HaskellADay
exercises/HAD/Y2020/M11/D25/Solution.hs
mit
2,867
0
12
491
639
384
255
40
1
module Expr where -- simplified version of compiler/coreSyn/coreSyn.hs -- This file demonstrates the Coq 8.6 issue with universes. -- -- Anomaly: Unable to handle arbitrary u+k <= v constraints. Please report at -- http://coq.inria.fr/bugs/. -- -- UGH, this file randomly started working when I added links to base. -...
antalsz/hs-to-coq
examples/base-tests/Expr.hs
mit
625
0
8
127
69
44
25
-1
-1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, OverlappingInstances, TypeSynonymInstances #-} module HarmLang.Types where import Data.Typeable import Data.Data import Data.List import Data.Ratio -- An absolute class of pitches (element of Z12). data PitchClass = PitchClass Int deriving (Data, Typeable) insta...
cyruscousins/HarmLang
src/HarmLang/Types.hs
mit
3,478
0
11
653
1,188
632
556
69
1
module MLUtil.Random ( ExtractIndices (eiC, eiIs, eiN) , choiceExtract , choiceExtractIndices , choiceExtractIndices' , extract , isValidExtractIndices , mkExtractIndices ) where import Control.Monad import MLUtil.Util import System.Random import Debug.Tra...
rcook/mlutil
mlutil/src/MLUtil/Random.hs
mit
2,875
0
20
949
1,026
533
493
66
2
{-# LANGUAGE RecordWildCards #-} import Data.Foldable (for_) import GHC.Exts (fromList, toList) import Test.Hspec (Spec, describe, it, shouldMatchList) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Anagram (anagramsFor) main :: IO () main = hspecWith defaultConfig {co...
exercism/xhaskell
exercises/practice/anagram/test/Tests.hs
mit
3,772
0
15
1,543
732
458
274
70
1
module Main where import Language.Java.Lexer import Language.Java.Parser import System.Environment import System.IO main :: IO () main = getArgs >>= lexAndParse lexAndParse :: [String] -> IO () lexAndParse [fs] = do content <- readFile fs let tokens = lexJava content writeFile (fs ++ ".tok")...
evansb/jasper
src/Main.hs
mit
625
0
10
154
217
108
109
19
1
{-# LANGUAGE Rank2Types #-} module Control.SimpleLens where import Data.Functor.Identity -- Grab a few things from Control.Lens so that we don't incur the dependency {- Copyright 2012-2013 Edward Kmett All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permit...
asivitz/layer
Control/SimpleLens.hs
mit
1,857
0
10
336
159
85
74
8
1
module Part1 where import Control.Monad import Data.Char data StudentInfo = StudentInfo { name :: String, korScore :: Int, engScore :: Int, matScore :: Int } deriving (Show) type StudentI...
utilForever/ProgrammingPractice
Solutions/MoNaDDu/Grade Management System/2/Part2.hs
mit
4,782
0
18
1,106
1,443
706
737
93
2
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-} {-| GDP and infant mortality <http://vincentarelbundock.github.io/Rdatasets/doc/car/UN.html> -} module Numeric.Datasets.UN where import Numeric.Datasets import Data.Csv import GHC.Generics import Control.Applicative data GdpMortality = GdpMortality { country :...
glutamate/datasets
datasets/src/Numeric/Datasets/UN.hs
mit
816
0
10
182
157
86
71
19
1
module MiniCore.Transforms.Lambdas ( liftLambdas ) where import MiniCore.Types import MiniCore.Transforms.Utils import qualified Data.Set as Set import qualified Data.Map as Map import Control.Monad.State import Control.Applicative import Data.List (partition, foldl') -- Lift lambdas to top level as supercombina...
cdparks/mini-core
src/MiniCore/Transforms/Lambdas.hs
mit
5,495
0
14
1,354
2,081
1,043
1,038
133
8
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module Data.Histogram.Util where import Control.Foldl (fold) import qualified Control.Foldl as L import Data.Histogram (Histogram) import qualified Data.Histogra...
tonyday567/maths-extended
src/Data/Histogram/Util.hs
mit
3,408
0
13
930
1,211
635
576
114
1
xor :: [Bool] -> Bool xor = foldr ((==) . const False) False . filter (== True) fun1 :: [Integer] -> Integer fun1 [] = 1 fun1 (x:xs) | even x = (x - 2) * fun1 xs | otherwise = fun1 xs fun1' :: [Integer] -> Integer fun1' = product . map (subtract 2) . filter even fun2 :: Integer -> Integer fun2 1 = 0 fu...
tamasgal/haskell_exercises
CIS-194/homework-04/HW04.hs
mit
1,045
0
12
293
505
262
243
26
2
{-# LANGUAGE StandaloneDeriving, DeriveGeneric, TypeSynonymInstances, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Core.Context( GameSession , GameWire , GameWireI , GameMonad , GameActor , GameContext , EventManager(..) , InputEvent(..) , ClientContext(..) , newEventManager ...
NCrashed/sinister
src/client/Core/Context.hs
mit
7,798
0
15
1,280
1,435
820
615
162
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} module Data.Tuple.PolyParts.List where import Data.Tuple.PolyParts.OneTuple (OneTuple (..)) import Prelude (error) import Data.Tuple.PolyParts.Modification (extendTupleR, TupleExt...
vww/easyTuples
Data/Tuple/PolyParts/List.hs
mit
10,701
8
22
2,491
4,979
2,981
1,998
140
1
{-# LANGUAGE ScopedTypeVariables #-} module Handler.Tutorial where import Import getTutorialShowR :: TutorialId -> Handler Html getTutorialShowR tutorialId = do tutorial <- runDB $ get404 tutorialId defaultLayout $ do $(widgetFile "tutorials/show")
lambdacms/lambdacms.org
lambdacmsorg-base/Handler/Tutorial.hs
mit
279
0
12
60
61
30
31
-1
-1
module Main where main :: IO () main = print (42 :: Int)
ruicc/structured-concurrent
examples/Example.hs
mit
58
0
6
14
28
16
12
3
1
{-# LANGUAGE OverloadedStrings #-} module Vaultaire.Collector.Nagios.Perfdata.Util where import Data.Bifunctor (bimap, second) import Data.Binary.IEEE754 (doubleToWord) import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as C import q...
anchor/vaultaire-collector-nagios
lib/Vaultaire/Collector/Nagios/Perfdata/Util.hs
mit
3,982
0
16
847
934
518
416
64
2
module Fourier_Motzkin.ToDoc where import Fourier_Motzkin.Data import Autolib.ToDoc import Data.Ratio import qualified Data.Map as M instance ToDoc v => ToDoc (Linear v) where toDoc (Linear m) = hsep $ do (mv,co) <- M.toList m let sign = if co>0 then text "+ " else empty co_times_var...
marcellussiegburg/autotool
collection/src/Fourier_Motzkin/ToDoc.hs
gpl-2.0
759
0
19
213
309
156
153
17
0
{-# LANGUAGE FlexibleInstances , TypeSynonymInstances #-} {- | Module : $Header$ Description : OMDoc-XML conversion Copyright : (c) Ewaryst Schulz, DFKI 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Stability : provisional Portability : portable The tra...
nevrenato/HetsAlloy
OMDoc/XmlInterface.hs
gpl-2.0
20,563
0
17
6,347
5,991
2,953
3,038
425
3
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses #-} module Sortier.Netz.Check where import Sortier.Netz.Type import Sortier.Netz.Rechnung import Sortier.Netz.Example import Sortier.Netz.Bild import Autolib.Util.Bild import qualified Autolib.Util.Wort ( alle ) import Data.List ( tails) import Data.Typeable im...
Erdwolf/autotool-bonn
src/Sortier/Netz/Check.hs
gpl-2.0
2,885
32
20
785
727
409
318
69
3
class X a where f :: a -> Int instance X Char where f _ = 5 main = f 3
Helium4Haskell/helium
test/typeClasses/ClassInstaneError2.hs
gpl-3.0
80
0
7
30
43
21
22
5
1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.RefString where import Import import Quran.RefParser import qualified Data.Text as T import qualified Data.Map as M import Data.List ( head ) -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resou...
oqc/oqs
Handler/RefString.hs
gpl-3.0
2,180
0
22
616
587
296
291
40
8
module Network.SimpleServer.Examples.ChatServer(main, run) where import Data.Char import Data.List import System.Environment import qualified Network.SimpleServer as S -- Constants -- -- A Welcome message to send to clients when they connect. welcomeMessage = "Welcome to the Simple Chat Server.\n" ++ ...
jcollard/simple-server
Network/SimpleServer/Examples/ChatServer.hs
gpl-3.0
4,599
0
16
976
986
494
492
89
3
module Main (main) where import System.Console.GetOpt import System.Environment (getArgs) import System.Exit import Control.Monad import Regex.Enumerator -- Flag data type data Options = Options { offset :: [String] -> [String] , fetch :: [String] -> [String] , longer :: [String] -> [String] , shorter :: ...
tadeboro/reglang
src/listlang.hs
gpl-3.0
1,685
0
17
403
677
370
307
46
2
toLst :: [a] -> Lst a toLst as = \f -> foldMap f as fromLst :: Lst a -> [a] fromLst f = f (\a -> [a])
hmemcpy/milewski-ctfp-pdf
src/content/3.11/code/haskell/snippet05.hs
gpl-3.0
102
0
8
27
71
37
34
4
1
{---------------------------------------------------------------------} {- Copyright 2015, 2016 Nathan Bloomfield -} {- -} {- This file is part of Feivel. -} {- ...
nbloomf/feivel
src/Feivel/Parse/ZZMod.hs
gpl-3.0
3,248
0
14
1,028
785
450
335
39
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} -- {-# LANGUAGE ScopedTypeVariables #-} module DB ( m...
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/DB.hs
gpl-3.0
552
0
5
112
59
40
19
15
1
module HEP.Automation.MadGraph.Dataset.Set20110715set1 where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.FU8C1V import HEP.Automation.Ma...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110715set1.hs
gpl-3.0
1,743
0
10
569
400
252
148
47
1
{- Copyright 2014 Bas Bossink ([email protected]). -} module Bob (responseFor) where import Data.Char responseFor :: String -> String responseFor a | all isSpace a = "Fine. Be that way!" | and [map toUpper a == a, any isLetter a] = "Woah, chill out!" | last a == '?' = "Sure." | otherwise =...
basbossink/exercism
haskell/bob/Bob.hs
gpl-3.0
334
0
11
81
100
49
51
8
1
-- FilterFastaList module. -- By Gregory W. Schwartz -- -- Collection of functions for the filtering of a pipesFasta {-# LANGUAGE BangPatterns, OverloadedStrings, FlexibleContexts #-} module FilterCloneList ( filterHighlyMutatedEntry ) where -- Built in import Data.List import Data.Maybe impor...
GregorySchwartz/modify-fasta
src/FilterCloneList.hs
gpl-3.0
3,053
0
19
1,459
743
382
361
56
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/Patch.hs
mpl-2.0
5,057
0
17
1,200
858
499
359
119
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Patch.hs
mpl-2.0
3,241
0
13
689
384
232
152
59
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetTCPProxies/SetProxyHeader.hs
mpl-2.0
5,479
0
18
1,191
561
335
226
94
1
module AlecSequences.A271504Spec (main, spec) where import Test.Hspec import AlecSequences.A271504 (a271504) main :: IO () main = hspec spec spec :: Spec spec = describe "A271504" $ it "correctly computes the first 10 elements" $ take 10 (map a271504 [1..]) `shouldBe` expectedValue where expectedValue = [...
peterokagey/haskellOEIS
test/AlecSequences/A271504Spec.hs
apache-2.0
346
0
10
59
130
75
55
10
1
{-| Module : IntMapOrd Description : Bidirectionalization Copyright : (c) Urska, 2015; Melanija, 2015 License : GPL-3 Stability : experimental -- A variant of the regular 'Data.IntMap'. -} module IntMapOrd (IntMapOrd, fromAscPairList, empty, insert, checkInsert, union, lookup, lo...
urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav
IntMapOrd.hs
apache-2.0
4,139
71
16
993
1,353
705
648
83
5
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QHeaderView.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/QHeaderView.hs
bsd-2-clause
2,817
0
18
554
640
327
313
60
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QErrorMessage_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:16 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Gui/QErrorMessage_h.hs
bsd-2-clause
57,911
0
18
12,032
18,570
8,964
9,606
-1
-1
module Datum where import Ellipsoid {- | To represent a set of parameters for describing a particular datum, including a name, the reference ellipsoid used and the seven parameters required to translate co-ordinates in this datum to the WGS84 datum. -} data Datum = Datum { name :: String -- ^ The name of thi...
danfran/hcoord
src/Datum.hs
bsd-3-clause
14,739
0
8
8,648
1,721
1,120
601
252
1
-- | This module contains very basic definitions for Futhark - so basic, -- that they can be shared between the internal and external -- representation. module Language.Futhark.Core ( Uniqueness(..) , StreamOrd(..) , Commutativity(..) -- * Location utilities , locStr -- * Name handling , Name , QualNa...
mrakgr/futhark
src/Language/Futhark/Core.hs
bsd-3-clause
4,854
0
12
1,060
1,183
660
523
107
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Test.ZM.ADT.ByPattern.Kcf6c76b3f808 (ByPattern(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model import qualified Test.ZM.ADT.List.Kb8cd13187198 import qualified Test.ZM....
tittoassini/typed
test/Test/ZM/ADT/ByPattern/Kcf6c76b3f808.hs
bsd-3-clause
728
0
12
65
191
125
66
13
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, ExistentialQuantification #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Exception -- Copyright ...
gcampax/ghc
libraries/base/GHC/IO/Exception.hs
bsd-3-clause
12,307
0
17
2,730
1,844
1,028
816
209
2
{-# LANGUAGE UnicodeSyntax #-} module Main where import Lib main ∷ IO () main = playGame
eallik/haskell-hangman
app/Main.hs
bsd-3-clause
94
0
6
19
23
14
9
5
1
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 TcHsSyn: Specialisations of the @HsSyn@ syntax for the typechecker This module is an extension of @HsSyn@ syntax, for use in the type checker. -} {-# LANGUAGE CPP, TupleSections #-} module TcHsSyn ( mkHsDictLet, mkHsA...
mettekou/ghc
compiler/typecheck/TcHsSyn.hs
bsd-3-clause
74,238
40
19
21,085
19,097
9,699
9,398
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Typ...
meiersi/ghcjs-servant-client
src/Servant/Client.hs
bsd-3-clause
25,506
0
17
6,155
4,198
2,354
1,844
247
1
module LiveJournal.Request where data LJRequestParam = RequestParam { name, value :: String } data LJRequest = Request { params :: [LJRequestParam] } makeRequest :: [(String, String)] -> LJRequest makeRequest = Request . fmap ( uncurry RequestParam ) makeRequestParams :: [(String, String)] -> [LJRequestParam] makeR...
jdevelop/hslj
LiveJournal/Request.hs
bsd-3-clause
365
0
9
54
112
66
46
7
1
%dll form_decode %ver 3.3 %date 2009/08/01 %author onitama %url http://hsp.tv/ %note form_decode.as‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚邱‚ƁB %type ƒ†[ƒU[’è‹`–½—ß %group •¶Žš—ñ‘€ì–½—ß %port Win Cli Let %index form_decode ƒeƒLƒXƒg‚ðƒfƒR[ƒh %prm p1, p2, p3 p1=•ϐ” : •ÏŠ·Œ‹‰Ê‚ðŠi”[‚·‚é•¶Žš—ñŒ^...
zakki/openhsp
package/hsphelp/form_decode.hs
bsd-3-clause
1,035
356
7
147
836
447
389
-1
-1
{-# LANGUAGE BangPatterns #-} module Main (main) where import Control.Applicative import Control.Lens (view) import Criterion.Main import Data.Accessor ((^=)) import Data.Colour (opaque) import Data.Colour.Names import qualified Data.Foldable as F import Data.Random.Normal (normalsIO') import Data.Vector.Storable (Vect...
acowley/RANSAC
tests/Perf.hs
bsd-3-clause
1,439
0
17
403
620
325
295
38
1
{-# language CPP #-} -- | = Name -- -- VK_AMD_rasterization_order - device extension -- -- == VK_AMD_rasterization_order -- -- [__Name String__] -- @VK_AMD_rasterization_order@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 19 -- -- [__Revision__] -- 1 -- -- [_...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_AMD_rasterization_order.hs
bsd-3-clause
12,583
1
14
2,336
1,253
799
454
-1
-1
{-# language CPP #-} -- | = Name -- -- VK_EXT_image_view_min_lod - device extension -- -- == VK_EXT_image_view_min_lod -- -- [__Name String__] -- @VK_EXT_image_view_min_lod@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 392 -- -- [__Revision__] -- 1 -- -- [__E...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_EXT_image_view_min_lod.hs
bsd-3-clause
11,231
0
14
1,791
1,557
939
618
-1
-1
module Problem41 where import Control.Applicative import Data.Char import Prime main :: IO () main = print . maximum . filter isPandigital $ getPrimesUpto 7654321 isPandigital :: Int -> Bool isPandigital n = and $ liftA2 elem ['1' .. (chr $ ord '0' + length n')] [n'] where n' = show n
adityagupta1089/Project-Euler-Haskell
src/problems/Problem41.hs
bsd-3-clause
293
0
11
58
114
60
54
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} import Control.Monad.Trans.Either import System.IO import qualified Data.ByteString.Lazy.Char8 as LBS import Control....
proger/unhal
Amazonka.hs
bsd-3-clause
2,228
0
13
595
575
308
267
67
1
-- currently bothballed, will probably be never needed module Main where import System.Environment import System.Exit import System.Directory import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.List as List main = do args <- getArgs inFileNames <- checkArgs args re...
michalkonecny/aern
aern-order/tools/BenchCsvToGnuplot.hs
bsd-3-clause
7,193
0
13
2,061
1,838
931
907
165
13
-------------------------------------------------------------------------------- -- Copyright © 2011 National Institute of Aerospace / Galois, Inc. -------------------------------------------------------------------------------- -- | Comparison operators. {-# LANGUAGE Trustworthy #-} module Copilot.Language.Operator...
leepike/copilot-language
src/Copilot/Language/Operators/Ord.hs
bsd-3-clause
1,331
0
8
273
484
257
227
23
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} module Gfx.Engine where import Control.DeepSeq import Control.Monad.State.Strict import qualified Data.Map as M import Graphics.Rendering.OpenGL ( BlendingFactor ...
rumblesan/improviz
src/Gfx/Engine.hs
bsd-3-clause
7,625
0
14
2,971
1,689
941
748
-1
-1
{-# LANGUAGE RecordWildCards, GeneralizedNewtypeDeriving, TupleSections, CPP #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -- time changed incompatibly, use the functions that work everywhere module General.Extra( UTCTime, getCurrentTime, addSeconds, showRelativeTime, relativeTime, showUTCTime, readD...
Pitometsu/bake
src/General/Extra.hs
bsd-3-clause
9,709
0
22
2,408
3,263
1,656
1,607
221
3
module Print2 where main :: IO () main = do putStrLn "Count to four for me: " putStr "one, two" putStr ", three, and " putStrLn "four!"
chengzh2008/hpffp
src/ch03-Strings/print2.hs
bsd-3-clause
145
0
7
36
43
19
24
7
1