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 DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cloudtrail/gen/Network/AWS/CloudTrail/StartLogging.hs
mpl-2.0
2,876
0
9
649
356
217
139
48
1
{-# LANGUAGE NoImplicitPrelude, MagicHash, TypeOperators, DataKinds, TypeFamilies, FlexibleContexts, MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : Java.Net -- Copyright : (c) Jyothsna Srinivas 2017 -- -- License : BSD-style (see ...
pparkkin/eta
libraries/base/Java/Net.hs
bsd-3-clause
5,665
63
10
882
1,366
721
645
-1
-1
{-# LANGUAGE GADTs, DataKinds, KindSignatures, TypeFamilies, TypeOperators, UndecidableInstances, ScopedTypeVariables, FlexibleContexts #-} module Semantic where import Type import Data.Proxy import GHC.TypeLits import qualified Reactive.Sodium.Denotational as D import Reactive.Sodium.Denotational (S, C) dat...
kevintvh/sodium
common-tests/Semantic.hs
bsd-3-clause
1,625
0
12
400
654
346
308
38
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Syntax.Strokes.Haskell -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- Produces 'Str...
TOSPIO/yi
src/library/Yi/Syntax/Strokes/Haskell.hs
gpl-2.0
6,545
0
17
1,989
2,210
1,116
1,094
113
16
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} -- | A MySQL backend for @persistent@. module Database.Persist.MySQL ( withMySQLPool , withMySQLConn , createMySQLPool , module Database.Persist.Sql , MySQL.ConnectInfo(..) , MySQLBase.SSLInfo(..) ...
jasonzoladz/persistent
persistent-mysql/Database/Persist/MySQL.hs
mit
40,047
12
37
13,525
9,453
4,963
4,490
-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="pt-BR"> <title>SOAP Support Add-on</title> <maps> <homeID>soap</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_pt_BR/helpset_pt_BR.hs
apache-2.0
965
77
67
157
413
209
204
-1
-1
{-# LANGUAGE FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Data.ByteString.Lazy.Lens -- Copyright : (C) 2012-2015 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability ...
rpglover64/lens
src/Data/ByteString/Lazy/Lens.hs
bsd-3-clause
4,308
0
6
622
296
213
83
28
1
module Foo where moo = poo z z where z = blerg True blerg True = Nothing {-@ poo :: x:Maybe a -> {v: Maybe a | v = x } -> Bool @-} poo :: Maybe a -> Maybe a -> Bool poo x y = True
ssaavedra/liquidhaskell
tests/todo/maybe4.hs
bsd-3-clause
208
0
7
76
62
32
30
6
1
{-# LANGUAGE BangPatterns #-} -- | Get markdown templates. module HL.Controller.Markdown where import HL.Controller import HL.Model.Markdown import HL.View import HL.View.Markdown -- | Render a simple markdown page. markdownPage :: [Route App] -> Text -> FilePath -> C (Html ()) markdownPage crumbs t name = do con...
josefs/hl
src/HL/Controller/Markdown.hs
bsd-3-clause
390
0
11
66
110
59
51
10
1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ScreenCorners -- Copyright : (c) 2009 Nils Schweinsberg -- License : BSD3-style (see LICENSE) -- -- Maintainer : Nils Schweinsberg <mail@n-sch.de> -- Stability ...
adinapoli/xmonad-contrib
XMonad/Hooks/ScreenCorners.hs
bsd-3-clause
5,455
0
15
1,385
959
526
433
75
2
-- Test the flage `force-no-intermediates` (issue #4114) module Main (main) where import T4114aSub keep, nokeep :: [FilePath] keep = ["T4114aSub.hi", "T4114aSub.o", "T4114a.hi", "T4114a.o"] nokeep = [ ] main :: IO () main = do mapM_ assertNoKeep nokeep mapM_ assertKeep keep
ezyang/ghc
testsuite/tests/driver/T4114a.hs
bsd-3-clause
285
0
7
50
78
45
33
9
1
{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Pack -- Copyright : (c) The University of Glasgow 1997-2002 -- License : see libraries/base/...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Pack.hs
bsd-3-clause
3,178
0
13
721
766
409
357
54
2
module NoPatternSynonyms where pattern P :: G Int
olsner/ghc
testsuite/tests/parser/should_fail/NoPatternSynonyms.hs
bsd-3-clause
51
0
6
9
14
8
6
-1
-1
{-# LANGUAGE ExistentialQuantification #-} module Boot where import A data Data = forall n. Class n => D n
urbanslug/ghc
testsuite/tests/ghci/prog006/Boot2.hs
bsd-3-clause
109
0
7
21
29
17
12
4
0
-- !!! deriving Enum on d. type with nullary constructors module ShouldSucceed where data AD = A | B | C | D deriving (Enum)
wxwxwwxxx/ghc
testsuite/tests/deriving/should_compile/drv010.hs
bsd-3-clause
126
0
6
26
28
18
10
2
0
-- !!! dcon hiding (in the presence of identically named tycon.) -- (test contributed by Ross Paterson.) module M where import Mod132_B foo = Foo
hferreiro/replay
testsuite/tests/module/mod132.hs
bsd-3-clause
147
0
4
26
14
10
4
3
1
-- Testing showInt, lightly. module Main(main) where import Numeric showSignedInt :: Integral a => a -> String showSignedInt x = showSigned (showInt) 0 x "" main = do putStrLn (showInt (343023920121::Integer) []) putStrLn (showInt (3430239::Int) []) putStrLn (showInt (1212 :: Int) []) putStrLn (showSi...
beni55/ghcjs
test/pkg/base/Numeric/num002.hs
mit
566
0
12
104
191
101
90
12
1
module Paths_haskell ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) -...
momo9/seven-lang
haskell/dist/build/autogen/Paths_haskell.hs
mit
1,343
0
10
177
356
202
154
28
1
module HCraft.Math ( module Math , fract ) where import HCraft.Math.Matrix as Math import HCraft.Math.Shapes as Math import HCraft.Math.Vector as Math -- |Fractional part of a number fract :: RealFrac a => a -> a fract x = x - fromIntegral (floor x :: Int)
nandor/hcraft
HCraft/Math.hs
mit
267
0
8
55
80
49
31
9
1
module Main where import System.Console.Style import Control.Monad.Trans import Data.Foldable import Text.Printf import Control.Monad.Trans.State.Strict import System.IO (stdout) ansiColors :: [Color] ansiColors = [ DefaultColor , Black , Red , Green , Yellow ...
minad/console-style
Example.hs
mit
4,253
0
21
1,160
1,656
798
858
117
2
-- Knapsack non path tracking, lazy evaluation module Main where import System.Random import System.Environment import Data.Array import Nilsson knapsack :: Int -> Weight -> Int -> [(Value,Weight)] knapsack n wc s = ( sol!(n) ) where sol :: Array Int [(Value,Weight)] sol = array (1,n) ([(1, ...
jcsaenzcarrasco/MPhil-thesis
knp.hs
mit
792
0
18
194
382
217
165
16
2
module Game.GBA.Boot where import Game.GBA.Monad import Game.GBA.Register bootForTest :: ProcessorMode -> GBA s () bootForTest mode = do writeStatus statusB UserMode writeStatus statusT mode
jhance/gba-hs
src/Game/GBA/Boot.hs
mit
201
0
7
34
59
31
28
7
1
{-# LANGUAGE OverloadedStrings #-} module Oden.Parser.ParsePackageSpec where import Test.Hspec import Oden.Parser import Oden.SourceInfo import Oden.Syntax import Oden.Assertions src :: Line -> Column -> SourceInfo src l c = SourceInfo (Position "<stdin>" l c) spec...
oden-lang/oden
test/Oden/Parser/ParsePackageSpec.hs
mit
2,180
0
13
442
538
275
263
48
1
{-# OPTIONS_GHC -Wall #-} -- Naive fibonacci - Only usable for very small n (<30) naive_fib :: Integer -> Integer naive_fib 0 = 0 naive_fib 1 = 1 naive_fib n = naive_fib (n-1) + naive_fib (n-2) fibs1 :: [Integer] fibs1 = map naive_fib [0..] -- Memoized fibonacci - Never re-evaluate thunks memoized_fib :: Int -> Inte...
vaibhav276/haskell_cs194_assignments
lazyness/Fibancci.hs
mit
505
0
10
113
179
96
83
14
3
module Main where import Char import Stack import Grammar import Parser
SamyNarrainen/SimpleGrammarParser
Haskell/Main.hs
mit
73
0
3
12
16
11
5
5
0
module WorkerSpec ( main , spec ) where import SpecHelper import Worker import Data.Time.Duration main :: IO () main = hspec spec spec :: Spec spec = withApp $ describe "archivableCommands" $ do it "does not find recent commands" $ do now <- liftIO getCurrentTime token...
mrb/tee-io
test/WorkerSpec.hs
mit
2,406
0
19
1,121
497
266
231
57
1
module Main where import Test.Hspec import qualified Shapes.Linear.TemplateSpec main :: IO () main = hspec $ describe "TemplateSpec" Shapes.Linear.TemplateSpec.spec
ublubu/shapes
shapes-math/test/Spec.hs
mit
168
0
7
22
44
26
18
5
1
mult' :: (Num a) => a -> a -> a -> a mult' x y z = x * y * z mult'' :: (Num a) => a -> a -> a -> a mult'' = \x -> \y -> \z -> x * y * z main = do print $ mult' 1 2 3 print $ mult'' 1 2 3
fabioyamate/programming-in-haskell
ch04/ex06.hs
mit
197
0
9
72
134
69
65
7
1
module GHCJS.DOM.IDBIndex ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/IDBIndex.hs
mit
38
0
3
7
10
7
3
1
0
{-# LANGUAGE OverloadedStrings #-} module WeatherSpec (spec) where import Weather import Test.Hspec spec :: Spec spec = do describe "getEmoji" $ do it "returns ⁉ on undefined" $ do getEmoji "lol" `shouldBe` "\8265\65039" it "returns ⁉ if code length is < 2" $ do getEmoji ...
julienXX/weather
test/WeatherSpec.hs
mit
1,031
0
14
293
232
114
118
24
1
module Oden.Assertions where import Text.PrettyPrint.Leijen hiding ((<$>)) import Test.Hspec isLeft :: Either a b -> Bool isLeft (Left _) = True isLeft _ = False isRight :: Either a b -> Bool isRight (Right _) = True isRight _ = False shouldSucceed :: (Eq a, Show a, Show e) => Ei...
AlbinTheander/oden
test/Oden/Assertions.hs
mit
1,677
0
10
331
659
351
308
29
1
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-} module GitHub.Types where import Control.Applicative import Control.Monad.RWS.Strict import Data.ByteString.Char8 (ByteString, append, pack) import Data.Text (Text) import Network.HTTP.Conduit data APILocation = GitHub | Enterprise String githubConfig :: ...
SaneApp/github-api
src/GitHub/Types.hs
mit
1,548
0
17
318
417
238
179
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- Task ventilator -- Binds PUSH socket to tcp://localhost:5557 -- Sends batch of tasks to workers via that socket module Main where import Control.Monad import qualified Data.ByteString.Char8 as BS import System.ZMQ4.Mo...
soscpd/bee
root/tests/zguide/examples/Haskell/taskvent.hs
mit
1,170
0
15
338
230
113
117
24
1
{-# LANGUAGE OverloadedStrings #-} module Tests.Text.XML.Expat.Mapping ( main, tests ) where import Control.Error import Data.ByteString (ByteString) import Data.Maybe import Test.Tasty import Test.Tasty.HUnit import Text.XML.Expat.Tree main :: IO (...
tel/xml-mapping
tests/Tests/Text/XML/Expat/Mapping.hs
mit
690
0
12
164
181
100
81
18
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell, CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PatternGuards #-} -- | Static file serving for WAI. module Network.Wai.Application.Static ( -- * WAI application staticApp -- ** Default Settings ...
rgrinberg/wai
wai-app-static/Network/Wai/Application/Static.hs
mit
10,080
0
21
2,834
2,348
1,226
1,122
190
10
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Rievaulx.Web ( runServer ) where import qualified Data.Aeson as Aeson import qualified Data.Text as T import Network.HTTP.Types (status200, status404) import Network.Wai import Network.Wai.Handler.Warp (run) impo...
ryankask/rievaulx
src/Rievaulx/Web.hs
mit
1,853
0
15
484
456
250
206
41
2
import Data.List data Edge = Edge {label :: Char, from :: Int, to :: Int} instance Show Edge where show e = show (label e, from e, to e) data RE = Plus RE RE | Concat RE RE | Closure RE | Single Char | Epsilon | Empty deriving Eq isPlus :: RE -> Bool isPlus (Plus _...
jwvg0425/HaskellScratchPad
src/dfare.hs
mit
4,794
0
17
1,561
2,355
1,213
1,142
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Data.Graph.Typed -- Copyright : (c) Anton Lorenzen, Andrey Mokhov 2016-2022 -- License : MIT (see the file LICENSE) -- Maintainer : anfelor@posteo.de, andrey.mokhov@gmail.com -- Stability : unstable -- -- __Alga__ is...
snowleopard/alga
src/Data/Graph/Typed.hs
mit
9,042
0
12
2,620
1,068
644
424
46
1
module Parser where type Parser a = String -> Maybe (a, String) char :: Parser Char char [] = Nothing char (x:xs) = Just (x, xs) alt :: Parser a -> Parser a -> Parser a (p `alt` q) xs = case (p xs) of Nothing -> q xs x -> x (#) :: Parser a -> Parser b -> Parser (a, b) (p # q) xs = case (p xs) of ...
iain-logan/MU-Puzzle
Parser.hs
mit
1,392
5
14
503
570
299
271
32
3
module ACME.Yes.PreCure5.Profiles ( PreCure5(..) , allPrecures , introducesHerselfAs , transformationPhraseOf , metamorphoseOf ) where import ACME.Yes.PreCure5.Class import qualified Data.Set as S data PreCure5 = CureDream | CureRouge | CureLemonade | CureMint | CureAqua deriving (Show, Bounded, Enum...
igrep/yes-precure5-command
ACME/Yes/PreCure5/Profiles.hs
mit
1,219
0
13
168
211
118
93
26
1
-- file: ch09/RecursiveContents.hs module RecursiveContents (getRecursiveContents) where import Control.Monad (forM) import System.Directory (doesDirectoryExist, getDirectoryContents) import System.FilePath ((</>)) getRecursiveContents :: FilePath -> IO [FilePath] getRecursiveContents topdir = do names <- getDirec...
Numberartificial/workflow
haskell-first-principles/src/RW/CH9/RecursiveContents.hs
mit
781
0
15
146
236
122
114
19
2
module Arbre.Mutation ( applyMutation ) where import Arbre.Context import Arbre.Expressions applyMutation :: Expression -> Context -> Context applyMutation (Mutation Define (Symdef sym) value) context = bindPair Dyn context (sym, value) applyMutation (Mutation Set (Symdef sym) value) context = bindPair Dyn cont...
blanu/arbre
Arbre/Mutation.hs
gpl-2.0
337
0
9
51
112
60
52
10
1
{-# LANGUAGE OverloadedStrings #-} import Types import Mario import NeuralNetwork hiding (run) import Emulator (saveAsFM2) import Control.Concurrent import Control.Exception import Control.Monad import Data.Binary import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import Data.ByteString....
mdietz94/MAAX
app/src/Master.hs
gpl-2.0
4,952
0
17
1,139
1,818
911
907
121
4
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, OverloadedStrings, GADTs, FlexibleContexts #-} module Model.Fields where import Control.Applicative (pure) import Data.Aeson import Data.Maybe (fromJust) import Data.Text (pack, unpack) import Network.URI (URI, uriToString, parseURI) ...
bitraten/hands
src/Model/Fields.hs
gpl-3.0
963
0
9
205
246
131
115
-1
-1
module Hardware where import HardwareTypes import Data.IORef initBoosters = do controllerImpl <- newIORef (ControllerImpl "" Online 0 (map fromIntegral [1..])) return $ ControllerMock controllerImpl reportValue v = print ("reported: " ++ show v) storeValue v = print ("stored: " ++ show v) readTemperature (Con...
graninas/Haskell-Algorithms
Tests/ArrowsAndFrees/Hardware.hs
gpl-3.0
633
0
13
116
229
109
120
15
1
module Handler.Experiment where import Import import Data.Time import Crypto.PasswordStore import Data.Text.Encoding getExperimentR :: Text -> Handler Value getExperimentR subjNumber = do mexp <- runDB $ do subj <- getBy $ UniqueSubject subjNumber case subj of Nothing -> return Nothin...
sgillis/prestapi
src/Handler/Experiment.hs
gpl-3.0
2,742
0
26
894
838
410
428
74
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Create.hs
mpl-2.0
3,948
0
15
897
493
290
203
76
1
module Main where import System.Environment(getArgs) import Data.List(sort) import Control.Monad(join) main :: IO() main = pLn $ (take 3 . reverse . sort . fmap read <$> getArgs :: IO[Int]) pLn :: (Show a) => IO[a] -> IO() pLn x = join $ fmap f x where f :: (Show a) => [a] -> IO() f xs = sequence_ $ fmap (putStr...
dkpsk/aoj
0-1/app.hs
unlicense
334
0
11
71
185
98
87
10
1
module Helpers.ListHelpers (allDistinct, cartesianProduct, concatReplicate, firstDifferences, reciprocalSum, runLengths, zipWithPadding) where import Data.List (group) import Data.Set (Set) import qualified Data.Set as Set -- concatReplicate is to replicate as concatMap is to map concatReplicate :: Int -> [a] -> [a] co...
peterokagey/haskellOEIS
src/Helpers/ListHelpers.hs
apache-2.0
2,410
0
10
566
571
318
253
27
2
{-# LANGUAGE CPP , ScopedTypeVariables #-} module Main where import qualified Foreign.CUDA.Driver as CUDA import System.IO.MMap ( mmapFilePtr , munmapFilePtr , Mode(..) ) import Data.Maybe (catMaybes) import Text.Printf (printf) import System.Directory(doesFileExist) import Foreign (Word8, plus...
SKA-ScienceDataProcessor/RC
MS2/lib/DSL_Gridder/binner/RunGridder1.hs
apache-2.0
2,389
3
17
588
708
376
332
49
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QAbstractFileEngine.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine generate...
keera-studios/hsQt
Qtc/Enums/Core/QAbstractFileEngine.hs
bsd-2-clause
15,120
18
22
3,215
4,137
2,096
2,041
433
1
{-# LANGUAGE FlexibleInstances, TypeFamilies, TypeOperators, DataKinds , UndecidableInstances #-} -- | Functions to replace the numerical functions from the Prelude. -- See "Units" for the documentation of '(+)', '(-)', '(*)' and '(/)'. -- -- This module includes Num, Fractional, Floating instances for '(:@)', wh...
haasn/units
src/Units/Prelude.hs
bsd-3-clause
2,904
4
10
747
969
551
418
69
1
import Graphics.X11.Turtle import Control.Monad main :: IO () main = do f <- openField t <- newTurtle f shape t "turtle" replicateM_ 4 $ do forward t 100 left t 90 replicateM_ 4 $ do backward t 100 left t 90 silentundo t 4 left t 90 replicateM_ 4 $ do backward t 100 left t 90 onkeypress f $ return...
YoshikuniJujo/xturtle_haskell
tests/testSilentUndo.hs
bsd-3-clause
345
0
10
89
170
72
98
20
1
module Function where import Control.Monad (liftM2, (<=<)) import Data.Functor.Classes (liftEq2) import qualified Data.Matrix as Mx import qualified Data.Vector as Vec import Library data Function = Function { showFunction :: String , runFunction :: Vector -...
hrsrashid/nummet
lib/Function.hs
bsd-3-clause
2,726
0
14
621
1,113
575
538
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} -- | News page view. module HL.V.News where import HL.V import HL.V.Template -- | News view. newsV :: Html -> FromBlaze App newsV inner = template [] "News" (\_ -> container (do row (span12 (do h1 "News")) ...
chrisdone/hl
src/HL/V/News.hs
bsd-3-clause
354
0
18
116
89
48
41
12
1
{-# LANGUAGE PatternGuards #-} module IRTS.CodegenJavaScript (codegenJavaScript, JSTarget(..)) where import Idris.AbsSyntax hiding (TypeCase) import IRTS.Bytecode import IRTS.Lang import IRTS.Simplified import IRTS.CodegenCommon import Core.TT import Paths_idris import Util.System import Control.Arrow import Data.Ch...
christiaanb/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
24,752
0
24
8,068
9,274
4,687
4,587
619
4
module BurntSushiSpec ( main , spec ) where import SpecHelper () import Test.Hspec import Text.Toml.Parser import Control.Monad (forM_) import Data.Aeson hiding (json) import Data.Aeson.Encode.Pretty import System.FilePath import System.FilePath.Glob (compile, globDir1) import qualified Data.ByteString.L...
pbrisbin/toml-parse
test/BurntSushiSpec.hs
bsd-3-clause
2,583
0
22
1,104
623
327
296
63
4
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 A ``lint'' pass to check for Core correctness -} {-# LANGUAGE CPP #-} module CoreLint ( lintCoreBindings, lintUnfolding, lintPassResult, lintInteractiveExpr, lintExpr, lintAnnots, -- ** Debug output ...
ezyang/ghc
compiler/coreSyn/CoreLint.hs
bsd-3-clause
100,021
360
21
29,002
19,680
10,328
9,352
-1
-1
Tried to remove Constructors from a Type that exposed all Constructors. This does not work because other Constructors are not available for HsImport. Thus, this operation can not be performed. Example: import Foo.Bar (Baz(..)) > hsimport --hiding -m Foo.Bar -s Baz -w A The correct solution would be, assuming Constru...
dan-t/hsimport
tests/goldenFiles/SymbolTest51.hs
bsd-3-clause
481
21
8
82
201
97
104
-1
-1
{- | Module : SAWScript.Crucible.JVM.Override Description : Override matching and application for JVM License : BSD3 Maintainer : atomb Stability : provisional -} {-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDe...
GaloisInc/saw-script
src/SAWScript/Crucible/JVM/Override.hs
bsd-3-clause
43,174
337
30
11,748
9,604
4,993
4,611
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Client.MenuFrameworkS where import Control.Lens (makeLenses) import qualified Data.Vector as V import Client.MenuItem import Types makeLenses ''MenuFrameworkS newMenuFrameworkS :: MenuFrameworkS newMenuFrameworkS = MenuFrameworkS { _mfX ...
ksaveljev/hake-2
src/Client/MenuFrameworkS.hs
bsd-3-clause
521
0
7
167
103
65
38
17
1
module GeekBar.Layout (layout) where import GeekBar.Node import GeekBar.Props import Control.Lens import qualified Control.Monad.State.Strict as ST -- | Layout nodes -- Updates content{x,y} to its correct values based on position of upper-left -- corner and properites of the node. layout :: (Float, Float) -> Node -...
aslpavel/geekbar
lib/GeekBar/Layout.hs
bsd-3-clause
4,317
0
21
1,836
1,333
693
640
-1
-1
module TypedPerl.PerlRecs ( unionRec ) where import qualified Data.Map as M import TypedPerl.Types unionRec :: Ord k => M.Map k PerlType -> PerlRecs k -> PerlRecs k unionRec m r = r {recMap = (M.union (recMap r) m)}
hiratara/TypedPerl
src/TypedPerl/PerlRecs.hs
bsd-3-clause
221
0
10
43
91
49
42
6
1
module Main where import qualified EFA.Example.Topology.Tripod.Given as TripodGiven import qualified EFA.Flow.State.Absolute as StateEqSys import qualified EFA.Flow.State.Quantity as StateFlow import qualified EFA.Flow.Sequence.Absolute as EqSys import qualified EFA.Flow.Draw as Draw import EFA.Utility.Async (concur...
energyflowanalysis/efa-2.1
demo/stateFlow/Main.hs
bsd-3-clause
883
0
13
159
195
113
82
21
1
module Day21 (part1,part2,test1,test2,testInstructions1, doInstruction, reverseDoInstruction, Instruction(..)) where import Data.List import Data.Maybe import Text.Trifecta import Control.Applicative data Instruction = SwapPos Int Int | SwapLet Char Char | Rotat...
z0isch/aoc2016
src/Day21.hs
bsd-3-clause
4,864
2
27
1,309
1,577
789
788
92
1
module Web.XING ( module Web.XING.Auth , module Web.XING.API , module Web.XING.Types -- * Calls , module Web.XING.Calls.IdCard , module Web.XING.Calls.User -- * Common used functions (re-exports) , liftIO , withManager ) where import Web.XING.Auth import Web.XING.API impor...
JanAhrens/xing-api-haskell
lib/Web/XING.hs
bsd-3-clause
485
0
6
97
112
78
34
16
0
{-# OPTIONS_GHC -Wall -fwarn-tabs #-} {-# LANGUAGE CPP, DeriveDataTypeable #-} ---------------------------------------------------------------- -- 2011.04.17 -- | -- Module : Control.Concurrent.STM.TBMChan1 -- Copyright : Copyright (c) 2011 wren gayle romano -...
bitemyapp/stm-chans
test/bench/Control/Concurrent/STM/TBMChan1.hs
bsd-3-clause
8,127
0
17
2,004
1,363
703
660
133
3
{-# LANGUAGE RecursiveDo, RankNTypes #-} module Mire.Reactive.Main where import Mire.Prelude import Mire.Plugin import Mire.Data.Flow import Mire.Reactive.Utils import Mire.Reactive.STM import Mire.Hint import Mire.Pipes import Reactive.Banana import Reactive.Banana.Frameworks import System.IO import Network impo...
ellej/mire
src/Mire/Reactive/Main.hs
bsd-3-clause
6,140
0
19
1,523
1,548
779
769
-1
-1
module BasicTest where import qualified Config.Dyre as Dyre import Config.Dyre.Relaunch import Control.Monad import System.IO data Config = Config { message :: String, errorMsg :: Maybe String } defaultConfig :: Config defaultConfig = Config "Basic Test Version 1.0" Nothing showError :: Config -> String -> Config ...
bitemyapp/dyre
Tests/basic/BasicTest.hs
bsd-3-clause
820
0
10
167
256
138
118
20
1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE Strict #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.Vulkan.CommandBuffer where import Graphics.Vulkan.Device( VkDevice(..) ) import Graphics.Vulkan.Pass( VkFramebuffer(..) ...
oldmanmike/vulkan
src/Graphics/Vulkan/CommandBuffer.hs
bsd-3-clause
7,862
0
16
2,578
1,584
904
680
-1
-1
module Data.Geo.GPX.Lens.MagvarL where import Data.Geo.GPX.Type.Degrees import Data.Lens.Common class MagvarL a where magvarL :: Lens a (Maybe Degrees)
tonymorris/geo-gpx
src/Data/Geo/GPX/Lens/MagvarL.hs
bsd-3-clause
157
0
9
22
48
29
19
5
0
-- Chapter2Exercise1Part1.hs module Chapter2Exercise1Part1 where -- Exercise 1. -- Rewrite parseNumber, without liftM, using -- 1. do-notation import Control.Monad import System.Environment import Text.ParserCombinators.Parsec hiding (spaces) data LispVal = Atom String | List [LispVal] | D...
EFulmer/haskell-scheme-wikibook
src/Exercises/Ch2/Pt1/Ex1Pt1.hs
bsd-3-clause
1,604
0
11
497
440
222
218
47
3
module Physics.Falling.Collision.Detection.PlaneImplicitShapeCollisionDetector ( collidePlaneImplicitShape ) where import Physics.Falling.Math.Transform import Physics.Falling.Shape.ImplicitShape import Physics.Falling.Shape.Plane import Physics.Falling.Collision.Collision collidePlaneImplicitShape :: (ImplicitShape ...
sebcrozet/falling
Physics/Falling/Collision/Detection/PlaneImplicitShapeCollisionDetector.hs
bsd-3-clause
1,121
0
10
458
205
116
89
19
2
module TypeBug5 where f :: [[String]]->[String] f (x:xs) = x ++ filter (not(eqString unwords(concat x xs))) xs eqString :: String -> String -> Bool eqString = (==)
roberth/uu-helium
test/typeerrors/Examples/TypeBug5.hs
gpl-3.0
167
0
12
30
88
49
39
5
1
alpha :: ((a, b), c) -> (a, (b, c)) alpha ((x, y), z) = (x, (y, z))
hmemcpy/milewski-ctfp-pdf
src/content/3.6/code/haskell/snippet11.hs
gpl-3.0
67
0
7
16
66
41
25
2
1
-- %************************************************************************ -- %* * -- The known-key names for Template Haskell -- %* * -- %**********************************...
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
47,787
0
8
9,952
8,474
4,918
3,556
784
1
{-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.InstallPlan -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : duncan@community.haskell.org -- Stability : provisional --...
thoughtpolice/cabal
cabal-install/Distribution/Client/InstallPlan.hs
bsd-3-clause
26,957
0
18
6,377
4,778
2,536
2,242
374
8
-- -- Data vault for metrics -- -- Copyright © 2013-2014 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. -- {-...
afcowie/vaultaire
src/DemoWave.hs
bsd-3-clause
2,540
0
14
643
666
342
324
66
2
{-# LANGUAGE OverloadedStrings #-} -- Requirements: -- - Empty ~/.haskeline (or set to defaults) -- - On Mac OS X, the "dumb term" test may fail. -- In particular, the line "* UTF-8" which makes locale_charset() -- always return UTF-8; otherwise we can't test latin-1. -- - NB: Window size isn't provided by screen s...
judah/haskeline
tests/Unit.hs
bsd-3-clause
11,627
0
23
3,373
3,397
1,747
1,650
225
3
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} {-# LINE 1 "Control/Monad/RWS/Lazy.hs" #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.RWS.Lazy -- Copyright : (c) Andy Gill 2001, -- (c) ...
phischu/fragnix
tests/packages/scotty/Control.Monad.RWS.Lazy.hs
bsd-3-clause
1,654
0
6
322
193
139
54
31
0
{-# LANGUAGE OverloadedStrings, CPP, ScopedTypeVariables #-} {- Copyright (C) 2012-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 of the Lice...
peter-fogg/pardoc
src/Text/Pandoc/PDF.hs
gpl-2.0
8,029
12
23
2,183
1,876
996
880
142
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/AddRoleToInstanceProfile.hs
mpl-2.0
3,975
0
9
803
395
242
153
54
1
module Main where -- so we can fix-intro import Data.Function (fix) import Prelude hiding ((+)) data Nat = Z | S Nat {-# RULES "ww" forall f . fix f = wrap (fix (unwrap . f . wrap)) #-} {-# RULES "precondition" forall w . wrap (unwrap w) = w #-} (+) :: Nat -> Nat -> Nat Z + n = n (S n') + n = S (n' + n) from...
conal/hermit
examples/IFL2012/Fib.hs
bsd-2-clause
934
0
10
281
394
209
185
26
1
module Bar where resource :: Int resource = 2
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/makewith/multi_make/Bar.hs
bsd-3-clause
47
0
4
10
14
9
5
3
1
module AppNotEnough1 where sumInts :: [Int] -> Int sumInts xs = foldr (+) 0
roberth/uu-helium
test/typeerrors/Heuristics/AppNotEnough1.hs
gpl-3.0
78
0
6
16
31
18
13
3
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.ConditionalRendering -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/ConditionalRendering.hs
bsd-3-clause
1,800
0
8
220
242
142
100
26
4
module Test2 where f x y = let ls = x + 1; rs = y - 1 in (ls,rs)
kmate/HaRe
old/testing/refacSlicing/Test2.hs
bsd-3-clause
104
0
9
59
45
25
20
4
1
{-# LANGUAGE CPP #-} -- | Handy functions for creating much Core syntax module MkCore ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkWildEvBinder, sortQuantVars, cast...
green-haskell/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
31,566
0
16
8,638
4,809
2,618
2,191
365
4
{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-} module T5938 where import Data.Kind (Type) type family KindFam (a :: k) type instance KindFam (a :: Type) = Int type instance KindFam (a :: Bool) = Bool type instance KindFam (a :: Maybe k) = Char -- doesn't work
sdiehl/ghc
testsuite/tests/polykinds/T5938.hs
bsd-3-clause
267
0
7
48
79
50
29
7
0
import Test.Cabal.Prelude -- Test build when the library is empty, for #1241 main = setupAndCabalTest $ withDirectory "empty" $ setup_build []
themoritz/cabal
cabal-testsuite/PackageTests/EmptyLib/setup.test.hs
bsd-3-clause
143
0
7
21
29
15
14
2
1
{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-} module GenNamed where bar :: _a -> _a bar x = not x
siddhanathan/ghc
testsuite/tests/partial-sigs/should_compile/GenNamed.hs
bsd-3-clause
108
0
5
19
25
14
11
4
1
{-# htermination (.) :: (b -> c) -> (a -> b) -> (a -> c) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_DOT_1.hs
mit
61
0
2
16
3
2
1
1
0
module Week1.Tests where import Test.HUnit import Week1.Week1 week1Tests = do runTestTT week1Ex1Tests runTestTT week1Ex2Tests runTestTT week1Ex3Tests runTestTT week1Ex4Tests runTestTT week1Ex5Tests runTestTT week1Ex6Tests test1_1...
rglew/cis194
src/Week1/Tests.hs
mit
1,737
0
11
271
633
339
294
28
1
module Menu where import GlossUtilities import Graphics.Gloss import Data.List menuBackgroundColor, menuBorderColor, menuTextColor :: Color menuBackgroundColor = blue menuBorderColor = white menuTextColor = white menuWidth, menuHeight, menuTextScale :: Float menuWidth = 350.0 menuHeight = 650.0 menuTextScale = 0.4 ...
maple-shaft/HaskellTetris
src/Menu.hs
mit
3,164
0
12
992
824
465
359
66
2
module Data.List.Marquee where import Data.Maybe (fromMaybe) lookupOr :: (Eq key) => a -> key -> [(key, a)] -> a lookupOr d key = fromMaybe d . lookup key
DanielRS/marquee
src/Data/List/Marquee.hs
mit
157
0
10
30
72
40
32
4
1
add x y = x + y main = do print $ add 1 2 print $ 1 `add` 2
shigemk2/haskell_abc
Ope.hs
mit
71
0
8
31
46
22
24
4
1
{-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE EmptyDataDecls #-} module MaxLenTest ( specs #ifndef WIT...
gbwey/persistentold
persistent-test/MaxLenTest.hs
mit
1,337
0
15
378
295
156
139
34
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Network.API.Mandrill.Monad where import Network.API.Mandrill.Types import Control.Applicative import Control.Monad.Reader newtype MandrillT m a = MandrillT { runMandrillT :: ReaderT ApiKey m a } deriving ( MonadTrans, MonadReader ApiKey , Functor...
krgn/hamdrill
src/Network/API/Mandrill/Monad.hs
mit
471
0
8
84
127
71
56
11
1
{-# LANGUAGE ScopedTypeVariables #-} module Nix.Evaluator.Evaluator where import Control.Monad.State.Strict --(MonadState(..), modify, execStateT) import Nix.Common import Nix.Evaluator.Builtins.Operators (interpretBinop, interpretUnop) import Nix.Evaluator.Errors import Nix.Atoms import Nix.Expr (Params(..), ParamSe...
adnelson/nix-eval
src/Nix/Evaluator/Evaluator.hs
mit
8,852
60
27
2,514
1,827
971
856
-1
-1
{-# LANGUAGE ScopedTypeVariables , OverloadedStrings , DeriveDataTypeable , RecordWildCards , RankNTypes #-} module ImageCache ( ImageCache , ImageRes(..) , CacheEntry(..) , withImageCache , f...
blitzcode/jacky
src/ImageCache.hs
mit
16,797
97
28
6,077
3,625
1,900
1,725
-1
-1