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
-- Copyright (c) 2010-2018 Brett Lajzer -- See LICENSE for license information. -- | = Introduction -- Dib is a light-weight, forward build system embedded in Haskell. -- Dib represents the build products as a chain of operations starting at the input. -- Reverse build systems such as Make and Jam instead attempt to f...
blajzer/dib
src/Dib.hs
mit
28,667
63
23
5,509
7,218
3,679
3,539
407
5
module BlocVoting where
XertroV/blocvoting
src/BlocVoting.hs
mit
24
0
2
3
4
3
1
1
0
module ASPico.Db.Pool where import ASPico.Prelude import Control.Monad.Logger (runStdoutLoggingT) import Data.Pool (createPool) import Data.Time.Clock (NominalDiffTime) import Database.Persist.Postgresql (openSimpleConn) import Database.Persist.Sql (ConnectionPool, SqlBackend, askLogFunc, close') import Databa...
arowM/ASPico
src/ASPico/Db/Pool.hs
mit
1,593
0
14
357
386
216
170
-1
-1
{-# htermination plusFM_C :: (b -> b -> b) -> FiniteMap (Ratio Int) b -> FiniteMap (Ratio Int) b -> FiniteMap (Ratio Int) b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_plusFM_C_7.hs
mit
145
0
3
27
5
3
2
1
0
module SqlTypes where import Data.Text import Database.SQLite.Simple import Database.SQLite.Simple.FromRow -- help from: https://hackage.haskell.org/package/sqlite-simple-0.4.9.0/docs/Database-SQLite-Simple.html {- fields: - tweet_id (id_str in json result) - user_name - screen_name - text -} data TweetFields =...
davidfontenot/haskell-hashtag-viewer
src/SqlTypes.hs
mit
596
0
9
81
111
63
48
9
0
{-# LANGUAGE FlexibleContexts #-} module Day06 where import Data.List.Split import Data.Array.IO import Control.Monad data TurnType = On | Off | Toggle deriving Show type Coords = (Int, Int) -- Part 1 turnp1 :: Coords -> TurnType -> IOArray (Int, Int) Int -> IO () turnp1 c On a = do r <- readArray a...
cirquit/Personal-Repository
Haskell/Playground/AdventOfCode/advent-coding/src/Day06.hs
mit
1,896
4
14
564
909
474
435
53
4
import Data.List import Data.List.Split import System.Environment data AminoAcid = A | C | D | E | F | G | H | I | K | L | M | N | P | Q | R | S | T | V | W | Y | Stop deriving (Read, Show, Eq) data RNABase = RNA_A | RNA_C | RNA_G | RNA_U deriving (Show) instance Read RNABase where read...
abingham/rosalind
haskell/translate_rna/TranslateRNA.hs
mit
3,422
3
12
728
1,565
901
664
96
1
module Main where import Data.Functor ((<$>)) import LogFind (getAllFilesUnder, matchesAll, matchesSome, multipleStringsToPredicate) import System.Directory (getCurrentDirectory) import System.Environment (getArgs) import ...
matthieubulte/logfind
src/Main.hs
mit
1,050
0
14
329
253
128
125
21
2
module World where type Position = (Double, Double) type Velocity = (Double, Double) type CircleData = (Position, Velocity, Double) type SegmentData = (Position, Position, Double) data Obstacle = Circle CircleData | Segment SegmentData data World = World { robotSpeed :: Double, robot :: Position, g...
AnthonyMl/fieldnavigation
src/world.hs
mit
383
0
9
90
108
70
38
11
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} module Main (main) where import Control.Concurrent.Async import Control.Concurrent.STM import Control.Monad #if !MIN_VERSION_base(4,13,0) import ...
stackbuilders/hapistrano
app/Main.hs
mit
8,080
26
20
2,571
1,784
906
878
172
8
{- (**) Rotate a list N places to the left. Hint: Use the predefined functions length and (++). Examples in Haskell: *Main> rotate ['a','b','c','d','e','f','g','h'] 3 "defghabc" *Main> rotate ['a','b','c','d','e','f','g','h'] (-2) "ghabcdef" -} -- import Data.List rotat...
gaoce/haskell_99
19.hs
mit
547
1
12
157
158
76
82
5
1
{-# LANGUAGE CPP #-} #include "compat.h" module Ohua.Monad ( OhuaM, runFromExpr, runFromBindings , MonadGenId(generateId, resetIdCounter) , MonadGenBnd(generateBinding, generateBindingWith) , HasEnvExpr(EnvExpr) , MonadReadEnvExpr(lookupEnvExpr), getEnvExpr , MonadRecordEnvExpr(addEnvExpressio...
ohua-dev/ohua-core
core/src/Ohua/Monad.hs
epl-1.0
1,764
0
9
290
428
258
170
-1
-1
-- Copyright (C) 2002-2003 David Roundy -- -- 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, or (at your option) -- any later version. -- -- This program is distributed ...
DavidAlphaFox/darcs
src/Darcs/UI/Commands/Init.hs
gpl-2.0
4,716
1
22
996
870
490
380
83
2
module Crepuscolo.Highlighter.Plain ( highlighter ) where import Crepuscolo.Highlight highlighter :: Highlighted -> Highlighted highlighter c@(Content _) = Highlight Region "plain" c highlighter h = h
meh/crepuscolo
src/Crepuscolo/Highlighter/Plain.hs
gpl-3.0
212
0
8
36
58
32
26
6
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Instances (Ratio01 (..), Positive (..), Sorted(..)) where import Test.QuickCheck (Arbitrary(..), Gen, genericShrink, suchThat, vectorOf) import Test.SmallC...
Bodigrim/exp-pairs
tests/Instances.hs
gpl-3.0
6,914
0
15
1,699
3,250
1,801
1,449
160
2
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the Lice...
karamellpelle/grid
source/Game/Grid/GridData/Fancy.hs
gpl-3.0
2,476
0
9
553
337
207
130
54
1
{-# OPTIONS -fno-warn-orphans #-} module Experiment.Battlefield.Instances.SDL where import Experiment.Battlefield.Types import Linear.Vector import Render.Backend.SDL import Render.Surface import Data.Map.Strict ((!)) import qualified Graphics.UI.SDL as SDL import qualified Graphics.UI.SDL.TTF as SDLTTF instance...
mstksg/netwire-experiments
src/Experiment/Battlefield/Instances/SDL.hs
gpl-3.0
1,159
0
12
340
342
185
157
28
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Create.hs
mpl-2.0
5,188
0
17
1,198
787
460
327
115
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/VPNGateways/TestIAMPermissions.hs
mpl-2.0
4,708
0
18
1,094
550
326
224
93
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-consumersurveys/gen/Network/Google/Resource/ConsumerSurveys/Surveys/Insert.hs
mpl-2.0
2,667
0
12
574
307
189
118
47
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Language.Types.Sum -- Copyright : (c) 2015-2016 Brenda...
brendanhay/gogol
gogol-language/gen/Network/Google/Language/Types/Sum.hs
mpl-2.0
45,063
0
11
13,067
6,891
3,733
3,158
890
0
module Main where import Test.HUnit import Test.Crypto.FrequencyAnalysis.English import Test.Util.ByteManipulation main :: IO Counts main = do _ <- runTestTT Test.Crypto.FrequencyAnalysis.English.tests runTestTT Test.Util.ByteManipulation.tests
stallmanifold/matasano-crypto-challenges
tests/HSpecTests.hs
apache-2.0
264
0
9
41
60
35
25
7
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Controller ( withFortuneSearch , withDevelApp ) where import FortuneSearch import Settings import Yesod.Helpers.Static import Data.ByteString (ByteString) ...
fffej/Keyword-Search
Controller.hs
bsd-2-clause
1,667
0
11
260
290
160
130
29
1
module Array (tests) where import System.Event.Array (Array) import qualified System.Event.Array as A import Test.Framework (testGroup) import qualified Test.Framework import Test.Framework.Providers.HUnit (hUnitTestToTests) import Test.HUnit (Test(..), (@=?)) tests :: Test.Framework.Test tests = testGroup "System....
tibbe/event
tests/Array.hs
bsd-2-clause
2,029
0
12
548
749
374
375
58
1
module Debug ( putInfo , putWarning , putError , putCritical , DebugLevel ) where import System.Exit data DebugLevel = Info | Warning | Error | Critical putDebug :: DebugLevel -> String -> IO () putDebug d s = case d of Info -> putStrLn s Warning ...
nbrk/ld
library/Debug.hs
bsd-2-clause
627
0
12
185
192
103
89
20
4
-- -- Copyright (c) 2013, Carl Joachim Svenn -- 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 notice...
karamellpelle/MEnv
source/Font/Buffer.hs
bsd-2-clause
9,711
0
15
3,503
2,783
1,333
1,450
204
2
{-# LANGUAGE RecordWildCards #-} module Haddock.Interface.Json ( jsonInstalledInterface , jsonInterfaceFile , renderJson ) where import GHC.Types.Fixity import GHC.Utils.Json import GHC.Unit.Module import GHC.Types.Name import GHC.Utils.Outputable import Control.Arrow import Data.Map (Map) import qualified ...
haskell/haddock
haddock-api/src/Haddock/Interface/Json.hs
bsd-2-clause
7,879
0
13
1,765
2,384
1,292
1,092
173
1
{-# LANGUAGE CPP #-} #if !(MIN_VERSION_base(4,8,0)) {-# LANGUAGE OverlappingInstances #-} #endif module Pkg.PParser where import Text.Trifecta hiding (span, charLiteral, natural, symbol, char, string, whiteSpace) import Idris.Core.TT import Idris.REPL import Idris.AbsSyntaxTree import Idris.ParseHelpers hiding (strin...
NightRa/Idris-dev
src/Pkg/PParser.hs
bsd-3-clause
3,366
0
22
1,070
1,191
596
595
89
2
{-# LANGUAGE OverloadedStrings #-} module Day7 where import qualified Data.Text as T import Data.Attoparsec.Text import Data.Bits import Control.Applicative import qualified Data.HashMap.Strict as H import Data.Function.Memoize (memoize) import Data.Either {- Day 7: ...
Rydgel/advent-of-code
src/Day7.hs
bsd-3-clause
2,688
0
13
749
860
448
412
71
7
{-# LANGUAGE FlexibleContexts #-} module Villefort.Weekly (weeklyStats) where import Control.Monad.Reader import Villefort.Definitions --import Villefort.Time (getDatesOfPrevWeek,getDatesOfThisWeek) import Villefort.Util import Villefort.Database import Data.Time import Data.Time.Calendar.WeekDate import Data.Time.Ca...
Chrisr850/Villefort
src/Villefort/Weekly.hs
bsd-3-clause
4,994
0
15
1,193
1,917
1,011
906
104
2
{-# language ViewPatterns#-} {-# language DeriveFunctor#-} {-# language NoMonomorphismRestriction #-} {-| Module : HDynTs.Lib.Tree Description : Additional functionality for Data.Tree Copyright : (c) Paolo Veronelli, 2016 License : BSD Maintainer : paolo.veronelli@gmail.com Stability : experimental -} m...
paolino/HDynTs
src/HDynTs/Lib/Tree.hs
bsd-3-clause
3,839
0
12
841
1,095
571
524
67
3
module Application.Types where -- | The environment accessible from our application data Env = Env { envPrefix :: String , envHostname :: String } deriving (Show, Eq)
athanclark/deconfigured
src/Application/Types.hs
bsd-3-clause
176
0
8
36
39
24
15
5
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-| This module exports 'Pipe's for converting between streams of 'ByteString's and streams of 'Text's. -} module Control.Pipe.Text.Encoding ( -- * Encoding and decoding encode , decode -- * 'TextEncoding' -- ** Re-exported ...
duairc/pipes
src/Control/Pipe/Text/Encoding.hs
bsd-3-clause
8,255
0
24
2,725
2,361
1,207
1,154
160
13
import Control.Monad ( unless ) import System.IO ( hPutStrLn, stderr ) import System.Posix.Unistd ( sleep ) import Sound.OpenAL main :: IO () main = do maybeDevice <- openDevice (Just "'( ( devices '( native null ) ) )") case maybeDevice of Nothing -> hPutStrLn stderr "openDevice failed" Just device ...
FranklinChen/hugs98-plus-Sep2006
packages/OpenAL/examples/test/TestDevice.hs
bsd-3-clause
448
0
13
122
129
63
66
14
2
-- © 2001 Peter Thiemann module Submit where import WASH.Utility.Auxiliary import Data.Char import System.Directory import WASH.CGI.Fields import Data.List hiding (head) import Data.Maybe import Control.Monad import System.Random import Prelude hiding (head) import WASH.HTML.HTMLMonad import WASH.CGI.CGI import WASH.C...
nh2/WashNGo
Examples/old/Submit.hs
bsd-3-clause
7,003
72
28
1,613
2,251
1,097
1,154
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE...
snapframework/snap-core
src/Snap/Internal/Core.hs
bsd-3-clause
69,773
37
19
14,486
8,634
5,126
3,508
595
11
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Main where import Test.Framework import Test.Framework.Providers.Feat import Test.Feat import Data.Typeable import Data.Monoid import Control.Applicative import Test.Framework.Options data Expr = Add Expr Expr | I Int deriving(Show, Read,...
jfischoff/test-framework-testing-feat
tests/Main.hs
bsd-3-clause
819
0
14
155
215
119
96
21
1
{-# LANGUAGE BangPatterns #-} module Database.Cassandra.CQL.Protocol.Types where import Data.ByteString (ByteString) import Data.Int (Int8, Int32) import Data.Text (Text) import Data.UUID (UUID) import Network.Socket (SockAddr) -- Even though there is only a single supported version at this time, -- since the protoco...
romanb/cassandra-cql-protocol
src/Database/Cassandra/CQL/Protocol/Types.hs
bsd-3-clause
9,783
0
11
2,642
1,026
618
408
266
0
{-# LANGUAGE OverloadedStrings #-} import Prelude hiding (head) import Data.String import Data.List hiding (map, head) import qualified Data.Text as T import Web.Spock.Safe hiding (head, body) import Web.Spock.Digestive import qualified Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes hiding (form, label) i...
ecks/webui
app/Main.hs
bsd-3-clause
2,803
4
22
744
752
389
363
56
2
{-# LANGUAGE FlexibleContexts #-} module Main (main) where import Data.Set (Set) import qualified Data.Set as Set import Data.MultiSet (MultiSet) import qualified Data.MultiSet as MSet import NPNTool.CTL import NPNTool.Bisimilarity import NPNTool.Liveness import NPNTool.AlphaTrail import NPNTool.PetriNet import NPNToo...
co-dan/NPNTool
startup/Main.hs
bsd-3-clause
1,598
0
27
383
601
312
289
48
2
-------------------------------------------------------------------------------- -- | module which defines all the constant data of the application {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module IMonad ( Bot (..) , Net , io ,...
Sahil-yerawar/IRChbot
src/IMonad.hs
bsd-3-clause
1,041
0
8
183
163
102
61
31
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Parser import Rule import Protolude hiding (for, from) import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy as BL import qualified Data.Char ...
erebe/hmailfilter
app/Classifier.hs
bsd-3-clause
4,284
0
16
1,243
1,147
622
525
85
3
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module PeerTrader.Prosper.Account where import Control.Conc...
WraithM/peertrader-backend
src/PeerTrader/Prosper/Account.hs
bsd-3-clause
2,695
0
12
780
466
248
218
55
2
-- TODO MUCH Faster rendering. -- TODO GHCJS? -- TODO Record more data. -- TODO Lists instead of structs/bools? -- This: [Calories, Teeth, OneMeal] -- Instad of: emptyMeal {calories=True, teeth=True, oneMeal=True} -- Yeah! Then just score with (length . nub). {-# LANGUAGE DeriveFunctor #-} {-# LANGUA...
bsummer4/chart
src/AugustData.hs
bsd-3-clause
10,606
0
12
5,069
2,727
1,660
1,067
232
1
module Main(main) where import System.IO.Temp (withSystemTempDirectory) import Database.BlobStorage import Test.HUnit import Test.Framework import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy.Char8 as L import Control.Monad (when) import System.Exit (exitFailure) -- | Run an action in a fr...
aslatter/blobstore
test/Main.hs
bsd-3-clause
1,259
0
12
245
305
162
143
32
1
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP, DeriveDataTypeable #-} module TcEvidence ( -- HsWrapper HsWrapper(..), (<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams, mkWpLams, mkWpLet, mkWpCastN, mkWpCastR, mkWpFun, mkWpFuns, idHsWrapper, isIdHsWrapper, pprHsWrapper, -- Evidence bindi...
GaloisInc/halvm-ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
31,343
0
15
7,886
4,763
2,580
2,183
355
10
{-# LANGUAGE OverloadedStrings #-} module Abstract.Utilities.Redis.Helpers ( ConnectionWrapper(..), open, close, get, set, setnx, llen, del, incr, decr, incrBy, decrBy, getInt, reset, gentleReset, enqueue, enqueueBatch, dequeue, dequeueBatch, blDequeue, push, pushBatch, pop, popBatch, blPop ) w...
adarqui/Abstract-Impl-Redis
src/Abstract/Utilities/Redis/Helpers.hs
bsd-3-clause
6,118
0
19
1,378
3,111
1,525
1,586
189
3
module Data.SouSiT.STM ( -- * Sinks stmSink, stmSink', tchanSink, -- * Sources stmSource, stmSource', tchanSource ) where import Data.SouSiT.Source import Data.SouSiT.Sink import Control.Monad import Control.Concurrent.STM import Control.Monad.IO.Class -- | A sink that executes (atomi...
msiegenthaler/SouSiT
Data/SouSiT/STM.hs
bsd-3-clause
1,634
0
11
340
385
202
183
24
1
-- -- -- ----------------- -- Exercise 6.60. ----------------- -- -- -- module E'6'60 where import E'6'55 ( Player ) import E'6'59 ( Hand ) data HandsType = Hands Player Hand -- Lead. Player Hand Player Hand Player Hand ...
pascal-knodel/haskell-craft
_/links/E'6'60.hs
mit
450
0
6
193
80
52
28
9
0
{- Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu> 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 later version. This program is ...
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/XML.hs
gpl-2.0
3,363
0
15
895
542
288
254
44
5
{-# LANGUAGE CPP #-} module Import ( module Import ) where import Prelude as Import hiding (head, init, last, readFile, tail, writeFile) import Yesod as Import hiding (Route (..)) #if !MIN_VERSION_base(4,8,0) impo...
kmels/hledger
hledger-web/Import.hs
gpl-3.0
1,103
0
6
492
142
105
37
17
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-kms/gen/Network/AWS/KMS/GetKeyPolicy.hs
mpl-2.0
4,662
0
13
1,075
666
397
269
88
1
{-#LANGUAGE OverloadedStrings#-} {-| Module : ETA.Utils.JAR Description : Small utility functions for creating Jars from class files. Copyright : (c) Christopher Wells 2016 (c) Rahul Muttineni 2016-2017 License : MIT This module provides utility functions for creating Jar archives from JVM cla...
pparkkin/eta
compiler/ETA/Utils/JAR.hs
bsd-3-clause
10,321
0
22
2,156
1,549
873
676
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module Database.DSH.VSL.Opt.Rewrite.Common where import qualified Data.IntMap as M import Control.Monad import Database.Algebra.Dag.Common import Database.DSH.Common.QueryPlan impor...
ulricha/dsh
src/Database/DSH/VSL/Opt/Rewrite/Common.hs
bsd-3-clause
2,654
0
12
694
806
426
380
56
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Geometry_msgs.Twist where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosB...
acowley/roshask
msgs/Geometry_msgs/Ros/Geometry_msgs/Twist.hs
bsd-3-clause
1,436
1
11
246
420
242
178
36
0
module IOExts {-# DEPRECATED "This library will go away soon; see Data.Array.IO, Data.IORef, and System.IO" #-} ( module System.IO.Unsafe, IOArray, newIOArray, boundsIOArray, readIOArray, writeIOArray, freezeIOArray, thawIOArray, unsafeFreezeIOArray, unsafeThawIOArray, module Dat...
FranklinChen/hugs98-plus-Sep2006
fptools/hslibs/lang/IOExts.hs
bsd-3-clause
6,030
71
20
1,372
1,458
787
671
-1
-1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/Temp.hs" #-} {-# LINE 1 "System/Posix/Temp.hsc" #-} {-# LANGUAGE CApiFFI #-} {-# LINE 2 "System/Posix/Temp.hsc" #-} {-# LINE 3 "System/Posix/Temp.hsc" #-} {-# LANGUAGE Safe #-} {-# LINE 7 "System/Posix/Temp.hsc" #-} ---------------...
phischu/fragnix
tests/packages/scotty/System.Posix.Temp.hs
bsd-3-clause
4,094
0
14
729
509
283
226
41
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeAutoScalingNotificationTypes.hs
mpl-2.0
4,420
0
10
695
407
251
156
53
1
module HsChaseImports where ------------------------------------------------------------------------------- -- This module implements import chasing for Haskell. ------------------------------------------------------------------------------- import HsIOWrap(parseWrap') import StrategyLib import HsModuleColl...
forste/haReFork
StrategyLib-4.0-beta/examples/haskell/HsChaseImports.hs
bsd-3-clause
4,550
74
15
1,151
1,403
736
667
99
3
<?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="ru-RU"> <title>Баг-трекер</title> <maps> <homeID>top</homeID> <mapref location="map.jhm...
thc202/zap-extensions
addOns/bugtracker/src/main/javahelp/org/zaproxy/zap/extension/bugtracker/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
996
82
53
155
463
240
223
-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="sl-SI"> <title>Authentication Statistics | ZAP Extension</title> <maps> <homeID>top</homeID>...
thc202/zap-extensions
addOns/authstats/src/main/javahelp/org/zaproxy/zap/extension/authstats/resources/help_sl_SI/helpset_sl_SI.hs
apache-2.0
986
83
52
159
396
209
187
-1
-1
module TiSCC where --import TiClasses import MUtils import NewSCC --import Grapheq import Data.Maybe(fromJust,mapMaybe) import TiDefinedNames(definedNamesSplit) import TiFreeNames default(Int) sccD' names ds = map (map (def.fst)) (scc graph) where --scc = scceq (==) def n = fromJust (lookup n ndefs) gra...
kmate/HaRe
old/tools/base/TI/TiSCC.hs
bsd-3-clause
745
1
12
158
325
180
145
21
4
import System.Posix main = do getAllGroupEntries >>= print . (>0) . length getAllGroupEntries >>= print . (>0) . length
rimmington/unix
tests/T3816.hs
bsd-3-clause
124
0
9
23
49
26
23
4
1
module Haskell.Warnings where spam eggs = map lines eggs main :: IO () main = (putStrLn "hello world")
jglievano/emma
vendor/flycheck/test/resources/language/haskell/Warnings.hs
mit
105
0
6
20
40
21
19
4
1
module Main ( main ) where import Hpcb import Data.Monoid outline :: Circuit outline = rectangle w h # translate (V2 (w/2-2.54) (h/2-2.54*1.5)) # layer EdgeCuts where (w, h) = (4*2.54, 3.5*2.54) ledBoard :: Circuit ledBoard = ( pinHeaderFromNets "JP1" ["VCC", "GND"] <> led_805 "D1" "RED" # rotate 180 #...
iemxblog/hpcb
examples/led.hs
mit
601
0
18
129
306
157
149
21
1
module Main where import LinAlg import Data.Array.Accelerate.Interpreter main = print $ run $ testMult testCols testRows
vladfi1/hs-perf
TestInterpreter.hs
mit
123
0
6
18
32
19
13
4
1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.TypeChecker.Kinds -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- This modu...
michaelficarra/purescript
src/Language/PureScript/TypeChecker/Kinds.hs
mit
9,392
0
23
2,081
3,187
1,602
1,585
201
12
import System.Environment (getArgs) import Data.List splitLines :: String -> [String] splitLines [] = [] splitLines xs = let (pre,suf) = break isReturn xs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest _ -> [] isReturn c = c =...
zhangjiji/real-world-haskell
fixLines.hs
mit
794
5
11
199
279
137
142
24
4
{-# LANGUAGE ViewPatterns #-} module Unison.Util.Find ( fuzzyFinder, simpleFuzzyFinder, simpleFuzzyScore, fuzzyFindInBranch, fuzzyFindMatchArray, prefixFindInBranch ) where import Unison.Prelude import qualified Data.Char as Char import qualified Data.List as List import qualified Data....
unisonweb/platform
parser-typechecker/src/Unison/Util/Find.hs
mit
7,562
0
23
1,978
2,190
1,165
1,025
-1
-1
module Test.RBM(perf ,test ) where --local import qualified Data.RBM as R import qualified Data.DNN.Trainer as T import qualified Data.Matrix as M import Data.Matrix((-^), Matrix(..), U, B, I) --utils import qua...
aeyakovenko/rbm
Test/RBM.hs
mit
6,532
0
17
1,934
2,852
1,459
1,393
155
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} module Services.TokenService where import Control.Monad.IO.Class (liftIO) import Web.JWT import Data.Text import qualified Data.Text.Lazy as TL import Data.Time.Calendar (fromGregorian) im...
bocuma/users-service
src/Services/TokenService.hs
mit
1,790
0
13
526
502
266
236
42
2
{- arch-tag: Gopher support Copyright (C) 2004 John Goerzen <jgoerzen@complete.org> 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 later vers...
haskellbr/missingh
missingh-all/pending/Gopher.hs
mit
3,333
0
13
1,071
313
179
134
29
0
module Database.PostgreSQL.Protocol.Codecs.Encoders ( bool , bytea , char , date , float4 , float8 , int2 , int4 , int8 , interval , bsJsonText , bsJsonBytes , numeric , bsText , time , timetz , timestamp , timestamptz , uuid ) where impo...
postgres-haskell/postgres-wire
src/Database/PostgreSQL/Protocol/Codecs/Encoders.hs
mit
2,996
0
12
650
757
427
330
99
1
{-# language DeriveGeneric, DeriveFunctor, DefaultSignatures, GeneralizedNewtypeDeriving, OverloadedStrings, RankNTypes, ScopedTypeVariables, UndecidableInstances #-} module Centrinel.Report ( -- * Output methods OutputMethod(..), OutputFormat(..), OutputDestination(..) , defaultOutputMethod -- * ...
lambdageek/use-c
src/Centrinel/Report.hs
mit
5,965
0
18
1,141
1,482
779
703
-1
-1
-- Implement recursive map while using map function -- Signature should be mapWhile :: (a->Bool)->(a->a)->[a]->[a] -- It should return a list until where condition is satisfied mapWhile :: (a->Bool)->(a->a)->[a]->[a] mapWhile _ _ []=[] mapWhile p q (x:xs) | p x == True = q x:mapWhile p q xs | otherwise =[] ...
manuchandel/Academics
Principles-Of-Programming-Languages/recursiveMapWhile.hs
mit
389
1
9
72
163
86
77
6
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module Scrabble.BoardTests (tests) where import Scrabble import Test.Framework.Providers.HUnit import Test.Framework.TH import Test.HUnit -- Board Unit Tests case_lower_vertical = snd (placeVert "zoologic") @?= [40] case_upper_vertical = snd (pla...
joshcough/Scrabble
test/Scrabble/BoardTests.hs
mit
1,054
0
8
159
243
139
104
18
1
{-# LANGUAGE OverloadedStrings #-} module DeckAroundCoreJson where import Control.Applicative ((<$>),(<*>)) import Data.Aeson (ToJSON(toJSON),FromJSON(parseJSON),object,Value(Object,String),(.=),(.:)) import Data.Aeson.Types (Pair,Parser) import qualified Data.Text as T import DeckAroundCore voterKey = "voter" vote...
cromo/deck-around-hs
DeckAroundCoreJson.hs
mit
3,602
0
16
1,017
1,148
597
551
96
1
{-# LANGUAGE TypeFamilies, RankNTypes, GADTs #-} module Poets where -- Generic type families for properties and states of vertices, edges, etc. -- TODO: Maybe change to data families? -- TODO: Rename Properties to Label? type family Properties a type family State a -- All data types are parameterised by a: the appli...
snowleopard/poets-types
src/Poets-type-families.hs
mit
5,127
0
13
2,052
1,190
646
544
-1
-1
-------------------- -- XMonad configurations -------------------- -------------------- Imports -- Base import XMonad import System.IO import System.Exit import qualified XMonad.StackSet as W -- Data import Data.Monoid import qualified Data.Map as M -- Hooks import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen) imp...
phdenzel/dotfiles
.config/xmonad/xmonad.hs
mit
18,660
3
15
5,048
4,115
2,364
1,751
374
6
module Day10 (day10, day10', run, lookAndSay) where import Data.List (group) lookAndSay :: String -> String lookAndSay = concatMap processGroup . group processGroup :: String -> String processGroup [] = [] processGroup (x:xs) = show (1 + length xs) ++ [x] day10 :: String -> Int day10 = length . (!! 40) . iterat...
brianshourd/adventOfCode2015
src/Day10.hs
mit
583
0
10
130
234
123
111
17
1
{-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine main = defaultMain (circle 1)
tippenein/graphskell
diagrammer.hs
gpl-2.0
135
0
7
15
28
16
12
4
1
module LexML.Linker.URLTransform ( rewriteAnchors ) where import Data.Maybe import Network.URI import Text.HTML.TagSoup import Data.List import qualified Data.Map as M import qualified Data.Set as S import Data.Char refAttrs = M.map S.fromList $ M.fromList $ [ ("a",["href"]), ("img", ["src"]), ("script",["...
lexml/lexml-linker
src/main/haskell/LexML/Linker/URLTransform.hs
gpl-2.0
1,008
0
14
227
359
196
163
28
3
{-# LANGUAGE DeriveDataTypeable #-} module Resolution.Execute where import Resolution.Data import Resolution.Action import Autolib.Reporter import Autolib.ToDoc import Autolib.Set import Autolib.Size import Data.Typeable data State = State [ Clause ] deriving Typeable instance Size State where size ( State cs...
Erdwolf/autotool-bonn
src/Resolution/Execute.hs
gpl-2.0
1,743
1
16
492
710
335
375
46
2
module Hilbert.Env ( Env -- abstract , empty, contents, make , look , extend , mkfm ) where import Autolib.ToDoc hiding ( empty ) import Autolib.Reader import Autolib.FiniteMap import Autolib.Reporter import Autolib.TES.Identifier import Autolib.TES import Autolib.Size data Env a = Env { contents :: [ ( Ide...
marcellussiegburg/autotool
collection/src/Hilbert/Env.hs
gpl-2.0
1,682
24
14
456
573
312
261
52
2
pattern $ \db -> let us = query everything db g a b = Unit.sourceFile a == Unit.sourceFile b us' = map (head.tail) $ groupBy g us in ptrace (pseq (map pevent us') 1)
kaoskorobase/mescaline
tests/patterns/sequence_beginnings.hs
gpl-3.0
190
2
13
58
93
44
49
-1
-1
module Folsolver.Normalform ( abFormula, ABFormula(..) , isAlpha, isBeta, isLiteral, isAlphaFormula -- , mkNeg, negQ, negNormal, negNormalNeg , isSimple, isQuant, reduction , RedFormula(..) , unifyFormula, unifyTerm, unifyEquals, variableRename , removeVarOccurance ) where import Folsolver.Normalform.ABForm...
traeger/fol-solver
Folsolver/Normalform.hs
gpl-3.0
398
0
5
49
92
62
30
11
0
----------------------------------------------------------------------------- -- | -- Module : Utility -- Copyright : (c) Gushcha Anton 2013-2014 -- License : GNU GPLv3 (see the file LICENSE) -- -- Maintainer : ncrashed@gmail.com -- Stability : experimental -- Portability : portable -- -- Often use...
NCrashed/PowerCom
src/powercom/Utility.hs
gpl-3.0
1,484
0
12
267
252
141
111
22
2
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} {-| Description: Respond to various requests involving database course information. This module contains the functions that perform different database queries and serve the information back to the client. -} module Database.CourseQueries (retrieveCourse, ...
arkon/courseography
hs/Database/CourseQueries.hs
gpl-3.0
7,791
1
19
1,855
1,854
931
923
135
2
module System.DevUtils.Base.Url.Connection ( Connection(..), ConnectionType(..), defaultConnection ) where import Data.Word data ConnectionType = TCP | UDP | INET | UNIX | UNKNOWN deriving (Show, Read) data Connection = Connection { _dest :: String, _port :: Word16, _type :: ConnectionType } deriving (Show, Re...
adarqui/DevUtils-Base
src/System/DevUtils/Base/Url/Connection.hs
gpl-3.0
440
0
8
70
131
83
48
13
1
{- A more semantic approach to FB. Uses monadic expressions (still `do` notation but whatever) inside a `case/of` block doing pattern matching on a tuple. -} main :: IO () main = do putStrLn "Enter a number: " x <- readLn putStrLn "" fizzbuzz x fizzbuzz :: Int -> IO () fizzbuzz x = case (mod x 3, mod x ...
verandaguy/fizzbuzz
haskell/semantic.hs
gpl-3.0
638
6
13
209
245
120
125
21
5
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE QuasiQuotes #-} module Nirum.Targets.Python.Deserializers ( compileDeserializer ) where import Text.Blaze (Markup) import Text.Heterocephalus (compileText) import Text.InterpolatedString.Perl6 (qq) import Nirum.Constructs.Identifier import Nirum.Constructs.ModuleP...
spoqa/nirum
src/Nirum/Targets/Python/Deserializers.hs
gpl-3.0
23,544
0
17
6,209
2,349
1,210
1,139
205
15
module Torrent.Event where import HTorrentPrelude import Peer.State data TorrentEvent = PieceCompleted Int | PeerConnected ByteString PeerState
ian-mi/hTorrent
Torrent/Event.hs
gpl-3.0
154
0
6
26
30
18
12
6
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/PlayLists/Delete.hs
mpl-2.0
5,596
0
18
1,298
806
471
335
115
1
module TimedYesodTest (module Yesod.Test ,yit ) where import Prelude import Yesod.Test hiding (yit) import qualified Yesod.Test as Y import Control.Monad.IO.Class (liftIO, MonadIO) import Data.Time import Text.Printf -- | Prepend timing information to Yesod.Test's 'yit' yit :: String -> YesodExample sit...
akegalj/snowdrift
tests/TimedYesodTest.hs
agpl-3.0
811
0
11
177
272
140
132
23
1
module Main where import Data.Tree.Diff import System.Directory import System.FilePath import System.IO.Error import System.Environment import Data.List import Data.Tree import Data.Function import Data.Maybe import Control.Applicative import Control.Monad mkDirectoryTree :: FilePath -> IO (Tree FilePath) mkDirector...
JanBessai/dirdiff
src/dirdiff.hs
lgpl-3.0
1,429
0
13
268
499
252
247
38
3
module ForExample where data Example = MakeExample deriving Show data AnotherExample = MakeExample2 Int deriving Show -- :t MakeExample = Example -- :t Example = Data constructor not in scope: Example -- :info MakeExample = :data Example = MakeExample -- Defined at ForExample.hs:3:16 -- :info Example = data Exam...
thewoolleyman/haskellbook
11/07/eric/ForExample.hs
unlicense
585
0
6
112
33
23
10
3
0
module Polynomial.A300670 (a300670, a300670_list) where import Helpers.Polynomial (polynomialAvoidingSequence) import Data.List (genericTake) import Helpers.Table (tableByAntidiagonals) import Helpers.Subsets (combinations) a300670 :: Int -> Integer a300670 n = a300670_list !! (n - 1) a300670_list :: [Integer] a30067...
peterokagey/haskellOEIS
src/Polynomial/A300670.hs
apache-2.0
1,272
0
8
215
221
132
89
15
1
{- Copyright 2015 Tristan Aubrey-Jones 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, sof...
flocc-net/flocc
v0.1/Compiler/Tests/TriEnum/Templates.hs
apache-2.0
80,656
1
29
19,162
21,275
10,711
10,564
1,029
3
{- Copyright 2015 Tristan Aubrey-Jones 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, sof...
flocc-net/flocc
v0.1/Compiler/Front/Common.hs
apache-2.0
17,993
0
17
3,695
5,934
3,150
2,784
-1
-1
{-# LANGUAGE TemplateHaskell #-} import HFlags import TupMain main = do $initHFlags "foobar" print $ get (1,2)
nilcons/hflags
examples/package/test/main.hs
apache-2.0
117
0
9
23
36
18
18
6
1