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 FlexibleInstances, MultiParamTypeClasses, PatternGuards, TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Tabbed -- Copyright : (c) 2007 David Roundy, Andrea Rossato -- License : BSD-style (see xmonad/LICENS...
yzhou61/xmonad-contrib
XMonad/Layout/Tabbed.hs
bsd-3-clause
9,976
0
17
2,497
2,288
1,236
1,052
129
1
import Options.Applicative import Data.Monoid ((<>)) import Data.Bifunctor (bimap) import Control.Monad (join, unless) import Data.Time.Clock (NominalDiffTime) import Text.Read (readEither) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.ByteString.Char8 as S8...
rvl/hsoz
example/Iron.hs
bsd-3-clause
5,088
0
23
1,591
1,615
804
811
112
2
module Text.Indent ( module Text.Indent.Class , module Text.Indent.Type.CodeGen ) where import Text.Indent.Class import Text.Indent.Type.CodeGen
thomaseding/tabs
src/Text/Indent.hs
bsd-3-clause
163
0
5
32
36
25
11
5
0
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an -- orphan module TcEnv( TyThing(..), TcTyThing(..), TcId, -- Instance environment, and InstInfo type ...
vikraman/ghc
compiler/typecheck/TcEnv.hs
bsd-3-clause
40,346
322
21
11,601
6,393
3,533
2,860
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wwarn #-} import qualified Anemone.Foreign.FFI as FoFFI import qualified Anemone.Foreign.Hash as FoHash import qualified Anemone.Foreign.Time as FoTime import qualif...
ambiata/anemone
bench/bench.hs
bsd-3-clause
5,528
0
18
1,299
1,363
734
629
134
2
{-# LANGUAGE CPP #-} module System.UnivOpWrap.Logic.HeuristikA ( matchStringM, matchStringMs ) where import System.HsTColors import System.UnivOpWrap.Common matchCharM :: Char -> MData -> MData matchCharM _ m@(Non _) = m matchCharM c m@M{pr' = (hi,rs)} | null rs = Non m ...
maximilianhuber/univOpWrap
src/System/UnivOpWrap/Logic/HeuristikA.hs
bsd-3-clause
769
0
12
274
268
142
126
17
1
module D where foo = "bar"
caasi/trans
sample/D.hs
bsd-3-clause
28
0
4
7
9
6
3
2
1
{-# LANGUAGE DataKinds #-} -- | Finding files. module Path.Find (findFileUp ,findDirUp ,findFiles ,findInParents) where import Control.DeepSeq (force) import Control.Monad import Control.Monad.IO.Unlift import System.IO.Error (isPermissionError) import Data.List import Path import Path.IO hiding (findFiles...
martin-kolinek/stack
src/Path/Find.hs
bsd-3-clause
3,885
0
15
1,252
950
488
462
70
3
module Lib where import Control.Monad (join) import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes -- 18.2 Sorry - Monad is not a burrito -- The answer is the exercise bind :: Monad m => (a -> m b) -> m a -> m b bind f v = join $ fmap f v -- 18.4 Examples of Monad use -- Short Exe...
backofhan/HaskellExercises
CH18/src/Lib.hs
bsd-3-clause
4,026
0
10
1,026
1,852
946
906
112
1
{-# LANGUAGE MonadComprehensions #-} safeDiv :: Integer -> Integer -> Maybe Integer _ `safeDiv` 0 = Nothing x `safeDiv` y = Just $ x `div` y calc :: Integer -> Integer -> Integer -> Maybe Integer calc a b c = [ y | x <- a `safeDiv` b, y <- x `safeDiv` c ] newtype State a = State { runState :: Integer -> (a, Integer)...
YoshikuniJujo/funpaala
samples/35_monad_class/monadComprehensions.hs
bsd-3-clause
936
0
11
233
491
266
225
25
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE F...
albertov/hs-mapnik
swagger/src/Mapnik/Swagger.hs
bsd-3-clause
4,425
0
22
608
937
493
444
-1
-1
{-# LANGUAGE RecordWildCards #-} module Debug.SourceViewTypes where import Internal.CFA import Solver.Store import Debug.DbgTypes -- Magic block stack frame data MBFrame = MBFrame { mbfEpoch :: Int, mbfLoc :: Loc } deriving (Eq) instance Show MBFrame where show MBFrame{..} = "Loc: " ++ show mbfLoc ++ ...
termite2/debug
Debug/SourceViewTypes.hs
bsd-3-clause
650
0
10
134
181
98
83
19
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-} module MonadGame where import Control.Monad.Fix (MonadFix) import Control.Monad.IO.Class (MonadIO) import Reflex class (MonadIO m, PerformEvent t m, TriggerEvent t m, MonadIO (Performable m), PostBuild t m, MonadHold t m, MonadFix m, MonadAdj...
Emmatipate/ava
src/MonadGame.hs
bsd-3-clause
808
2
15
205
218
118
100
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} module Physics.Falling3d.Shape3d ( DynamicShape3d(..) , StaticShape3d(..) , TransformedDynamicShape3d(..) , TransformedStaticShape3d(..) ) where import Data.Vect.Double.Base import Physics.Falling.Shape.VolumetricShape import Physics.Fallin...
sebcrozet/falling3d
Physics/Falling3d/Shape3d.hs
bsd-3-clause
4,400
0
11
1,321
792
427
365
58
0
module AERN2.PPoly.Maximum where import MixedTypesNumPrelude hiding (maximum, minimum) import qualified Prelude import AERN2.MP.Ball import AERN2.MP.Dyadic import AERN2.Poly.Power.RootsInt import Data.Maybe import Data.Ratio import Data.Map (Map) import qualified Data.Map as Map import AERN2.Poly.Power.Type {-import A...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/PPoly/Maximum.hs
bsd-3-clause
21,478
5
29
6,378
6,354
3,302
3,052
373
25
{-# LANGUAGE OverloadedStrings #-} module Test.Count (spec) where import Test.Common import Test.Import spec :: Spec spec = describe "Count" $ it "returns count of a query" $ withTestEnv $ do _ <- insertData let query = MatchAllQuery Nothing count = CountQuery query c <- countByInde...
bitemyapp/bloodhound
tests/Test/Count.hs
bsd-3-clause
390
0
11
98
115
59
56
13
1
module QueueUsingTwoStacks ( queueUsingTwoStacks, Stack, empty, isEmpty, push, top, pop ) where empty :: Stack a isEmpty :: Stack a -> Bool push :: a -> Stack a -> Stack a top :: Stack a -> a pop :: Stack a -> (a,Stack a) newtype Stack a = StackImpl [a] -- opaque! empty = StackImpl [] isEmpty (StackImpl s...
zuoqin/hackerrank
src/QueueUsingTwoStacks.hs
bsd-3-clause
2,482
0
14
571
1,124
588
536
59
3
import Data.Functor import Control.Monad main :: IO () main = do [x, y] <- replicateM 2 $ read <$> getLine print $ x - y
ksoda/atCoder
a/1.hs
bsd-3-clause
127
0
10
31
61
31
30
6
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} module Web.Server where import Control.Applicative ((<$>)) import Control.Monad.IO.Class (liftIO) import Data.Aeson (FromJS...
ericTsiliacos/stethoscope
src/Web/Server.hs
bsd-3-clause
2,800
0
20
901
721
370
351
65
2
{-# LANGUAGE OverloadedStrings #-} -- Test cases for Foundation.hs import Database.Redis (connect, defaultConnectInfo) import Test.Hspec (hspec) import Yesod.Test import Foundation import Settings main :: IO () main = do s <- staticSite c <- connect defaultConnectInfo hspec $ yesodSpec (Ted s c) homeSpecs ...
rnons/ted2srt
backend/tests/ted2srt.hs
bsd-3-clause
1,173
0
14
382
268
126
142
32
1
{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies #-} module Settings.StaticFiles where import Yesod.Static (staticFiles, StaticRoute (StaticRoute)) $(staticFiles "static")
pankajmore/Imghost
Settings/StaticFiles.hs
bsd-3-clause
185
0
7
18
34
20
14
4
0
module Parser ( -- * Main interface parseModel -- * Specific parsers , Parser , model , process , server , expr , predicate , typ , whiteSpace -- * Reexports for convenience , Text.Parsec.parse ) where import Control.Monad import Text.Parsec import qualified Text.Parsec.Language as L impo...
zyla/rybu
src/Parser.hs
bsd-3-clause
5,380
0
20
1,300
1,829
935
894
-1
-1
module Air.SimpleMath where import Prelude ((+)) import Air.Env hiding ((+)) import qualified Data.Array as A import qualified Data.List as L import Control.Arrow ((&&&)) import Data.Char (digitToInt) powerslice :: [a] -> [[a]] powerslice xs = [ xs.slice j (j+i) | i <- l.downto 1, j <- [0..l <-> i] ] where l...
nfjinjing/air
src/Air/SimpleMath.hs
bsd-3-clause
536
0
9
112
282
161
121
16
1
-- $Id$ module Expression.Tokens where import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Language import qualified Text.ParserCombinators.Parsec.Token as P me = P.makeTokenParser meDef lexeme = P.lexeme me parens = P.parens me braces = P.braces me ...
Erdwolf/autotool-bonn
src/Expression/Tokens.hs
gpl-2.0
1,096
0
8
387
262
141
121
28
1
module Analysis.CriticalSequenceSpec (spec) where import Data.Matrix hiding ((<|>)) import Test.Hspec import Abstract.Category import Abstract.Rewriting.DPO import Analysis.CriticalSequence import Category.TypedGraphRule () import qualified X...
rodrigo-machado/verigraph
tests/Analysis/CriticalSequenceSpec.hs
gpl-3.0
5,349
0
15
2,182
954
472
482
153
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-redshift/gen/Network/AWS/Redshift/RotateEncryptionKey.hs
mpl-2.0
4,299
0
13
851
552
334
218
71
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="ru-RU"> <title>Server-Sent Events Add-on</title> <maps> <homeID>sse.introduction</homeID> ...
secdec/zap-extensions
addOns/sse/src/main/javahelp/org/zaproxy/zap/extension/sse/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
994
77
68
157
439
221
218
-1
-1
module Graphics.ImageMagick.MagickWand.PixelPacket ( getPixelRed , setPixelRed , getPixelBlue , setPixelBlue , getPixelGreen , setPixelGreen , getPixelIndex , setPixelIndex ) where import Control.Monad.IO.Class import Foreign import qualified Graphics.ImageMagick.MagickWand.FFI.Ty...
flowbox-public/imagemagick
Graphics/ImageMagick/MagickWand/PixelPacket.hs
apache-2.0
1,714
0
11
278
474
256
218
35
1
{-# LANGUAGE TypeSynonymInstances, GeneralizedNewtypeDeriving #-} module DPH.Testsuite.Utils ( Proxy(..), asProxyTypeOf, limitRange, update, nest ) where import Test.QuickCheck import Text.Show.Functions import Data.Array.Parallel.Unlifted as U hiding ( update ) import Prelude as P import...
mainland/dph
dph-test/framework/DPH/Testsuite/Utils.hs
bsd-3-clause
1,838
0
11
410
485
276
209
32
2
{-# LANGUAGE OverloadedStrings #-} -- | Module for updating environment variables. All functions take either 'HKLM' to modify the -- variable for the machine, or 'HKCU' to modify for the user. -- -- /Warning:/ If you are modifying PATH, make sure you use a special build of NSIS which can cope -- with longer stri...
ndmitchell/nsis
src/Development/NSIS/Plugins/EnvVarUpdate.hs
bsd-3-clause
2,867
0
17
575
854
425
429
36
1
{-# LANGUAGE TypeFamilies, ScopedTypeVariables, DeriveDataTypeable #-} module Language.Haskell.GhcMod.Error ( GhcModError(..) , gmeDoc , modifyError , modifyError' , tryFix , module Control.Monad.Error , module Exception ) where import Control.Monad.Error (MonadError(..), Error(..)) import Data.List ...
cabrera/ghc-mod
Language/Haskell/GhcMod/Error.hs
bsd-3-clause
2,531
0
13
790
529
283
246
55
8
module Network.BitTorrent.Exchange.BlockSpec (spec) where import Control.Applicative import Control.Exception import Data.Maybe import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Instances () import Network.BitTorrent.Exchange.Block as Block instance Arbitrary a => Arbitrary (Block a) where arbitrary ...
pxqr/bittorrent
tests/Network/BitTorrent/Exchange/BlockSpec.hs
bsd-3-clause
969
0
18
182
287
151
136
27
1
{- | Module : $Header$ Description : Basic analysis for propositional logic Copyright : (c) Dominik Luecke, Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable Basic and static analysis for proposi...
mariefarrell/Hets
Propositional/Analysis.hs
gpl-2.0
13,179
0
25
4,609
3,213
1,705
1,508
258
4
-- Copyright 2016 TensorFlow authors. -- -- 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 agree...
judah/tensorflow-haskell
tensorflow-ops/tests/ArrayOpsTest.hs
apache-2.0
1,918
0
13
387
465
265
200
30
1
module HsModuleCollection where import Language.Haskell.Syntax (HsModule) type ModuleName = String type Module = (ModuleName,[ModuleName],HsModule) type ModuleCollection = [Module]
forste/haReFork
StrategyLib-4.0-beta/examples/haskell/HsModuleCollection.hs
bsd-3-clause
183
0
6
20
48
32
16
5
0
------------------------------------------------------------------------ -- | -- Module : ALife.Creatur.Wain.UIVector.Prediction.Universe -- Copyright : (c) Amy de Buitléir 2012-2018 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- --...
mhwombat/prediction-wains
src/ALife/Creatur/Wain/UIVector/Prediction/Universe.hs
bsd-3-clause
15,226
0
12
2,510
3,136
1,814
1,322
357
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Types -- Copyright : Isaac Jones 2006, Duncan Coutts 2007-...
mydaum/cabal
Cabal/Distribution/Simple/Program/Types.hs
bsd-3-clause
6,929
0
15
1,563
684
439
245
66
1
----------------------------------------------------------------------------- -- -- Code generation for coverage -- -- (c) Galois Connections, Inc. 2006 -- ----------------------------------------------------------------------------- module StgCmmHpc ( initHpc, mkTickBox ) where import GhcPrelude import StgCmmMonad ...
ezyang/ghc
compiler/codeGen/StgCmmHpc.hs
bsd-3-clause
1,317
0
15
410
284
153
131
29
1
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2011-2015 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) a...
gbataille/pandoc
src/Text/Pandoc/SelfContained.hs
gpl-2.0
7,211
0
19
1,944
2,069
1,065
1,004
132
7
module ShouldFail where (a:[]) = 1
siddhanathan/ghc
testsuite/tests/typecheck/should_fail/tcfail018.hs
bsd-3-clause
38
0
7
9
19
11
8
2
1
module NDCCorners where import qualified Vector4f as V4 near_x0y0 :: V4.T near_x0y0 = V4.V4 (-1.0) (-1.0) (-1.0) 1.0 near_x1y0 :: V4.T near_x1y0 = V4.V4 1.0 (-1.0) (-1.0) 1.0 near_x0y1 :: V4.T near_x0y1 = V4.V4 (-1.0) 1.0 (-1.0) 1.0 near_x1y1 :: V4.T near_x1y1 = V4.V4 1.0 1.0 (-1.0) 1.0 far_x0y0 :: V4.T far_x0y0 ...
io7m/r2
com.io7m.r2.documentation/src/main/resources/com/io7m/r2/documentation/haskell/NDCCorners.hs
isc
510
0
7
98
254
140
114
18
1
{-# LANGUAGE DeriveGeneric, OverloadedStrings, TypeSynonymInstances #-} module Identity ( Identity(..) , Account(..) , User , outputIdentity , getIdentity , getId ) where import Data.Aeson import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy as L import GHC.Generics import ...
dxtr/dnsimple
src/Identity.hs
isc
2,969
0
15
775
903
465
438
82
2
{-# LANGUAGE TemplateHaskell #-} module Fib where import Language.Haskell.TH fibs :: [Integer] fibs = 0 : 1 : zipWith (+) fibs (tail fibs) fibQ :: Int -> Q Exp fibQ n = [| fibs !! n |]
JoshuaGross/haskell-learning-log
code/tpl-haskell/src/Fib.hs
mit
199
0
8
51
70
41
29
7
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} -- import Control.Arrow import Control.Arrow (first) import Control.Exception import Control.Monad.Reader import Control.Monad.State import Data.Aeson ...
endoffile78/devbot
src/devbot.hs
mit
23,043
0
27
6,235
6,728
3,394
3,334
432
5
module Cards.BlackjackGameState( Move(Stick, Twist), playerTurn, drawNewPlayerHand, GameState, score, initialise, HandScore, printHand ) where import Control.Applicative import Control.Monad.State import Cards.Blackjack import System.Random import System.Random.Shuffle type GameState a = StateT (Hand, DeckOfCards) IO...
smobs/HackJack
Cards/BlackjackGameState.hs
mit
1,212
0
10
287
453
237
216
54
2
{-# htermination elemFM :: Char -> FiniteMap Char b -> Bool #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_elemFM_3.hs
mit
81
0
3
14
5
3
2
1
0
module Prime ( isPrime ) where isPrime :: Int -> Bool isPrime n | n <= 1 = False | otherwise = isPrime' 2 n where isPrime' current n | current == n = True | mod n current == 0 = False | otherwise = isPrime' (current + 1) n
RadoRado/HUnit-Test-Generator
Prime.hs
mit
304
0
11
132
111
53
58
10
1
add :: Integer -> Integer -> Integer add x y = x + y result = add 1 2
Azabuhs/Ruby
test/haskell_codes/ex1.hs
mit
70
0
6
19
38
19
19
3
1
module Main where import IO hiding(try) import Monad import Data.Char (isSymbol, isPunctuation, isSpace) import Data.List (concat, isPrefixOf, findIndex) import System.Console.GetOpt --import Test.QuickCheck import Text.ParserCombinators.Parsec hiding (Parser) import System.Environment.UTF8 --import System.Console.Rea...
benwbooth/cleo
cleo.hs
mit
11,900
0
36
2,762
3,727
1,848
1,879
337
3
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} module Network.Slack.Types ( module Network.Slack.Types.User , module Network.Slack.Types.Event ) where import Network.Slack.Types.Event import Network.Slack.T...
owainlewis/slack
src/Network/Slack/Types.hs
mit
330
0
5
57
41
30
11
7
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html module Stratosphere.Resources.EMRSecurityConfiguration where import Stratospher...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EMRSecurityConfiguration.hs
mit
2,215
0
15
246
267
155
112
30
1
module Graphics.Urho3D.Container.FlagSet( FlagSet(..) , setFlag , unsetFlag , testFlag , flagsToList , flagsFromList ) where import Control.DeepSeq import Data.Bits import Data.Foldable (foldl') import Foreign import GHC.Generics -- | Wrap any 'impl' integer into bitfield which elements are values of ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Container/FlagSet.hs
mit
1,501
0
10
287
493
265
228
25
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Data.Hanu.Unary ( sqrt , exp , log ) where import qualified Data.Array.Repa as R import qualified Prelude as P sqrt = R.map P.sqrt exp = R.map P.exp log = R.map P.log
luispedro/Hanu
Data/Hanu/Unary.hs
mit
235
0
6
54
70
43
27
10
1
-- Copyright © 2013 Julian Blake Kongslie <jblake@jblake.org> -- Licensed under the MIT license. {-# OPTIONS_GHC -Wall -Werror #-} module Language.GBAsm.Locals where import Data.Generics.Uniplate.Operations import qualified Data.Map as M import Language.GBAsm.Types -- |This follows approximately the same pattern a...
jblake/gbasm
src/Language/GBAsm/Locals.hs
mit
1,900
0
16
471
392
208
184
18
6
{-# OPTIONS_GHC -O2 -Wall -fwarn-tabs -Werror #-} ------------------------------------------------------------------------------- -- | -- Module : Lorenz.App -- Copyright : Copyright (c) 2014 Michael R. Shannon -- License : MIT -- Maintainer : mrshannon.aerospace@gmail.com -- Stability : unstable --...
mrshannon/lorenz
src/Lorenz/App.hs
mit
1,769
0
10
563
307
202
105
43
1
{- | Module : ./GUI/GraphLogic.hs Description : Logic for manipulating the graph in the Central GUI Copyright : (c) Jorina Freya Gerken, Till Mossakowski, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability ...
spechub/Hets
GUI/GraphLogic.hs
gpl-2.0
32,117
0
33
9,588
9,637
4,785
4,852
698
7
{-# LANGUAGE NamedFieldPuns #-} module Main where import Data.Maybe (mapMaybe) import System.Directory (getDirectoryContents, doesFileExist, doesDirectoryExist) import qualified Data.Map.Lazy as M import Data.List (foldl') import Control.Monad (liftM) import Text.Printf import System.FilePath ((</>)) data Document = ...
adimit/summarization
test.hs
gpl-2.0
2,490
0
19
461
804
418
386
53
3
{-# LANGUAGE MultiParamTypeClasses #-} module Granada.Parser (parseFromFile, program, action, goal, character) where import Control.Applicative import Data.Functor.Identity import System.Exit import System.IO (hPutStrLn, stderr) import qualified Text.Parsec ...
adolfosilva/granada
library/Granada/Parser.hs
gpl-3.0
5,722
0
11
1,123
1,717
880
837
-1
-1
module Nirum.TestFixtures (fixturePackage, scanFixturePackage) where import Control.Monad import Data.Either import System.FilePath import Nirum.Package import Nirum.Package.Metadata -- | Scan test/nirum_fixture/ package. scanFixturePackage :: Target t => IO (Either PackageError (Package t)) scanFixturePackage = s...
spoqa/nirum
test/Nirum/TestFixtures.hs
gpl-3.0
606
0
11
96
165
84
81
14
1
module DL4001 (tests) where import Data.Text as Text import Helpers import Test.Hspec tests :: SpecWith () tests = do let ?rulesConfig = mempty describe "DL4001 - Either use Wget or Curl but not both." $ do it "warns when using both wget and curl" $ let dockerFile = [ "FROM node as foo", ...
lukasmartinelli/hadolint
test/DL4001.hs
gpl-3.0
2,211
0
16
867
382
190
192
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/JobTriggers/Patch.hs
mpl-2.0
5,894
0
16
1,258
781
458
323
119
1
-- Canvas.Hs, control javascript canvas with Haskell -- Copyright (C) 2013, Lennart Buit, Joost van Doorn, Pim Jager, Martijn Roo, -- Thijs Scheepers -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Soft...
CanvasHS/Canvas.hs
canvashs-module/CanvasHs/Protocol/ActionOutput.hs
lgpl-2.1
5,731
0
11
1,953
796
471
325
66
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {- 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 of the License at http...
alphalambda/codeworld
codeworld-api/src/Util/EmbedAsUrl.hs
apache-2.0
1,415
0
14
263
159
96
63
21
1
{- Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish 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 ...
mrd/camfort
src/Camfort/Transformation/DeadCode.hs
apache-2.0
3,398
0
14
762
715
402
313
49
2
module Handler.About where import Import getAboutR :: Handler RepHtml getAboutR = do defaultLayout $ do setTitle "About" $(widgetFile "about")
BeerAndProgramming/BeerAndProgrammingSite
Handler/About.hs
bsd-2-clause
165
0
12
41
45
22
23
7
1
{-# LANGUAGE CPP, TypeFamilies, UndecidableInstances #-} -- | Backtracking parser for Parsing Expression Grammars module Text.Grampa.PEG.Backtrack (Parser(..), Result(..), alt) where import Control.Applicative (Applicative(..), Alternative(..), liftA2) import Control.Monad (Monad(..), MonadPlus(..)) #if MIN_VERSION_ba...
blamario/grampa
grammatical-parsers/src/Text/Grampa/PEG/Backtrack.hs
bsd-2-clause
11,746
0
19
3,216
3,883
1,981
1,902
-1
-1
{-# LANGUAGE TemplateHaskell, NoMonomorphismRestriction, FlexibleContexts #-} {-| The WConfd functions for direct configuration manipulation This module contains the client functions exported by WConfD for specific configuration manipulation. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistributi...
yiannist/ganeti
src/Ganeti/WConfd/ConfigModifications.hs
bsd-2-clause
27,912
0
29
7,718
7,037
3,628
3,409
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} import Network.Wai.Handler.DevelServer (runNoWatch) import System.Console.CmdArgs import Control.Concurrent (forkIO) data Devel = Devel { port :: Int , moduleName :: String , function :: String , yesod :: Bool } deriving (Show, Data, Typeable) main :: IO () ...
stevenrobertson/wai-handler-devel
wai-handler-devel-unwatched.hs
bsd-2-clause
907
0
14
273
289
151
138
27
3
import "base" Data.Char import "base" Data.Char (isControl, isSpace) import "base" Data.Char (isControl, --isSpace) isSpace) import "base" Data.Char (isControl, -- isSpace) isSpace) (-->) :: Num a => a -- signature (-->) = 2 -- >implementation --test comment -- test comment main :: IO () main = putStrLn "hello wor...
victoredwardocallaghan/pygments-main
tests/examplefiles/import.hs
bsd-2-clause
324
0
6
53
94
59
35
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ViewPatterns #-} -- | -- Module : Documentation.Haddock.Parser.Identifier -- Copyright : (c) Alec Theriault 2019, -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental -- Portability : portable -- -- Functionality...
haskell/haddock
haddock-library/src/Documentation/Haddock/Parser/Identifier.hs
bsd-2-clause
5,785
0
21
1,834
1,598
853
745
97
12
{-# LANGUAGE TemplateHaskell #-} module Language.Drasil.Chunk.CodeQuantity (CodeQuantityDict, cqd, implCQD, cqw) where import Control.Lens ((^.), makeLenses, view) import Language.Drasil data CodeQuantityDict = CQD { _id' :: IdeaDict , _typ' :: Space , _symb...
JacquesCarette/literate-scientific-software
code/drasil-code/Language/Drasil/Chunk/CodeQuantity.hs
bsd-2-clause
1,488
0
11
392
466
246
220
29
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, FlexibleContexts, PackageImports #-} import Control.Applicative import "monads-tf" Control.Monad.State import "monads-tf" Control.Monad.Writer import "monads-tf" Control.Monad.Error import Control.Concurrent hiding (yield) import Control.Concurrent.ST...
YoshikuniJujo/xmpipe
examples/tls.hs
bsd-3-clause
4,804
40
18
844
1,930
1,025
905
123
5
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.APPLE.ElementArray -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/APPLE/ElementArray.hs
bsd-3-clause
941
0
4
106
67
52
15
11
0
module Graphomania.Builder () where -- TODO: -- 1. Построение из триплетов vs построение из вершин. -- - Построение из триплетов более универсально. -- - При построении из вершин нам заранее известно кол-во ребер в вершине, -- следовательно мы можем заранее выделить неолбходимое количество памяти. -- П...
schernichkin/BSPM
graphomania/src/Graphomania/Builder.hs
bsd-3-clause
669
0
3
81
16
13
3
1
0
;============================================================ ; d3module help ;============================================================ %dll d3module %ver 1.67 %date 2008/05/01 %author S.Programs %note d3m.hsp ‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚éB %url http://sprocket.babyblue.jp/ http://sprocket.babyblue...
zakki/openhsp
package/win32/doclib/d3module/d3mhelp.hs
bsd-3-clause
19,278
7,909
24
2,674
17,716
10,522
7,194
-1
-1
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} -- -- This code is adapted from Ben Lippmeier's Gloss library -- module GUI where import Data.IORef import Data.Word import Control.Applicative import Control.Monad import Data.Maybe (isJust) import Foreign (ForeignPtr, nullPtr, ...
mainland/nikola
examples/common/GUI.hs
bsd-3-clause
24,150
0
21
7,904
6,539
3,249
3,290
541
3
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Prelude hiding (log) import Control.Exception (SomeException) import Control.Monad import Control.Monad.IO.Class import Control.Monad.CatchIO import Data.ByteString (ByteString) import qualified Data.Text as T import qualified Data.Text.Enc...
mvoidex/carma-sync
tools/carma-sync.hs
bsd-3-clause
5,195
0
21
1,438
1,696
874
822
111
4
module Parser where -- Id: 1 -- Maybe: fail or 1 -- List: fail or 1 or more -- NEL: 1 or more type List a = [a] class Input a where isEmpty :: a -> Bool data Parser a b = MkParser {runParser :: a -> List (a, b)} parse :: (Input a) => Parser a b -> a -> Either String b parse p a = case runParser p a of [] -> Le...
sleexyz/haskell-fun
Parser.hs
bsd-3-clause
482
0
11
124
176
96
80
13
4
module Data.MinMax where import Data.Monoid (Monoid, Sum, mappend, mempty) newtype MinMax a = MinMax (a, a) deriving (Eq, Show, Bounded) class (Bounded n, Eq n, Ord n, Show n) => MinMaxable n -- (min, max) instance (Show a, Bounded a, Ord a) => Semigroup (MinMax a) where (<>) m1@(MinMax (min1, max1...
misterbeebee/calisson-hs
src/Data/MinMax.hs
bsd-3-clause
812
0
12
224
294
160
134
-1
-1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeOperators #-} module ANTPlus (AntMessage(..), UnAssignChannelPayload(..), AssignChannelPayload(..), SetChannelIdPayload(..), ...
ocharles/ant-plus
src/ANTPlus.hs
bsd-3-clause
30,263
0
19
6,684
5,158
2,806
2,352
799
34
module GenericExample where import Control.DeepSeq ( NFData(rnf) ) import Control.DeepSeq.Generics import qualified Data.Comp.Multi as M import Data.Comp.Multi.Derive ( derive, makeHFunctor, makeHTraversable, makeHFoldable, makeEqHF, makeShowHF, makeOrdHF, smartConstructors ) import qualified Data.Comp.Multi.Ops as M...
jkoppel/comptrans
examples/generics/GenericExample.hs
bsd-3-clause
1,769
0
11
341
708
400
308
-1
-1
module Main where import qualified CLI main = CLI.main
luqui/tigress
Main.hs
bsd-3-clause
57
0
5
11
15
10
5
3
1
module Numeric.DataFrame ( module Numeric.DataFrame.Type -- * Simplified type aliases , module Numeric.Scalar , module Numeric.Vector , module Numeric.Matrix -- * Functionality , module Numeric.DataFrame.SubSpace , module Numeric.DataFrame.Contraction , module Numeric.Basics , module Numeric.Sub...
achirkin/easytensor
easytensor/src/Numeric/DataFrame.hs
bsd-3-clause
628
0
5
88
124
83
41
18
0
{-# LANGUAGE GeneralizedNewtypeDeriving, RecordWildCards #-} module Cards where import Cards.Common import Cards.Common.Abbrev import Cards.Common.Hint import Cards.Common.Stringe import Data.List import Data.Char import Data.Set (Set) import Data.Ord import Data.Function (on) import Data.Monoid import qualified Data...
archaephyrryx/CCG-Project
src/CCG/Cards.hs
bsd-3-clause
4,466
125
29
1,539
1,808
993
815
140
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} -- | -- Module: $HEADER$ -- Description: Extra goodies for Reader effect. -- Copyright: (c) 2017 Peter Trško -- License: BSD3 -...
trskop/freer-extra
src/Control/Monad/Freer/Reader/Extra.hs
bsd-3-clause
4,264
0
14
789
787
457
330
71
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Map -- Copyright : (c) 2008, 2009 Unive...
spl/emgm
tests/Map.hs
bsd-3-clause
2,276
0
10
411
492
287
205
38
1
{-# LANGUAGE BangPatterns, RecordWildCards, TypeSynonymInstances, MultiParamTypeClasses, TypeFamilies #-} module Data.TrieMap.OrdMap.Buildable () where import Data.TrieMap.OrdMap.Base import Data.TrieMap.OrdMap.Searchable () import Data.Functor.Immoral instance Ord k => Buildable (OrdMap k) (Ordered k) where type ...
lowasser/TrieMap
Data/TrieMap/OrdMap/Buildable.hs
bsd-3-clause
1,042
0
11
227
457
236
221
26
5
-- Simple keylogger -- -- Compile & install -- -- ghc --make Keylog.hs -O2 -threaded -o xinput-keylogger -- sudo mv xinput-keylogger /usr/local/bin -- -- Storage (for security) -- -- $ sudo useradd xinput -- $ sudo mkdir -p /var/log/xinput/ -- $ sudo touch /var/log/xinput/keys -- $ sudo chown -R xinput:xinput /var/log/...
chrisdone/keyboard-stats
src/main/XInputKeylogger.hs
bsd-3-clause
2,657
0
19
748
544
304
240
58
2
{- | Module : ./Adl/StatAna.hs Description : static ADL analysis Copyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable -} module Adl.StatAna where import Adl.A...
spechub/Hets
Adl/StatAna.hs
gpl-2.0
7,782
0
28
2,650
3,205
1,571
1,634
210
15
module SecondTransfer.ConstantsAndLimits ( maxUrlLength ) where -- To be reviewed in the future maxUrlLength :: Int maxUrlLength = 4096
shimmercat/second-transfer
hs-src/SecondTransfer/ConstantsAndLimits.hs
bsd-3-clause
154
0
4
37
22
14
8
4
1
-- (c) The University of Glasgow 2002-2006 {-# LANGUAGE CPP, RankNTypes #-} module IfaceEnv ( newGlobalBinder, newImplicitBinder, newInteractiveBinder, externaliseName, lookupIfaceTop, lookupOrig, lookupOrigNameCache, extendNameCache, newIfaceName, newIfaceNames, extend...
TomMD/ghc
compiler/iface/IfaceEnv.hs
bsd-3-clause
13,342
0
21
3,967
2,243
1,201
1,042
169
2
module TestConnect where import Database.HaskellDB import Database.HaskellDB.GenericConnect import System.Environment connect :: [String] -> (Database -> IO a) -> IO a connect (driver:args) = genericConnect driver args connect _ = error "No driver argument supplied" argConnect :: (Database -> IO a) -> IO a argConnec...
m4dc4p/haskelldb
test/old/TestConnect.hs
bsd-3-clause
389
0
9
85
125
64
61
11
1
module Paper.Haskell2.Stage3(stage3) where import Data.Char import Data.List import System.FilePath import Paper.Haskell2.Type import Paper.Haskell2.Haskell exts = "NoMonomorphismRestriction, MultiParamTypeClasses, FlexibleContexts, " ++ "FlexibleInstances, UndecidableInstances, Rank2Types, EmptyDataDecls, "...
saep/neil
src/Paper/Haskell2/Stage3.hs
bsd-3-clause
3,028
2
16
954
1,075
568
507
55
3
{-# LANGUAGE TupleSections, QuasiQuotes, Rank2Types #-} -- | This module implements the name resolution stage of the compiler module Language.Java.Paragon.NameResolution (resolveNames) where import Language.Java.Paragon.Error import Language.Java.Paragon.Syntax import Language.Java.Paragon.Pretty import Language.Java....
bvdelft/parac2
src/Language/Java/Paragon/NameResolution.hs
bsd-3-clause
40,133
0
25
12,985
10,341
4,994
5,347
715
28
{-# LANGUAGE TemplateHaskell #-} module Network.Mattermost.Version (mmApiVersion) where import Data.Version (showVersion) import Development.GitRev (gitBranch, gitHash) import Paths_mattermost_api (version) mmApiVersion :: String mmApiVersion | $(gitHash) == ("UNKNOWN" :: String) = "mattermost-api " ++ showVersion...
dagit/mattermost-api
src/Network/Mattermost/Version.hs
bsd-3-clause
461
0
12
78
130
70
60
10
1
{-# OPTIONS -cpp #-} -- OPTIONS required for ghc-6.4.x compat, and must appear first {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -cpp #-} {-# OPTIONS_NHC98 -cpp #-} {-# OPTIONS_JHC -fcpp #-} -- #hide module Distribution.Compat.CopyFile ( copyFile, copyOrdinaryFile, copyExecutableFile, setFileOrdinary, setFileExecuta...
IreneKnapp/Faction
libfaction/Distribution/Compat/CopyFile.hs
bsd-3-clause
3,555
0
14
857
675
379
296
32
1
-- Memcached interface. -- Copyright (C) 2005 Evan Martin <martine@danga.com> module Network.Memcache where import Network.Memcache.Serializable import Network.Memcache.Key class Memcache a where set, add, replace :: (Key k, Serializable s) => a -> k -> s -> IO Bool get :: (Key k, Serializable s) =...
alsonkemp/haskell-memcached
Network/Memcache.hs
mit
498
0
13
131
172
95
77
8
0
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} -- | -- Module : Language.C.Inline.Error -- Copyright : [2013] Manuel M T Chakravarty -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable (GHC extensions) -- -- This modu...
beni55/language-c-inline
Language/C/Inline/Error.hs
bsd-3-clause
2,134
0
11
458
359
206
153
32
1
-- Copyright 2009-2010 Corey O'Connor module Graphics.Vty.Debug ( module Graphics.Vty.Debug , module Graphics.Vty.Debug.Image ) where import Graphics.Vty.Attributes import Graphics.Vty.Image (DisplayRegion) import Graphics.Vty.Debug.Image import Graphics.Vty.Span import qualified Data.Vector as Vector rowOpsAf...
jtdaugherty/vty
src/Graphics/Vty/Debug.hs
bsd-3-clause
1,148
0
11
167
316
176
140
27
1
{-# LANGUAGE CPP, RecursiveDo #-} import Control.Applicative import Control.Arrow(first) import Data.Maybe #if !MIN_VERSION_base(4,8,0) import Data.Monoid #endif import System.Environment import Text.Earley import Text.Earley.Mixfix import qualified Data.HashSet as HS holey :: String -> Holey String holey "" = [...
bitemyapp/Earley
examples/Mixfix.hs
bsd-3-clause
2,050
87
9
567
809
445
364
54
1