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
{-# LANGUAGE DeriveFunctor #-} -- | Work on the ideas presented at http://degoes.net/articles/modern-fp module CloudFiles where import Control.Monad.Free import Data.Functor.Coproduct import Data.Functor.Sum import Data.List.Split import Prelude hiding ...
capitanbatata/sandbox
free-monads/src/CloudFiles.hs
gpl-3.0
4,497
0
12
907
1,080
546
534
79
1
-- Exercise 3.6 -- -- A binomial heap implementation that stores rank information at the top level -- of each binomial tree (since, by definition, the child nodes of a binomial -- tree node of rank r have ranks r-1,r-2,...,0). module Ex3_6( BinomialTopRankHeap(BH), root, rank, empty, isEmpty, insert, merge, findMi...
fishbee/pfds-haskell
chapter3/Ex3_6.hs
gpl-3.0
1,941
0
16
438
962
515
447
43
2
module ListMail where import Import hiding (toLower) import Handler.Events (eventsTables) import Data.Char import qualified Data.Text as T canonicalizeListName :: Text -> Text canonicalizeListName = T.map canonicalize where canonicalize c | isAsciiUpper c = toLower c | isAsciiLower c = c ...
mmarx/minitrue
ListMail.hs
gpl-3.0
1,928
0
14
608
545
273
272
43
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-cloudmonitoring/gen/Network/Google/Resource/CloudMonitoring/Timeseries/Write.hs
mpl-2.0
4,262
0
14
947
402
247
155
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.ReplicaPool -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla ...
rueshyna/gogol
gogol-replicapool/gen/Network/Google/ReplicaPool.hs
mpl-2.0
7,524
0
15
1,398
665
483
182
146
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Partners.Types -- Copyright : (c) 2015-2016 Brendan Ha...
rueshyna/gogol
gogol-partners/gen/Network/Google/Partners/Types.hs
mpl-2.0
4,625
0
7
1,274
525
363
162
158
1
module Moonbase.Panel.Items.Cpu where import Control.Applicative import Control.Arrow import Control.Concurrent import Control.Monad import Control.Monad.IO.Class import System.IO import qualified Graphics.UI.Gtk as Gtk import Data.Time.F...
felixsch/moonbase-ng
src/Moonbase/Panel/Items/Cpu.hs
lgpl-2.1
3,701
0
19
1,100
1,371
686
685
101
4
-- file: ch02/Assign.hs x = 10 x = 11
chinaran/haskell-study
ch02/Assigh.hs
apache-2.0
38
0
4
9
12
7
5
2
1
-- | Type and functions for first-order predicate logic. module Akarui.Parser.FOL where import qualified Data.Text as T import Text.Parsec import Text.Parsec.String (Parser) import qualified Text.Parsec.Expr as Ex import Akarui.FOL.Formula import Akarui.FOL.FOL import Akarui.Parser.LogicOps import Akarui.Parser.Core i...
PhDP/Manticore
Akarui/Parser/FOL.hs
apache-2.0
3,851
0
12
662
963
533
430
77
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveDataTypeable #-} module System.Monitoring.Nrpe.Protocol ( Service (..) , nrpe , check , Result (..) , Code (..) ) where import Prelude hiding (read) import Data.Binary (Binary (..), encode, decode) import Data.Binary.Pu...
lucasdicioccio/nrpe
src/System/Monitoring/Nrpe/Protocol.hs
apache-2.0
4,321
0
13
1,050
1,362
726
636
116
2
module Lycopene.Core.Free where data Free f a = Free (f (Free f a)) | Pure a instance Functor f => Functor (Free f) where fmap f (Pure x) = Pure $ f x fmap f (Free x) = Free $ fmap (fmap f) x instance Functor f => Applicative (Free f) where pure = Pure (Pure f) <*> x = fmap f x (Free f) <*> x = Free $ fmap...
utky/lycopene
src/Lycopene/Core/Free.hs
apache-2.0
641
0
10
176
389
192
197
18
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QToolBar_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:27 Warning : this file is machine generated - do no...
uduki/hsQt
Qtc/Gui/QToolBar_h.hs
bsd-2-clause
55,950
0
18
12,269
18,819
9,078
9,741
-1
-1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveFunctor #-} -- | Ultimate data representation. module NLP.MorfNCP.Base ( -- * Basics DAG , Edge (..) , Token (..) , Interp (..) , fromList -- * Indices , recalcIxs , recalcIxsLen , recalcIxs1 -- * Merging , merge ) where import qualified Data.Set as S import...
kawu/morf-nkjp
src/NLP/MorfNCP/Base.hs
bsd-2-clause
4,002
0
12
939
978
567
411
79
2
{-# LANGUAGE Haskell2010 #-} module Classes where class Foo a where bar :: a -> Int baz :: Int -> (a, a) instance Foo Int where bar = id baz x = (x, x) instance Foo [a] where bar = length baz _ = ([], []) class Foo a => Foo' a where quux :: (a, a) -> a quux (x, y) = norf [x, y] ...
haskell/haddock
hypsrc-test/src/Classes.hs
bsd-2-clause
724
0
11
237
370
194
176
27
0
{-# LANGUAGE OverloadedStrings #-} module Text.HTML.SanitizeXSS ( -- * Default HTML sanitizers. sanitize , sanitizeBalance , sanitizeXSS -- * Helper functions to build your own sanitizer. , filterTags , sanitizeWith , balance -- * Default tag sanitizer. , safeTags -- * I...
silkapp/haskell-xss-sanitize
Text/HTML/SanitizeXSS.hs
bsd-2-clause
12,385
0
15
2,154
3,140
1,908
1,232
215
4
module MostOverlapping ( mostOverlapping , SP(..) ) where import qualified Data.List as L import qualified Data.Map as M import qualified Data.Set as S import Data.Ord ( comparing ) import Debug.Trace ( trace ) -- package 'prettyclass' import Text.PrettyPrint.HughesPJClass ( text , hang , Pretty , pPrint) data SP a ...
malie/drolesat
MostOverlapping.hs
bsd-3-clause
3,221
0
19
970
1,249
705
544
70
3
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-} module Parse.Declaration where import Control.Applicative ((<$>)) import Text.Parsec ((<|>), (<?>), choice, digit, optionMaybe, string, try) import qualified AST.Declaration as D import qualified Parse.Expression as Expr import Parse.Helpers import qualified Parse.Ty...
JoeyEremondi/haskelm
src/Parse/Declaration.hs
bsd-3-clause
1,619
0
15
417
511
255
256
46
2
module Test where import qualified Data.ByteString.Lazy as BS import Data.Binary.Get import Data.Binary as B import GisServer.Data.ISO8211 import GisServer.Data.S57 import Int main :: IO () main = do bs <- BS.readFile f1 let r :: ExchangeFile r = B.decode bs print $ ddr r let rs = records r print ...
alios/gisserver
Test.hs
bsd-3-clause
592
0
11
127
172
94
78
21
1
{-# OPTIONS_GHC -O #-} {-# LANGUAGE NoMonomorphismRestriction, ViewPatterns, TupleSections #-} import Prelude as P import QCUtils import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit import Test.Q...
iteloo/tsuru-sample
iteratee-0.8.9.6/tests/testIteratee.hs
bsd-3-clause
21,902
0
17
4,961
7,731
4,026
3,705
-1
-1
module Data.Tree.Pure where import Control.Applicative import Data.List import Data.Monoid import Data.Monoid.Bounds import Data.Maybe import Data.Ord import Data.Tuples import Data.Tree.Abstract import Prelude import qualified Data.Morphism.Anamorphism as Ana import qualified Data.Morphism.Catamorphism as Ca...
sebastiaanvisser/fixpoints
src/Data/Tree/Pure.hs
bsd-3-clause
2,230
0
10
451
963
499
464
58
1
module Main where import Text.ParserCombinators.Parsec hiding (optional) import Data.Either (either) import Data.Serialize (runGet, getWord16be) import Data.ByteString.Base64 (decodeLenient) import qualified Data.ByteString.Char8 as B import Control.Monad (replicateM) import Data.Maybe (catMaybes) import Control.Appli...
danchoi/imapget
utf7/utf7.hs
bsd-3-clause
1,309
0
18
243
455
239
216
37
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} module Main where import Control.Natural import Control.Remote.Haxl as M import Control.Remote.Haxl.Applicative as A import Control.Remote.Haxl.Packet.Weak as WP import C...
jtdawso/remote-haxl
examples/Main.hs
bsd-3-clause
4,574
1
11
1,445
1,296
633
663
102
2
{-# LANGUAGE CPP #-} {-| Module : Idris.CmdOptions Description : A parser for the CmdOptions for the Idris executable. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE Arrows #-} module Idris.CmdOptions ( module Idris.CmdOptions , opt , getClient, getPkg, getPkgCheck, getPkgClean, ...
FranklinChen/Idris-dev
src/Idris/CmdOptions.hs
bsd-3-clause
15,470
1
110
4,858
3,593
1,756
1,837
221
2
{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveFunctor #-} module Language.Haskell.AST.Exts.Patterns where import Data.Data import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Language.Haskell.AST.Core hiding (Pat) -- | Bang patterns extension to @Pat@ data BangP...
jcpetruzza/haskell-ast
src/Language/Haskell/AST/Exts/Patterns.hs
bsd-3-clause
1,436
0
8
265
440
242
198
26
0
{-# OPTIONS_GHC -fno-warn-tabs #-} import Base64 import Common import Hex import Test.QuickCheck main = do putStrLn "=== Challange1 ===" quickCheck $ \v -> base64Decode (base64Encode v) === v quickCheck $ \v -> hexDecode (hexEncode v) === v putStrLn $ base64Encode $ hexDecode "49276d206b696c6c696e6720796f75722...
andrewcchen/matasano-cryptopals-solutions
set1/Challange1.hs
bsd-3-clause
385
2
12
52
93
46
47
11
1
{-# LANGUAGE OverloadedStrings, UnicodeSyntax #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Reflex.Dom.HTML5.Elements.Interactive Description : HTML5 interactive elements Copyright : (c) gspia 2017 License : BSD Maintainer : gspia = Interactive This module c...
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Elements/Interactive.hs
bsd-3-clause
70,513
0
14
15,128
20,737
10,853
9,884
851
1
newtype State s a = State { runState :: s -> (a, s) } retS :: a -> State s a retS x = State $ \s -> (x, s) bindS :: State s a -> (a -> State s b) -> State s b State m `bindS` f = State $ \s -> let (x, s') = m s in runState (f x) s' instance Functor (State s) where fmap f m = m `bindS` (retS . f) instance Applicati...
YoshikuniJujo/funpaala
samples/37_list_and_monad/state1.hs
bsd-3-clause
2,085
14
12
494
1,114
579
535
64
2
module Meadowstalk.Handlers.Admin where import Yesod.Core import Meadowstalk.Foundation import Meadowstalk.Model ------------------------------------------------------------------------------- getAdminR :: Handler Html getAdminR = undefined ------------------------------------------------------------------------...
HalfWayMan/meadowstalk
src/Meadowstalk/Handlers/Admin.hs
bsd-3-clause
1,793
0
7
202
357
189
168
42
1
{- - DumpTruck.hs - By Steven Smith -} -- | DumpTruck is a micro web framework. It is built up from two components: -- 'Route's and 'EndPoint's. -- -- 'Route's describe the @URI@ heirarchy for a web site. They are based around -- matching path fragments. The recommended way to build up 'Route's is through -- @do@ n...
stevely/DumpTruck
src/Web/DumpTruck.hs
bsd-3-clause
6,701
0
4
1,446
298
253
45
41
0
import Language.Cube house :: Block Cube house = let house'' = (house' + square)*line in rfmap (12 * dz +) house'' where house' :: Block Cube house' = block $ [cube 1 x y| x<-[-10..10], y<-[-10..10], y < x , y < (-x)] square :: Block Cube square = rfmap ((+) (-12 * dz)) $ block $ [cube ...
junjihashimoto/cube
sample/house.hs
bsd-3-clause
483
0
14
136
282
147
135
13
1
module Network.TeleHash.Bucket ( bucket_load , bucket_get ) where import Control.Exception import Data.Aeson.Types import Data.Maybe import Network.TeleHash.Hn import Network.TeleHash.Types import Network.TeleHash.Utils import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as BL import ...
alanz/htelehash
src/Network/TeleHash/Bucket.hs
bsd-3-clause
2,413
0
18
491
381
201
180
33
4
{-# LANGUAGE QuasiQuotes #-} module Feldspar.Multicore.Compile.Parallella.Esdk where import Feldspar.Multicore.Compile.Parallella.Access (isCTypeOf) import Feldspar.Multicore.Compile.Parallella.Imports import qualified Language.C.Monad as C (addGlobal, CGen) import Language.C.Quote.C as C import qualified Language.C....
kmate/raw-feldspar-mcs
src/Feldspar/Multicore/Compile/Parallella/Esdk.hs
bsd-3-clause
3,211
0
12
698
946
515
431
-1
-1
module Mud.ConfigSpec where import Control.Monad.Except import Mud.Config import Mud.Error import SpecHelpers spec :: Spec spec = do let files = [ ( "/etc/mud/simple.conf" , "deploy=/etc/mud/different.deploy\n\ \user=somebody\n\ \var:var1=one\n\ ...
thoferon/mud
tests/Mud/ConfigSpec.hs
bsd-3-clause
2,423
0
19
638
470
246
224
-1
-1
{- Copyright James d'Arcy 2010 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
jamesdarcy/Hastur
src/Hastur/Types.hs
bsd-3-clause
2,933
0
17
560
386
231
155
48
0
-- | -- Module : Portager.Writes -- Copyright : (C) 2017 Jiri Marsicek -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Jiri Marsicek <jiri.marsicek@gmail.com> -- -- This module provides functionality for serialization of portage configuration to configuration files. -- {-# LANGUAGE Over...
j1r1k/portager
src/Portager/Writes.hs
bsd-3-clause
5,388
0
15
887
1,134
612
522
80
1
{-# LANGUAGE RankNTypes #-} {- | Module : ./Static/ChangeGraph.hs Description : functions for changing a development graphs Copyright : (c) Christian Maeder, DFKI GmbH 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-po...
spechub/Hets
Static/ChangeGraph.hs
gpl-2.0
19,786
90
34
4,367
2,318
1,198
1,120
158
9
module S06_Ex1 where {- Module : S06_Ex1 Description : Series 06 of the Functionnal and Logic Programming course at UniFR Author : Sylvain Julmy Email : sylvain.julmy(at)unifr.ch -} -- imports for tests import Test.QuickCheck import Control.Monad import qualified Data.List as L import qualified Data.Set as S -- ...
SnipyJulmy/mcs_notes_and_resume
fun-and-log-prog/exercices/s06/s06_Julmy_Sylvain/ex1.hs
lgpl-3.0
2,781
0
16
724
1,103
594
509
59
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , BangPatterns #-} {-# OPTIONS_GHC -Wno-identities #-} -- Whether there are identities depends on the platform {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Mod...
olsner/ghc
libraries/base/GHC/IO/FD.hs
bsd-3-clause
23,295
3
17
5,971
4,300
2,238
2,062
319
5
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1993-1998 \section[TcAnnotations]{Typechecking annotations} -} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module TcAnnotations ( tcAnnotations, annCtxt ) where import GhcPrelude import {-# SOURCE #-} TcSplice ( runAnnotatio...
ezyang/ghc
compiler/typecheck/TcAnnotations.hs
bsd-3-clause
2,649
0
13
530
566
287
279
47
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE CPP #-}...
ddssff/lens
tests/templates.hs
bsd-3-clause
12,128
0
12
2,395
3,146
1,719
1,427
263
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell, CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PatternGuards #-} -- | Static file serving for WAI. module Network.Wai.Application.Static ( -- * WAI application staticApp -- ** Default Settings ...
kazu-yamamoto/wai
wai-app-static/Network/Wai/Application/Static.hs
mit
11,673
3
35
3,694
2,599
1,348
1,251
207
13
{- | Module : $Header$ Description : Definition of Dependency Graph with utils Copyright : (c) Ewaryst Schulz, DFKI Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : Ewaryst.Schulz@dfki.de Stability : experimental Portability : portable Definition of Dependency Graph and utils t...
mariefarrell/Hets
CSL/DependencyGraph.hs
gpl-2.0
7,415
0
14
2,238
2,492
1,296
1,196
130
3
module Yi.Event ( Event(..), prettyEvent, Key(..), Modifier(..), -- * Key codes eventToChar ) where import Data.Bits (setBit) import Data.Char (chr, ord) data Modifier = MShift | MCtrl | MMeta | MSuper | MHyper deriving (Show,Eq,Ord) data Key = KEsc | KFun Int | KPrtS...
siddhanathan/yi
yi-core/src/Yi/Event.hs
gpl-2.0
1,954
0
10
541
684
373
311
42
3
module Main (main) where main :: IO () main = putStrLn "Hello World"
urbanslug/ghc
testsuite/tests/driver/dynHelloWorld.hs
bsd-3-clause
71
0
6
15
27
15
12
3
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Data.IORef import qualified Graphics.UI.FLTK.LowLevel.FL as FL import Graphics.UI.FLTK.LowLevel.Fl_Enumerations import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics....
deech/fltkhs-demos
src/Examples/table-spreadsheet-with-keyboard-nav.hs
mit
11,763
0
30
3,550
3,877
1,879
1,998
278
19
module Backend.Code ( Code , new , parse , ParseError(..) ) where import Backend.Prelude import Backend.Random (HasRandom) import qualified Backend.Random as Random import qualified Data.Text as Text import Data.Vector ((!)) import qualified Data.Vector as V import Text.Read (Read(..)) -- | Random 8-charac...
cdparks/lambda-machine
backend/src/Backend/Code.hs
mit
2,569
0
11
489
650
361
289
-1
-1
{-# htermination showsPrec :: Show a => Int -> [a] -> String -> String #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_showsPrec_4.hs
mit
75
0
2
15
3
2
1
1
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeSynonymInstances #-} module Jolly.Types.Infer ( inferTop , Constraint , Subst(..) , TypeError(..) ) where import Control.Monad.Except import Control.Monad.Identity import ...
jchildren/jolly
src/Jolly/Types/Infer.hs
mit
7,547
0
20
2,061
3,279
1,694
1,585
212
10
{-# OPTIONS -XFlexibleContexts #-} module ChordHist ( chordHist ) where import Data.Bifunctor (bimap) import Data.Char (ord, isAlpha, toLower) import qualified Data.ListLike as LL import qualified Data.Map.Lazy as M import Data.Monoid (Monoid(..)) import Text.Printf (printf) newtype ChordHist = CH (M.Map (Char, Cha...
saidie/key_chord_count
src/ChordHist.hs
mit
1,699
0
14
462
872
452
420
-1
-1
{-# LANGUAGE ViewPatterns #-} {-@ LIQUID "--no-termination" @-} module InTex where import Text.Pandoc.JSON import Text.Pandoc import Data.Char (isSpace) import Data.List import Data.Monoid (mempty) import Debug.Trace import Text.Printf (printf) main :: IO () main = toJSONFilter readFootnotes -----------------------...
UCSD-PL/230-web
templates/inside.hs
mit
3,865
0
14
671
615
337
278
38
2
module Chapter09.And where -- list, and, True iff no values are False and' :: [Bool] -> Bool and' [] = True and' (b:bools) = b && and' bools -- True if any are True or' :: [Bool] -> Bool or' [] = False or' (b:bools) = b || or' bools -- returns True if any value applied -- to f returned ...
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter09/And.hs
mit
2,449
0
9
704
525
305
220
33
1
{-# LANGUAGE OverloadedStrings #-} module Presenters.TaskList ( TaskList(..) ) where import Data.Aeson import Presenters.UniqueTask import Presenters.RecurringTask data TaskList = TaskList { uniqueTasks :: [UniqueTask] , recurringTasks :: [RecurringTask] } insta...
ostapneko/stld2
src/main/Presenters/TaskList.hs
mit
473
0
9
151
99
58
41
13
0
-- Copyright (c) 1999 Chris Okasaki. -- See COPYRIGHT file for terms and conditions. module Data.Edison.Test.Bag where import Prelude hiding (concat,reverse,map,concatMap,foldr,foldl,foldr1,foldl1, filter,takeWhile,dropWhile,lookup,take,drop,splitAt, zip,zip3,zipWith,zi...
robdockins/edison
test/src/Data/Edison/Test/Bag.hs
mit
12,343
0
16
3,147
4,599
2,302
2,297
-1
-1
module Wikidata.Query.Endpoint where {-- WHEW! Has querying the wikidata endpoint gotten easier or what?!? Just submit your SPARQL query using the sparql function and you'll ge back a ByteString response as JSON. Decoding the JSON is on you. --} import Data.ByteString.Lazy (ByteString) import Network.HTTP.Conduit (...
geophf/1HaskellADay
exercises/HAD/Wikidata/Query/Endpoint.hs
mit
535
0
7
74
79
48
31
8
1
{- | Module : $Id$ Copyright : (c) Christian Maeder, Uni Bremen 2002-2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable append a haskell Prelude string for programatica analysis or add CASL_DL/PredDatatypes.dol to...
spechub/Hets
utils/appendHaskellPreludeString.hs
gpl-2.0
622
0
12
140
90
45
45
10
2
{-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses, FlexibleContexts #-} module Pump.Inter2 where import Pump.Type import Pump.Positiv import Pump.Negativ import Language.Syntax import Language.Inter import Language import Language.Sampler import Pump.Conf2 import Challenger.Partial import...
Erdwolf/autotool-bonn
src/Pump/Inter2.hs
gpl-2.0
2,828
19
16
772
850
453
397
70
1
module Zepto.Primitives.ConversionPrimitives where import Data.Char (ord) import Control.Monad.Except (throwError) import Zepto.Types symbol2String :: [LispVal] -> ThrowsError LispVal symbol2String [SimpleVal (Atom a)] = return $ fromSimple $ String a symbol2String [notAtom] = throwError $ TypeMismatch "symbol" notAt...
zepto-lang/zepto-js
src/Zepto/Primitives/ConversionPrimitives.hs
gpl-2.0
2,055
0
12
387
735
371
364
37
3
{- | Module : $Header$ Description : Internal data types of the CMDL interface Copyright : uni-bremen and DFKI License : GPLv2 or higher, see LICENSE.txt Maintainer : r.pascanu@jacobs-university.de Stability : provisional Portability : portable CMDL.DataTypes describes the internal states(or datatypes) o...
nevrenato/Hets_Fork
CMDL/DataTypes.hs
gpl-2.0
5,317
0
11
1,131
862
534
328
138
8
import Control.Applicative import System.Directory import System.Environment import System.Process import qualified Text.StringTemplate as ST render :: String -> [(String,String)] -> String render tmpl attribs = (ST.render . ST.setManyAttrib attribs . ST.newSTMP) tmpl strtmpl = "prospino {\n basedir = \"$basedir$\...
wavewave/lhc-analysis-collection
analysis/2013-07-26_prospino_2sq.hs
gpl-3.0
2,307
0
23
627
732
394
338
39
1
{-# LANGUAGE PatternGuards #-} module Lang.FreeTyCons (bindsTyCons) where import CoreSyn import CoreUtils (exprType) import DataCon import TyCon import Id import Type import Var import Data.Set (Set) import qualified Data.Set as S bindsTyCons :: [CoreBind] -> [TyCon] bindsTyCons = S.toList . S.unions . map bindTyCon...
danr/tfp1
Lang/FreeTyCons.hs
gpl-3.0
1,737
0
13
464
647
322
325
43
10
{-# LANGUAGE OverloadedStrings #-} -- ghc --make EditDistViz.hs -main-is EditDistViz.main module EditDistViz where import Data.Array import Data.List (intersperse) import Control.Arrow ((***)) import qualified Data.Set as S -- write file import System.IO data Cell a = Val {val::Int, reasons::[Reason a]} derivin...
fnordomat/misc
haskell/editdistviz/EditDistViz.hs
gpl-3.0
10,585
3
31
4,101
4,542
2,436
2,106
247
7
class Functor' f where fmap' :: (a -> b) -> f a -> f b instance Functor' [] where fmap' = map instance Functor' Maybe where fmap' f (Just x) = Just (f x) fmap' f Nothing = Nothing instance Functor' (Either a) where fmap' f (Right x) = Right (f x) fmap' f (Left x) = Left x data Barry t k p = ...
lamontu/learning_haskell
functor.hs
gpl-3.0
725
0
10
204
330
171
159
19
0
-- -- Copyright (c) 2004-2008 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of -- the License, or (at your option) any l...
danplubell/hmp3-phoenix
src/Style.hs
gpl-3.0
12,146
0
14
3,187
3,002
1,641
1,361
241
19
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/DescribeHapg.hs
mpl-2.0
6,794
0
29
1,538
1,050
616
434
114
1
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } import qualified Data.List ()
lspitzner/brittany
data/Test469.hs
agpl-3.0
144
0
4
15
11
7
4
1
0
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE TupleSections #-} module MicroLens where import Prelude hiding (sum) import Data.Monoid import qualified Data.Traversable as T --------------------------------------------------------- -- Some basic libraries class Profunctor p where dimap ::...
ice1000/OI-codes
codewars/301-400/lensmaker.hs
agpl-3.0
5,433
0
11
1,352
1,638
914
724
78
1
{-# LANGUAGE MultiParamTypeClasses #-} module Tetris.Block.Dir where import GHC.Prim (Constraint) data Right = Right data Down = Down data RightUp = RightUp class Dir d instance Dir Right instance Dir Down instance Dir RightUp class (Dir d) => CanBeFirst d instance CanBeFirst Right ...
melrief/tetris
src/Tetris/Block/Dir.hs
apache-2.0
653
0
10
165
202
98
104
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Test...
HuwCampbell/grenade
test/Test/Grenade/Layers/PadCrop.hs
bsd-2-clause
1,521
0
14
475
593
304
289
39
1
{-# LANGUAGE TemplateHaskell #-} {-| Helpers for creating various kinds of 'Field's. They aren't directly needed for the Template Haskell code in Ganeti.THH, so better keep them in a separate module. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with ...
leshchevds/ganeti
src/Ganeti/THH/Field.hs
bsd-2-clause
4,987
0
11
1,019
661
397
264
62
1
-- -- Copyright 2014, NICTA -- -- This software may be distributed and modified according to the terms of -- the BSD 2-Clause license. Note that NO WARRANTY is provided. -- See "LICENSE_BSD2.txt" for details. -- -- @TAG(NICTA_BSD) -- -- Functions for generating domain schedule from an input specification. module Outpu...
NICTA/sk-config
src/OutputConfig.hs
bsd-2-clause
1,462
0
19
358
216
126
90
21
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Default import qualified Network.HTTPMultiplexer.Config as MITM import qualified Network.HTTPMultiplexer.Tee as MITM import qualified Network.Wai as Wai import qualified Network.Wai.Middleware.RequestLogger as Wai import qualified Network.Wai.Handler....
BrandKarma/http-multiplexer
src/Main.hs
bsd-3-clause
1,113
0
16
201
254
138
116
26
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] he [@ISO639-2@] heb [@ISO639-3@] heb [@Native name@] עִבְרִית [@English name@] Modern Hebrew -}...
telser/numerals
src/Text/Numeral/Language/HEB.hs
bsd-3-clause
5,941
15
18
2,541
1,557
871
686
112
7
module Block ( doit ) where import DumpLevelDB import Blockchain.Format --import Debug.Trace doit::String->String->IO () --doit dbtype h = showKeyVal (formatBlock . rlpDecode . rlpDeserialize) dbtype "blocks" (if h == "-" then Nothing else Just h) doit dbtype h = showKeyVal format dbtype "blockchain"...
jamshidh/ethereum-query
src/Block.hs
bsd-3-clause
366
0
8
77
74
41
33
7
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Extra functions for optparse-applicative. module Options.Applicative.Builder.Extra (boolFlags ,boolFlagsNoDefault ,maybeBoolFlags ,firstBoolFlags ,enableDisableFlags ,enableDisableFlagsNoDefault ,extraHelpOption ,execExtraHelp ...
martin-kolinek/stack
src/Options/Applicative/Builder/Extra.hs
bsd-3-clause
10,634
2
29
3,238
2,360
1,256
1,104
203
10
module Main where import Bookkeeper import Criterion.Main type PersonB = Book '[ "name" :=> String, "age" :=> Int ] data PersonR = PersonR { name :: String, age :: {-# NOUNPACK #-} Int } deriving (Eq, Show) pb :: PersonB pb = emptyBook & #name =: "" & #age =: 0 pr :: PersonR pr = PersonR { name = "" , ...
turingjump/bookkeeper
bench/Main.hs
bsd-3-clause
830
0
14
283
388
206
182
-1
-1
{- This module contains definitions for HaCoTeB types: AST nodes and other intermediate data structures -} module HaCoTeB.Types where newtype AST = AST [Section] deriving (Eq, Show, Read) data Section = TextSection Content | CodeSection Content | DecoratedSection [Decoration] Content deriving (Eq, Show, Read...
mihaimaruseac/HaCoTeB
src/HaCoTeB/Types.hs
bsd-3-clause
789
0
7
168
221
128
93
32
0
module Zero.Crypto.Client ( generateInteger , generateBytes ) where import Control.Monad.IO.Class (liftIO) import Data.Typeable import qualified Data.Text as T import Data.Text (Text) import qualified Data.JSString as JSS import Data.JSString (JSString) import ...
et4te/zero
src/Zero/Crypto/Client.hs
bsd-3-clause
1,392
8
17
250
342
185
157
31
1
{-# LANGUAGE DeriveDataTypeable #-} module Language.GDL.Syntax ( Sexp (..) , Identifier, Term (..), Query (..), Clause, Database , State, Role, Move , escape, unescape , sexpToInt, termToInt , (|+|) ) where import Data.ByteString (ByteString) import qualified Data.ByteS...
ian-ross/ggp
Language/GDL/Syntax.hs
bsd-3-clause
2,791
0
16
824
951
539
412
77
3
module Main where import qualified Data.Map import Data.List (intercalate) import System.Random import System.Random.Shuffle import System.IO.Strict as St -- | String partitions partitionAll :: Int -> Int -> [a] -> [[a]] partitionAll a b [] = [] partitionAll a b xs = take a xs : (partitionAll a b (drop b xs)) -- | Cr...
hugo-dc/hsmarkov
src/Main.hs
bsd-3-clause
4,322
0
14
1,525
1,430
718
712
97
2
module Teste2 where class Mult a b c where (.*.) :: a -> b -> c instance Mult a b c => Mult a [b] [c] f :: (Mult a [b] b) => Bool -> a -> b -> b f b x y = if b then x .*. [y] else y
emcardoso/CTi
src/Tests/Teste2.hs
bsd-3-clause
195
0
8
66
120
65
55
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeOperators #-} module Data.InvertibleGrammar.Combinators ( iso , osi , partialIso , partialOsi , push , pair , swap , cons , nil ...
esmolanka/sexp-grammar
invertible-grammar/src/Data/InvertibleGrammar/Combinators.hs
bsd-3-clause
5,594
0
15
1,506
2,285
1,240
1,045
127
3
{-# OPTIONS_GHC -Wall #-} module Classy.Utils ( lastCommonBases , removeCommonList ) where import Classy.Types -- | Return the direct dependency of a frame parentBases :: Bases -> Bases parentBases NewtonianBases = NewtonianBases parentBases (RotatedBases frame0 _ _) = frame0 ...
ghorn/classy-dvda
src/Classy/Utils.hs
bsd-3-clause
1,953
0
9
378
412
222
190
24
1
module Main where import qualified PROJECT_NAMESPACE.Tests import Test.Framework main :: IO () main = defaultMain tests tests :: [Test] tests = [ testGroup "Tests" [ PROJECT_NAMESPACE.Tests.test ] ]
markhibberd/haskell.template
test/Main.hs
bsd-3-clause
239
0
8
68
60
35
25
14
1
{-# LANGUAGE TemplateHaskell #-} module Camera where import Control.Lens.TH (makeLenses) import Control.Lens.Getter (view) import Control.Lens.Setter import Linear.Conjugate import Linear.Quaternion import Linear.V3 import Linear.Vector import Linear.Matrix hiding (translation) import Linear.Metric data Camera = Camer...
acowley/PointCloudViewer
src/Camera.hs
bsd-3-clause
3,206
0
13
762
963
510
453
56
2
module OtherTests (otherTests) where import TestHelpers import Foreign.Storable (peek, poke) import Foreign.Marshal (alloca) import Foreign.C.Types (CInt) import Control.Parallel.MPI.Base import Data.Maybe (isJust) otherTests :: ThreadSupport -> Rank -> [(String,TestRunnerTest)] otherTests threadSupport _ = [ tes...
bjpop/haskell-mpi
test/OtherTests.hs
bsd-3-clause
4,291
0
17
819
1,127
546
581
102
3
module Main where import Output import Parser import FromID import System.Environment import Control.Applicative import Data.Time main :: IO () main = do d <- localDay . zonedTimeToLocalTime <$> getZonedTime args <- getArgs let (_, "--" : fps) = span (/= "--") args items <- mapM (fmap parse . readFile) fps putSt...
YoshikuniJujo/forest
subprojects/schedevr/src/mkschd/marge-schedule-evr.hs
bsd-3-clause
403
0
11
68
144
73
71
15
1
{-# OPTIONS_GHC -fno-warn-orphans -fsimpl-tick-factor=500 #-} module Real.PkgBinary where import Real.Types import Data.Binary as Binary import Data.Binary.Get as Binary import Data.ByteString.Lazy as BS serialise :: [GenericPackageDescription] -> BS.ByteString serialise pkgs = Binary.encode pkgs deserialise :: BS.B...
thoughtpolice/binary-serialise-cbor
bench/Real/PkgBinary.hs
bsd-3-clause
1,575
0
12
236
456
220
236
51
2
-- | This module provides the /Empty Processor/. -- If the given condition is fulfilled, the tree is closed with a constant certificate. module Tct.Core.Processor.Empty (empty) where import qualified Tct.Core.Common.Pretty as PP import Tct.Core.Common.SemiRing (zero) import qualified Tct.Core.Common.Xml ...
ComputationWithBoundedResources/tct-core
src/Tct/Core/Processor/Empty.hs
bsd-3-clause
1,400
0
10
307
399
213
186
-1
-1
-- | This library provides functions to SMSDirect API. -- -- Simple usage: -- -- @ -- -- Get DB list -- r <- smsdirect \"test\" \"test\" getDB -- -- -- Make url for tracing purposes -- let cmd = url \"test\" \"test\" getDB -- @ -- module SMSDirect ( module SMSDirect.Command ) where import SMSDirect.Command
mvoidex/smsdirect
src/SMSDirect.hs
bsd-3-clause
317
0
5
65
29
23
6
3
0
-- | Util to work with bit representation of number module Toy.Util.Bits where import Data.Bits (Bits (..), FiniteBits (..)) import Universum setHBit :: FiniteBits x => x -> x setHBit = flip setBit =<< subtract 1 . finiteBitSize clearHBit :: FiniteBits x => x -> x clearHBit = flip clearBit =<< s...
Martoon-00/toy-compiler
src/Toy/Util/Bits.hs
bsd-3-clause
533
0
7
116
172
90
82
11
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, FlexibleContexts, FlexibleInstances #-} module Main ( main ) where import Prelude hiding (null) import Data.Maybe (fromJust) import Control.Applicative import System.Random import Test.Framewor...
bobatkey/Forvie
tests/Properties.hs
bsd-3-clause
5,452
0
13
1,317
1,232
684
548
84
1
module Lab2 where ------------------------------------------------------------------------------------------------------------------------------ -- Lab 2: Validating Credit Card Numbers ------------------------------------------------------------------------------------------------------------------------------ -- ==...
javier-alvarez/myhaskell
lab2.hs
bsd-3-clause
5,884
0
12
2,439
865
515
350
146
2
import Data.Word -- Gain a lot of speed here using Word32 type and `mod` for parity checking -- instead of `even`. This is all since it keeps the values unboxed. collatzLen :: Int -> Word32 -> Int collatzLen c 1 = c collatzLen c n = collatzLen (c+1) $ if n `mod` 2 == 0 then n `div` 2 else 3*n+1 pmax x n = x `max` (co...
dterei/Scraps
euler/p14/p14.hs
bsd-3-clause
417
0
9
93
159
87
72
7
2
-- -- -- ------------------ -- Exercise 10.35. ------------------ -- -- -- module E'10'35 where -- It depends. There are many things that might be important: -- -- - readability ( length and precision ) -- - future changes/extensions -- - standard problems -- - (efficient) algorithms -- - (future) optimi...
pascal-knodel/haskell-craft
_/links/E'10'35.hs
mit
925
0
2
179
32
31
1
1
0
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, OverloadedStrings, ScopedTypeVariables #-} {- Copyright 2019 The CodeWorld Authors. All Rights Reserved. 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 ...
alphalambda/codeworld
funblocks-client/src/Blocks/CodeGen.hs
apache-2.0
8,966
0
18
4,645
2,051
963
1,088
172
3
-- | This is a very simple promise system, for promises that can fail. module STM.Promise ( newPromise , PubFP , SubFP , fulfillPromise , failPromise , getResult ) where import Control.Concurrent.STM impor...
bitemyapp/7startups
STM/Promise.hs
bsd-3-clause
896
0
12
277
301
158
143
20
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Network.Bitcoin.BitX.Private.Fees -- Copyright : 2017 Tebello Thejane -- License : BSD3 -- -- Maintainer : Tebello Thejane <zyxoas+hackage@gmail.com> -- Stability : Exper...
tebello-thejane/bitx-haskell
src/Network/Bitcoin/BitX/Private/Fees.hs
bsd-3-clause
1,159
0
10
165
127
83
44
11
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} module PlaceHolder where import Type ( Type ) import Outputable import Name import NameSet import RdrName...
da-x/ghc
compiler/hsSyn/PlaceHolder.hs
bsd-3-clause
3,349
0
9
705
463
269
194
56
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module : Numeric.Tools.Mesh -- Copyright : (c) 2011 Aleksey Khudyakov -- License : BSD3 -- -- Maintainer : Aleksey Khudyakov <alexey.skladnoy@gmail.com> -- Stability : experimental -- Portability : portable -- -- 1-dimensional meshes. Use...
KevinCotrone/numeric-tools
Numeric/Tools/Mesh.hs
bsd-3-clause
3,116
0
11
813
499
282
217
41
1
-- | -- Binary Communicator -- -- This module provides the datatype BinaryCom, which enables you -- to easily send and receive data to and from a binary source. -- The transmitted data can be an instance of the 'Binary' class, -- or you can provide your own Put and Get actions to serialize -- and parse the binary stre...
objectx/BinaryCommunicator
Data/BinaryCom.hs
bsd-3-clause
3,200
0
12
774
785
422
363
56
2