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 OverloadedStrings #-} module Trivial ( script ) where import Prelude import Shell script :: ShellM () script = do run $ command "echo" ["1"] return ()
travitch/shellDSL
tests/inputs/Trivial.hs
bsd-3-clause
169
0
9
33
54
29
25
8
1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE UndecidableSuperClasses #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE CPP #-} module Heterogeneous.Example where import Prelude hiding (Monoid (..),(-),(+),negate,(==),minBound) import qualified Prelude as P import Constrained.FAlgebra -...
mikeizbicki/homoiconic
src/Homoiconic/Constrained/Example.hs
bsd-3-clause
30,811
0
15
7,514
1,955
1,352
603
-1
-1
{-# LANGUAGE FlexibleContexts,TypeSynonymInstances,FlexibleInstances,MultiParamTypeClasses #-} module LiveJournal.GetFriends ( getFriends, getFriendsOf ) where import LiveJournal.Request import LiveJournal.Error import LiveJournal.Session import LiveJournal.Transport import LiveJournal.Entity import LiveJourna...
jdevelop/hslj
LiveJournal/GetFriends.hs
bsd-3-clause
4,488
0
13
820
1,223
662
561
81
2
{-# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , RebindableSyntax , RecordWildCards , UndecidableInstances #-} module Control.Monad.FD ( FD , runFD , FDT , runFDT , Term , freshTerm , fromVar , fromInt , Additi...
sonyandy/fd
src/Control/Monad/FD.hs
bsd-3-clause
5,205
0
15
1,589
2,211
1,177
1,034
162
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Tile.Legend where import Data.Points import Data.TileMap import Data.TileSet import Error import Util import Util.HandleIO import Control.Applicative import Control.Arrow (second) import qualified Data.Foldable as F import Data.Traversabl...
kylcarte/wangtiles
src/Tile/Legend.hs
bsd-3-clause
4,017
0
13
822
1,511
809
702
109
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} module DataFamilies.Encoders where import Json import Options import DataFamilies.Types {- A NOTE mkToJson/mkToEncoding/mkParseJson don't care about what constructor they're given (C1, C2, or C3), they're going to make an instance for the whole type. There's ...
aelve/json-x
tests/DataFamilies/Encoders.hs
bsd-3-clause
8,133
0
8
670
1,293
701
592
99
1
module Rogue.AST.Untyped ( FunctionType , Program , Statements , Declaration (..) , Expr (..) , Statement (..) ) where import Rogue.Parser.Tokens (Identifier, MutabilityToken, TypeToken) type Program = [Declaration] type FunctionType = [(Identifier, TypeToken)] type Statemen...
ChShersh/rogue-lang
src/Rogue/AST/Untyped.hs
bsd-3-clause
1,791
0
9
616
362
227
135
51
0
{-# LANGUAGE TemplateHaskell #-} module System.Process.QQ ( -- * Quasi Quoters cmd, scmd, ccmd, ) where import Control.Applicative import Control.Monad.Trans.Resource as R import qualified Data.ByteString.Lazy as BL import qualified Data.Conduit as C import qualified Data.Conduit.List as CL import qualified...
tanakh/process-conduit
System/Process/QQ.hs
bsd-3-clause
1,038
0
7
184
206
142
64
27
1
{-# LANGUAGE ScopedTypeVariables #-} -- | This module exports useful bindings and types for building an echo state network reservoir, and find its stable states for given patterns module Data.Neural.Reservoir where import Control.Monad (replicateM, ap) import Control.Applicative ((<$>)) import Data.Array.Unboxed as A...
paolino/hneural
Data/Neural/Reservoir.hs
bsd-3-clause
3,653
19
18
738
1,040
572
468
48
2
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | -- Types...
simonmar/Haxl
Haxl/Core/Stats.hs
bsd-3-clause
5,796
0
19
1,171
1,187
683
504
129
3
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, MultiParamTypeClasses, TypeSynonymInstances, CPP #-} {-# OPTIONS_GHC -Wall #-} -------------------------------------------------------------------- -- | -- Copyright : © Masahiro Sakai 2014 -- License : BSD3 -- Maintainer: Masahiro Sakai <masahiro.sakai@gmail.com> --...
msakai/satchmo-toysat
src/Satchmo/SAT/Toysat.hs
bsd-3-clause
3,580
0
20
1,036
1,100
538
562
88
2
{-# LINE 1 "Numeric.Natural.hs" #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.Natural -- Copyright : (C) 2014 Herbert Valerio Riedel, -- (C) 2011 Edward Kmett -- License ...
phischu/fragnix
builtins/base/Numeric.Natural.hs
bsd-3-clause
676
0
4
117
34
28
6
5
0
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Completion -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- Collection of functions for completion and matching. module Yi.Completion ...
siddhanathan/yi
yi-core/src/Yi/Completion.hs
gpl-2.0
5,615
0
11
1,372
1,233
657
576
82
5
module GameLogic.Util.Shuffle (shuffle) where import System.Random import Data.Map as M hiding (foldl) fisherYatesStep :: RandomGen g => (Map Int a, g) -> (Int, a) -> (Map Int a, g) fisherYatesStep (m, gen) (i, x) = ((insert j x . insert i (m ! j)) m, gen') where (j, gen') = randomR (0, i) gen fisherYates :: ...
EPashkin/gamenumber-freegame
src_gl/GameLogic/Util/Shuffle.hs
gpl-3.0
665
0
11
148
351
194
157
15
1
-- HsParser: A Parsec builder, a toy for experimenting things: -- @2013 Angel Alvarez, Felipe Zapata, from The ResMol Group module ParsecNumbers where import Data.Char import Data.Functor.Identity import Data.Either import Control.Monad import Text.Parsec import Text.Parsec.Char import Text.Parsec.Combinator -- =...
felipeZ/Dynamics
src/ParsecNumbers.hs
bsd-3-clause
4,344
0
17
1,189
846
435
411
72
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeApplications #-} module Main where import qualified ...
k0001/haskell-money
safe-money-store/test/Main.hs
bsd-3-clause
8,637
0
16
1,557
2,444
1,289
1,155
169
1
{-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- Th...
ryantm/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
108,614
0
23
36,307
28,442
14,010
14,432
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Geometry_msgs.Transform where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal....
acowley/roshask
msgs/Geometry_msgs/Ros/Geometry_msgs/Transform.hs
bsd-3-clause
1,586
1
11
267
429
249
180
37
0
module D1 where {-Rename data constructor `Tree` to `AnotherTree`. This refactoring affects module `D1', 'B1' and 'C1' -} data Tree a = Leaf a | Branch (Tree a) (Tree a) fringe :: Tree a -> [a] fringe (Leaf x ) = [x] fringe (Branch left right) = fringe left ++ fringe right class SameOrNot a where isSame :...
kmate/HaRe
old/testing/renaming/D1.hs
bsd-3-clause
552
0
8
151
217
112
105
15
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="en-GB"> <title>Replacer | ZAP Extension</title> <maps> <homeID>top</homeID> ...
veggiespam/zap-extensions
addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help/helpset.hs
apache-2.0
982
82
67
171
421
215
206
-1
-1
-- Test for a bug that provoked the following assertion failure: -- nursery-chunks1: internal error: ASSERTION FAILED: file rts/sm/Sanity.c, line 903 module Main (main) where import Control.Monad import System.Environment import GHC.Conc main = do [n,m] <- fmap read <$> getArgs forM_ [1..n] $ \n' -> when (sum...
sdiehl/ghc
testsuite/tests/rts/nursery-chunks1.hs
bsd-3-clause
382
0
14
65
105
57
48
8
1
{-# LANGUAGE AllowAmbiguousTypes, TypeFamilies #-} module T5837 where type family TF a :: * type instance TF (a,b) = (TF a, TF b) t :: (a ~ TF (a,Int)) => Int t = undefined {- [G] a ~ TF (a,Int) -- a = a_am1 --> [G] TF (a,Int) ~ fsk -- fsk = fsk_am8 inert [G] fsk ~ a...
ezyang/ghc
testsuite/tests/perf/compiler/T5837.hs
bsd-3-clause
1,304
0
9
446
73
44
29
6
1
module Indef where import Sig data T = MkT B
ezyang/ghc
testsuite/tests/backpack/cabal/T14304/indef/Indef.hs
bsd-3-clause
45
0
6
10
16
10
6
3
0
module OverloadedRecFldsFail12_A where {-# WARNING foo "Deprecated foo" #-} {-# WARNING bar "Deprecated bar" #-} data T = MkT { foo :: Int, bar :: Int }
siddhanathan/ghc
testsuite/tests/overloadedrecflds/should_fail/OverloadedRecFldsFail12_A.hs
bsd-3-clause
154
0
8
28
27
18
9
4
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell ...
erikd/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
30,032
0
21
8,204
7,048
3,708
3,340
576
5
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.VTTRegion (newVTTRegion, getTrack, setId, getId, setWidth, getWidth, setHeight, getHeight, setRegionAncho...
ghcjs/jsaddle-dom
src/JSDOM/Generated/VTTRegion.hs
mit
5,864
0
12
724
1,345
746
599
71
1
{- Distinct powers Problem 29 Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 22=4, 23=8, 24=16, 25=32 32=9, 33=27, 34=81, 35=243 42=16, 43=64, 44=256, 45=1024 52=25, 53=125, 54=625, 55=3125 If they are then placed in numerical order, with any repeats removed, we get the following sequence of 15 d...
bertdouglas/euler-haskell
001-050/29a.hs
mit
704
0
10
151
105
53
52
6
1
{-# htermination (showMyInt :: MyInt -> (List Char)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Char = Char MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; stop :: MyBool -> a; stop MyFalse = stop MyFalse; error :: a; error = ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/show_4.hs
mit
4,178
0
105
789
2,367
1,222
1,145
76
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} module Meteor.SDLExtras where import qualified Graphics.UI.SDL as SDL import Graphics.UI.SDL.Types (Rect(..)) import Data.Bits ((.|.)) import Data.Word (Word8,Word32) import Foreign.C.Types import Foreign.Ptr import Foreign (Storable,peek,alloca,with...
mankyKitty/Meteor
src/Meteor/SDLExtras.hs
mit
3,765
0
14
935
1,469
764
705
98
2
{-| Module : HSat.Make.Instances.Common.Clauses Description : Exports functionality to create random 'Clauses' Copyright : (c) Andrew Burnett 2014-2015 Maintainer : andyburnett88@gmail.com Stability : experimental Portability : Unknown This module exports functionality to create random 'Clauses' -} module H...
aburnett88/HSat
src/HSat/Make/Instances/Common/Clauses.hs
mit
1,678
0
9
358
318
173
145
24
2
module Rebase.Control.Monad.Trans.Writer.Strict ( module Control.Monad.Trans.Writer.Strict ) where import Control.Monad.Trans.Writer.Strict
nikita-volkov/rebase
library/Rebase/Control/Monad/Trans/Writer/Strict.hs
mit
143
0
5
12
29
22
7
4
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- 1 балл module Parser ( Parser , pure, (<$>), (<$), (<*>), (<*), (*>) , empty, (<|>) , satisfy, eof , evalParser , parserTestOK , parserTestFail ) where import Control.Applicative import Control.Monad.State import Control.Monad.Error import...
SergeyKrivohatskiy/fp_haskell
hw11/Parser/Parser.hs
mit
1,756
0
16
447
629
338
291
42
3
{- - - Copyright (c) 2009-2010 Johnny Morrice - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, copy, - modif...
ozataman/shpider
Network/Shpider.hs
mit
12,946
0
25
4,048
2,563
1,316
1,247
246
4
module DataStructures.TreeSpec where import Prelude hiding (maximum, map) import Test.Hspec import DataStructures.Tree spec :: Spec spec = do describe "size" $ do it "gives the size of a tree in terms of the count of its nodes" $ do let tree = Branch (Leaf 10) (Leaf 20) size tree `shouldBe` 3 ...
tomwadeson/fpinhaskell
test/DataStructures/TreeSpec.hs
mit
1,108
0
20
284
434
211
223
26
1
module Zwerg.Event.Queue ( ZwergEventQueue , HasZwergEventQueue(..) , popEvent , pushEventM , mergeEventsM , module EXPORTED ) where import Zwerg.Prelude import Zwerg.Event as EXPORTED import Lens.Micro.Platform (Lens', use, (.=), (%=)) import Data.Sequence (Seq, (|>), ViewL(..), (><)) im...
zmeadows/zwerg
lib/Zwerg/Event/Queue.hs
mit
1,562
0
13
306
472
259
213
-1
-1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SVGPathSegLinetoRel (setX, getX, setY, getY, SVGPathSegLinetoRel(..), gTypeSVGPathSegLinetoRel) wh...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGPathSegLinetoRel.hs
mit
2,049
0
12
249
536
324
212
29
1
module Ch17.Lookups where import Data.List xs = [1..3] ys = [4..6] added :: Maybe Integer added = (+3) <$> (lookup 3 $ zip xs ys) lookupLists :: Integer -> Maybe Integer lookupLists x = lookup x $ zip xs ys y :: Maybe Integer y = lookupLists 3 z :: Maybe Integer z = lookupLists 2 tupled :: Maybe (Integer, Intege...
andrewMacmurray/haskell-book-solutions
src/ch17/Lookups.hs
mit
570
0
8
133
277
147
130
24
1
import Graphics.Shine.FRP.Varying import Graphics.Shine import Graphics.Shine.Picture import Graphics.Shine.Image import GHCJS.DOM (webViewGetDomDocument, runWebGUI) resizeImage img (x',y') = Translate (x/2) (y/2) -- Pictures are centered on (0,0), so we need to move it $ Image (Stretched x y) ...
fgaz/shine-varying
tests/resizeNarwhal.hs
mit
783
0
13
153
200
103
97
16
1
module GitHub.Internal ( get, put, post, patch, delete, uri, module GitHub.Types ) where import GitHub.Types import Network.HTTP.Conduit import URI.TH get = undefined put = undefined post = undefined patch = undefined delete = undefined
SaneApp/github-api
src/GitHub/Internal.hs
mit
252
0
5
49
73
46
27
16
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import qualified Development.Duplo.Component as DC import Development.Duplo.Types.AppInfo import Test.HUnit () import Test.QuickCheck () import Test.Tasty import Test.Tas...
pixbi/duplo
tests/Tests.hs
mit
2,039
0
21
703
493
261
232
47
1
module Gen.Render.Types ( Module (..) , createModules ) where import Data.Char (isUpper, isNumber) import qualified Data.Char as Char import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import Data.Set (Set) import qualified Data.Set as Set import Data.Text import Data.Text.Manipulate (lowerHead, toAcronym) ...
frontrowed/stratosphere
gen/src/Gen/Render/Types.hs
mit
8,597
0
11
1,083
1,582
833
749
-1
-1
{-# htermination (predFloat :: Float -> Float) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Double = Double MyInt MyInt ; data Float = Float MyInt MyInt ; data Integer = Integer MyInt ; data MyInt = Pos Nat | Neg Nat ; data N...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/pred_5.hs
mit
4,068
0
13
853
1,849
977
872
97
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module MinionsApi.Service where import Data.Int (Int64) import Control.Monad (liftM) import Control.Monad.Reader (ReaderT, runReaderT, lift) import Control.Monad.Trans.Eithe...
dzotokan/minions-api
src/lib/MinionsApi/Service.hs
mit
3,060
0
26
633
833
441
392
73
2
----------------------------------------------------------------------------- -- -- Module : Drool.UI.Metrics -- Copyright : -- License : GPL v3 -- -- Maintainer : Tobias Fuchs -- Stability : experimental -- Portability : Win32, POSIX -- -- | -- -------------------------------------------------------...
fuchsto/drool
src/Drool/UI/Metrics.hs
mit
1,405
0
17
228
247
137
110
-1
-1
module SliceAndDice where rvrs :: String -> String rvrs text = (take 7 (drop 9 text) ++ " " ++ drop 6 (take 8 text)) ++ " " ++ (take 5 text)
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/03/03.08.05-slideAndDice.hs
mit
144
0
12
35
74
38
36
3
1
----------------------------------------------------------------------------- -- -- Module : Graphics.GPipe.Sampler -- Copyright : Tobias Bexelius -- License : MIT -- -- Maintainer : Tobias Bexelius -- Stability : Experimental -- Portability : Portable -- -- | -- A sampler is a value from which filt...
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Sampler.hs
mit
3,234
0
5
615
281
199
82
47
0
{-# LANGUAGE OverloadedStrings, TupleSections, ScopedTypeVariables #-} {- Copyright (C) 2006-2014 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 o...
nickbart1980/pandoc
src/Text/Pandoc/Writers/Markdown.hs
gpl-2.0
37,089
285
39
12,541
10,276
5,288
4,988
706
27
-- | -- Module : System.Dzen.Internal -- Copyright : (c) 2009 Felipe A. Lessa -- License : GPL 3 (see the LICENSE file in the distribution) -- -- Maintainer : felipe.lessa@gmail.com -- Stability : experimental -- Portability : semi-portable (MPTC and type families) -- -- Internal data types and func...
ianclement/dzen-utils
System/Dzen/Internal.hs
gpl-3.0
6,584
37
13
1,630
1,244
727
517
70
2
-- | -- Copyright : © 2009 CNRS - École Polytechnique - INRIA -- License : GPL module Dedukti.Driver.Interactive (eval) where import Dedukti.Module import Dedukti.Parser import qualified Dedukti.Rule as Rule import Data.ByteString.Lazy (ByteString)
mboes/dedukti
Dedukti/Driver/Interactive.hs
gpl-3.0
257
0
5
39
44
30
14
5
0
myReverse :: [a] -> [a] myReverse [] = [] myReverse (x : xs) = myReverse xs ++ [x] myReverse2 :: [a] -> [a] myReverse2 xs = reverse xs
dannywillems/99-problems
haskell/p05.hs
gpl-3.0
136
0
7
29
79
42
37
5
1
module Lang.French where import Lang.Strings french :: String -> String french str | is tuiTitle = " Herm's - Ajouter une recette" | is tuiName = " Nom: " | is tuiDesc = " Description: " | is tuiServingSize = " Portion: " | is tuiHeaders = " ...
JackKiefer/herms
src/Lang/French.hs
gpl-3.0
3,646
0
8
1,020
927
396
531
79
1
module HEP.Automation.MadGraph.Dataset.Set20110308set2 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: S...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110308set2.hs
gpl-3.0
1,699
0
10
425
356
219
137
47
1
{-# LANGUAGE GADTs, RankNTypes, ScopedTypeVariables #-} -- (c) JP Bernardy; GPL-licensed. module Fusion where import Data.List (unfoldr) import Control.Comonad import Control.Monad import Data.Foldable as T hiding (fold) import Data.Traversable import Control.Applicative import Data.Monoid import Data.Maybe -- Prin...
jyp/ControlledFusion
Fusion.hs
gpl-3.0
12,145
0
16
3,396
4,631
2,361
2,270
256
4
module Hadolint.Rule.DL3040 (rule) where import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule Shell.ParsedShell rule = simpleRule code severity message check where code = "DL3040" severity = DLWarningC message = "`dnf clean all` missing after dnf comma...
lukasmartinelli/hadolint
src/Hadolint/Rule/DL3040.hs
gpl-3.0
709
0
13
155
186
101
85
16
2
{-# LANGUAGE OverloadedStrings #-} module Printer.DOT (printNet) where import qualified Data.ByteString.Lazy as L import Data.ByteString.Builder import Data.Monoid import Printer import PetriNet -- TODO: mark initially labeled places renderNet :: PetriNet -> Builder renderNet net = "digraph petrinet...
cryptica/slapnet
src/Printer/DOT.hs
gpl-3.0
1,202
0
15
402
335
176
159
27
2
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Scenario/Triggers/Icehold.hs
gpl-3.0
15,723
7
23
4,560
2,379
1,099
1,280
190
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudfunctions/gen/Network/Google/Resource/CloudFunctions/Projects/Locations/List.hs
mpl-2.0
6,134
5
20
1,439
960
556
404
133
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Invalidate.hs
mpl-2.0
3,155
0
15
686
315
192
123
51
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/RegisterImage.hs
mpl-2.0
8,893
0
10
1,957
1,167
706
461
118
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Bantam.Service.Resource.Assets ( assetsResource ) where import Bantam.Service.Webship import Data.ByteString (ByteString) import qualified Data.ByteString.Base16 as B16 import qualif...
charleso/bantam
bantam-service/src/Bantam/Service/Resource/Assets.hs
unlicense
1,492
0
17
355
424
244
180
38
3
module PrettyPrint where import SIL import Naturals import Data.Map (Map) import qualified Data.Map as Map indent :: Int -> String indent 0 = [] indent n = ' ' : ' ' : indent (n - 1) showPIExpr :: Int -> Int -> IExpr -> String showPIExpr _ _ Zero = "Z" showPIExpr _ _ Env = "E" showPIExpr l i (Pair a b) = concat [...
sfultong/stand-in-language
src/PrettyPrint.hs
apache-2.0
4,033
0
15
1,160
2,068
1,040
1,028
97
20
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} module CabalBrew.Options ( textArg , mtextArg , textArgs , textOption , strArg , mstrArg , strArgs , pnameArg , pnameArgs , verArg , mverArg ) where import Control.Applicative import Data...
erochest/cabal-brew
CabalBrew/Options.hs
apache-2.0
2,065
0
12
458
624
320
304
56
2
-- | -- -- Copyright: -- This file is part of the package byline. It is subject to the -- license terms in the LICENSE file found in the top-level -- directory of this distribution and at: -- -- https://github.com/pjones/byline -- -- No part of this package, including this file, may be copied, -- modified...
pjones/byline
Setup.hs
bsd-2-clause
523
0
6
103
38
28
10
4
1
{-# LANGUAGE NoMonomorphismRestriction #-} -- | -- Type-directed partial evaluation, Olivier Danvy, POPL96 -- * <http://www.brics.dk/~danvy/tdpe-ln.pdf> -- module Language.TDPE where import Language.TTF hiding (main) -- HOAS Symantics -- ``black-box'' functions, _compiled_ import Language.ToTDPE -- * // -- * Dem...
suhailshergill/liboleg
Language/TDPE.hs
bsd-3-clause
5,590
4
12
1,210
455
294
161
22
1
module Cis194.Week5.StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where -- Values that may appear in the stack. Such a value will also be -- returned by the stackVM program execution function. data StackVal = IVal Integer | BVal Bool | Void deriving (Eq, Show) -- The various expressions our VM underst...
potatosalad/cis194
src/Cis194/Week5/StackVM.hs
bsd-3-clause
2,240
0
9
750
797
419
378
38
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Snaplet.Authentication.Common where import Control.Lens import qualified Control.Monad.State.Class as State ...
krisajenkins/snaplet-auth
src/Snaplet/Authentication/Common.hs
bsd-3-clause
1,869
0
9
262
423
244
179
51
1
-- | -- Module: $Header$ -- Description: Subcommand aliases; their definition and evaluation -- Copyright: (c) 2018-2020 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: GHC specific language extensions. -- -- Subcommand aliases; their definit...
trskop/command-wrapper
command-wrapper-core/src/CommandWrapper/Core/Config/Alias.hs
bsd-3-clause
2,427
0
11
520
450
276
174
-1
-1
module Rumpus.Systems.Animation where import PreludeExtra import Rumpus.Systems.Shared --import Rumpus.Systems.PlayPause import Rumpus.Systems.Physics import Rumpus.Systems.Controls initAnimationSystem :: (MonadIO m, MonadState ECS m) => m () initAnimationSystem = do registerComponent "ColorAnimation" myColor...
lukexi/rumpus
src/Rumpus/Systems/Animation.hs
bsd-3-clause
4,219
0
14
955
1,135
546
589
-1
-1
-- -- Copyright © 2014-2015 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE OverloadedStrings ...
anchor/synchronise
src/Oneshot.hs
bsd-3-clause
3,274
0
15
789
789
415
374
75
2
module Text.LaTeX.Utils where import Data.Text (pack) import Text.LaTeX import Text.LaTeX.Base.Class import Text.LaTeX.Base.Syntax texComm :: LaTeXC l => String -> [(LaTeX -> TeXArg, l)] -> l texComm cmd xs = liftListL go $ map snd xs where go :: [LaTeX] -> LaTeX go xs2 = TeXComm cmd $ zipWith ($) (map ...
nushio3/authoring
old-src/Text/Authoring/LaTeX/Utils.hs
bsd-3-clause
800
0
11
180
336
179
157
17
1
module Main where import Data.List (intersperse) import qualified Data.Vector.Storable as S import Numeric (showFFloat) import Test.Tasty import LinearTesting as Linear main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Tests" [Linear.properties] ----------------------------------------...
jfischoff/maxent
tests/Main.hs
bsd-3-clause
1,297
0
14
208
272
149
123
16
1
{-# LANGUAGE OverloadedStrings #-} import Hakyll hiding (pandocCompiler) import Site.Types import Site.Compilers import Site.Contexts import Site.Routes import Site.WebSockets import Data.Monoid ((<>)) import GHC.IO.Encoding import System.Environment import Control.Monad (when, void) import System.FilePath (takeFile...
da-x/hakyll-site
src/Site.hs
bsd-3-clause
5,221
0
23
1,490
1,210
603
607
130
3
{-# LANGUAGE QuasiQuotes #-} module Write.Type.Base ( writeBaseType ) where import Spec.Type import Text.InterpolatedString.Perl6 import Text.PrettyPrint.Leijen.Text hiding ((<$>)) import Write.TypeConverter import Write.WriteMonad import Write.Utils isTransparentBaseType :: BaseType -> Bool isTransparentBaseTyp...
oldmanmike/vulkan
generate/src/Write/Type/Base.hs
bsd-3-clause
932
0
10
169
215
117
98
24
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExistentialQuantification #-} module Scheme.Parser ( readExpr , readExprList , parseExpr , parseString , parseAtom , parseNumber , LispVal (..) ) where import Control.Monad.Except import Data.Text (Text) import qualified Data.Text as...
tmcgilchrist/scheme
src/Scheme/Parser.hs
bsd-3-clause
2,009
0
12
484
628
314
314
63
3
module Equivalence where import Regexp equiv :: Ord t => [t] -> RE t -> RE t -> Bool equiv sigma r s = rewrite sigma [] [(r, s)] rewrite :: Ord t => [t] -> [(RE t, RE t)] -> [(RE t, RE t)] -> Bool rewrite sigma seen [] = True rewrite sigma seen (p : worklist) | p `elem` seen = rewrite sigma seen worklist re...
peterthiemann/cftools
src/Equivalence.hs
bsd-3-clause
2,101
0
13
604
1,081
571
510
42
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DataKinds #-} -- -- Monad.hs --- Bit field modification Monad. -- -- Copyright (C) 2013, Galois, Inc. -- All Rights Reserved. -- module Ivory.Language.BitData.Mo...
Hodapp87/ivory
ivory/src/Ivory/Language/BitData/Monad.hs
bsd-3-clause
2,855
0
11
577
743
391
352
50
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] ja [@ISO639-2B@] jpn [@ISO639-3@] jpn [@Native name@] 日本語 [@English name@] Japanese -} module Text.Numeral.Language.JPN ( -- *...
telser/numerals
src/Text/Numeral/Language/JPN.hs
bsd-3-clause
8,900
0
17
3,041
2,395
1,356
1,039
186
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Network.Qiita.Types ( QiitaError(..) , Auth(..) , RateLimit(..) , User(..) , Tag(..) , TagA(..) , FollowingTag(..) , FollowingUser(..) , PostItem(..) , UpdateItem(..) , PostTag(..) , QiitaContext(..) , Pagenation(..) ,...
jabaraster/network-qiita
src/Network/Qiita/Types.hs
bsd-3-clause
15,101
0
45
6,563
2,720
1,555
1,165
306
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.Fence -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : port...
haskell-opengl/OpenGLRaw
src/Graphics/GL/NV/Fence.hs
bsd-3-clause
844
0
5
127
85
61
24
17
0
{-# LANGUAGE FlexibleContexts, LambdaCase, RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} import Graphics.UI.GLFW.Pal import Graphics.GL.Pal import Graphics.VR.Pal import Control.Monad import Control.Monad.State import Control.Monad.Reader import Control.Lens.Extra import Data.Map (Map) import qualified Data.Map...
lukexi/bullet-mini
test/Cubes.hs
bsd-3-clause
4,711
10
35
1,734
1,169
567
602
-1
-1
module Six (six) where import Data.List import Control.Monad import GHC.Exts six = do input <- lines <$> readFile "data/six.txt" let result1 = (head . head . reverse . sortWith length . group . sort) <$> transpose input putStrLn $ show result1 let result2 = (head . head . sortWith length . group . s...
alicemaz/advent2016
Six.hs
bsd-3-clause
373
0
16
85
143
70
73
10
1
module Main where -- | dltor <meta-info file> [OPTIONS] -- -s, --seed -- ; seed after completion -- -g, --greedy -- ; enable greedy mode -- -p, --progress -- ; show progress -- -v, --verbose -- ; enable verbose mode -- -o OUTPUT, --output OUTPUT -- ; set output directory (default i...
nytopop/silver
example/dltor.hs
bsd-3-clause
783
0
13
187
146
84
62
15
2
{-# LANGUAGE FlexibleInstances #-} module Language.Rsc.AST.Annotations where import Control.Applicative import Control.Arrow import Control.Monad.State hiding (mapM) import Data.Traversable import Language.Rsc.AST.Syntax import Language.Rsc.Locations imp...
UCSD-PL/RefScript
src/Language/Rsc/AST/Annotations.hs
bsd-3-clause
4,401
0
11
1,768
1,421
698
723
108
1
module Math.Polynomial.Types where import GHC.Real import Math.Polynomial.Operations import Test.QuickCheck newtype P a = P [a] deriving Show instance Arbitrary a => Arbitrary (P a) where arbitrary = P <$> arbitrary shrink (P as) = P <$> shrink as polyVar :: Num a => P a polyVar = P [0, 1] degree :: P ...
bhamrick/hsmath
Math/Polynomial/Types.hs
bsd-3-clause
1,958
0
12
530
1,117
557
560
54
2
module Test.Language.Javascript.Minify ( testMinifyExpr , testMinifyStmt , testMinifyProg , testMinifyModule ) where import Control.Monad (forM_) import Test.Hspec import Language.JavaScript.Parser hiding (parseModule) import Language.JavaScript.Parser.Grammar7 import Language.JavaScript.Parser.Le...
alanz/language-javascript
test/Test/Language/Javascript/Minify.hs
bsd-3-clause
14,408
0
17
4,148
2,795
1,388
1,407
242
1
module Client ( connect , send , nextTime ) where import Network import System.IO connect :: HostName -> PortNumber -> IO Handle connect host port = do handle <- connectTo host (PortNumber port) return handle send :: Handle -> String -> IO () send handle xs = do hPutStr handle ( xs ++ "\n" ) ...
Ni-Br/luminifu
brain/Client.hs
mit
448
0
10
125
158
77
81
18
1
{- | Module : $Header$ Description : Interface to the Leo II theorem prover. Copyright : (c) Jonathan von Schroeder, DFKI Bremen 2012 License : GPLv2 or higher, see LICENSE.txt Maintainer : Jonathan von Schroeder <jonathan.von_schroeder@dfki.de> Stability : provisional Portability : non-portable ...
keithodulaigh/Hets
THF/ProveLeoII.hs
gpl-2.0
1,519
4
12
429
300
164
136
29
3
module Holo.Instances.Widgety where import Data.Text (Text) import Data.Typeable (Typeable) import qualified Graphics.Cairo as Cr import Graphics.Flatland import {-# SOURCE #-} Holo.Classes imp...
deepfire/mood
src/Holo/Instances/Widgety.hs
agpl-3.0
1,069
2
9
309
321
161
160
-1
-1
applyTwice :: (a -> a) -> a -> a applyTwice f x = f (f x)
tokyo-jesus/university
src/haskell/higherOrderFunctions/applyTwice.hs
unlicense
58
0
7
16
40
20
20
2
1
{-# LANGUAGE OverloadedStrings #-} module KAT_PubKey.Rabin (rabinTests) where import qualified Data.ByteString as B import Crypto.Hash import Crypto.Number.Serialize (os2ip) import qualified Crypto.PubKey.Rabin.Basic as BRabin import qualified Crypto.PubKey.Rabin.Modified as MRabin import qualifie...
vincenthz/cryptonite
tests/KAT_PubKey/Rabin.hs
bsd-3-clause
10,097
0
14
1,214
1,507
819
688
99
1
{-# LANGUAGE CPP #-} module Lang.Hask.GHCPlugin where import FP import UniqSupply import Lang.Hask.CPS import CoreMonad import HscTypes import qualified CoreSyn as H import Lang.Hask.Compat import Lang.Hask.Pretty () import Outputable #if MIN_VERSION_base(4,8,0) import Plugins #endif plugin :: Plugin plugin = defaul...
FranklinChen/maam
src/Lang/Hask/GHCPlugin.hs
bsd-3-clause
912
0
14
182
296
152
144
-1
-1
module Deriving.Text(deriveRead,deriveShow) where import Deriving.Type import Deriving.Util import FrontEnd.HsSyn import FrontEnd.Desugar import FrontEnd.Syn.Q import FrontEnd.Warning import Name.Names import Util.Std fsts = map fst snds = map snd deriveRead :: Derive -> Module -> Data -> Q HsDecl deriveRead der mod...
hvr/jhc
src/Deriving/Text.hs
mit
4,402
0
25
1,203
1,973
982
991
-1
-1
module Coding where data Tree = Leaf Char Int | Node Int Tree Tree -- The types of bits, Huffman codes and tables of Huffman codes. data Bit = L | R deriving (Eq,Show) type HCode = [Bit] type Table = [ (Char,HCode) ] codeMessage :: Table -> [Char] -> HCode codeMessage tbl = concat . map (lookupTable tbl) -- lo...
kmate/HaRe
old/testing/clones/Coding.hs
bsd-3-clause
1,079
8
9
269
332
177
155
22
4
{-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE ImplicitParams #-} -- Tests impredivative polymorphism with left-to-right -- flow information; see the uses of "$" module TestIP where import Control.Monad.ST import Data.STRef -- Here's a use of runST with ($) foo = runST $ (do { v <- newSTRef 0; readSTRef v }) -- Here'...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/uncat/tc222.hs
mit
850
0
10
198
121
76
45
11
1
{-# LANGUAGE NamedFieldPuns, RecordWildCards, BangPatterns #-} module Distribution.Server.Features.StaticFiles ( initStaticFilesFeature ) where import Distribution.Server.Framework import Distribution.Server.Framework.Templating import Text.XHtml.Strict (Html, toHtml, anchor, (<<), (!), href, paragraph) import...
ocharles/hackage-server
Distribution/Server/Features/StaticFiles.hs
bsd-3-clause
5,553
0
16
1,367
1,218
652
566
100
5
module Poly0 () where import Language.Haskell.Liquid.Prelude myabs x = if x `gt` 0 then x else 0 `minus` x ---------------------------------------------------------- myid3 x y = y prop_id6 = liquidAssertB (x' `geq` 10) where x' = myid3 [] $ myabs n n = choose 0
abakst/liquidhaskell
tests/neg/poly2-degenerate.hs
bsd-3-clause
284
0
9
65
97
56
41
7
2
{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -O -fno-warn-redundant-constraints #-} module Gadt17_help ( TernOp (..), applyTernOp ) where data TypeWitness a where TWInt :: TypeWitness Int TWBool :: TypeWitness Bool TWFloat :: TypeWitness Float TWDouble :: Ty...
ezyang/ghc
testsuite/tests/gadt/Gadt17_help.hs
bsd-3-clause
1,116
0
14
412
363
195
168
24
2
{-# LANGUAGE TypeFamilies #-} module Kind where class C (a :: * -> *) where type T a foo :: a x -> T a foo = undefined
ghc-android/ghc
testsuite/tests/indexed-types/should_compile/Kind.hs
bsd-3-clause
125
0
8
34
48
27
21
6
1
{-# LANGUAGE OverloadedStrings #-} module Sqarkov.LogParse ( LogEvent (..), Timestamp, Nick, Content , logGram7s, logEvents, logEvent ) where import Control.Applicative import Control.Monad import Data.Attoparsec.Text as AP import Data.Text (Text) import qualified Data.Text as Text import Sqarkov.NGram data L...
ion1/sqarkov
src/Sqarkov/LogParse.hs
isc
2,553
0
15
748
827
425
402
64
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Eventful.SerializerSpec (spec) where import Data.Dynamic import Data.Typeable (typeOf) import GHC.Generics import Test.Hspec import Eventful.Serializer import Eventful.TH.SumTypeSerializer data EventA = EventA deriving (Show, Eq) data EventB = E...
jdreaver/eventful
eventful-core/tests/Eventful/SerializerSpec.hs
mit
2,036
0
17
328
564
283
281
43
1