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 MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, GeneralizedNewtypeDeriving, StandaloneDeriving #-} -- Implements "Indentation Senstivie Parsing" for Trifecta module Text.Trifecta.Indentation ( I.IndentationRel(..), I.Indentation, I.infIndentation, I.mkIndentationState, I.IndentationState, ...
lambdageek/indentation
indentation-trifecta/src/Text/Trifecta/Indentation.hs
bsd-3-clause
6,694
0
13
946
1,680
891
789
-1
-1
-- J.S. Bach - Choral prelude F-moll 'Ich ruf zu dir Herr Jesu Christ' import System.Cmd(system) import Temporal.Music.Western.P12 import Temporal.Music.Demo.GeneralMidi pedal = sustainT trill n a b = loop n $ mel [a, b] -- alto dynamics type Score12 = Score (Note ()) up :: Double -> [Score12] -> Score12 up x = ...
spell-music/temporal-music-notation-demo
examples/choral.hs
bsd-3-clause
5,742
2
15
2,049
3,011
1,680
1,331
128
1
{-# OPTIONS_HADDOCK hide #-} -- Implementation of the PLAIN Simple Authentication and Security Layer (SASL) -- Mechanism, http://tools.ietf.org/html/rfc4616. {-# LANGUAGE OverloadedStrings #-} module Network.Xmpp.Sasl.Mechanisms.Plain ( plain ) where import Control.Monad.Error import Cont...
Philonous/pontarius-xmpp
source/Network/Xmpp/Sasl/Mechanisms/Plain.hs
bsd-3-clause
2,332
0
13
808
422
232
190
44
3
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -------------------------------------------------------------...
dmjio/hadron
src/Hadron/Run.hs
bsd-3-clause
8,278
0
15
1,783
1,635
870
765
143
2
module ElmFormat.Operation (Operation, OperationF(..), deprecatedIO) where import Prelude hiding (readFile, writeFile) import Control.Monad.Free import ElmFormat.FileStore import Messages.Formatter.Format class (FileStore f, InfoFormatter f) => Operation f where deprecatedIO :: IO a -> f a data OperationF a ...
nukisman/elm-format-short
src/ElmFormat/Operation.hs
bsd-3-clause
1,065
0
8
203
343
177
166
25
0
module Sharc.Instruments.ClarinetEflat (clarinetEflat) where import Sharc.Types clarinetEflat :: Instr clarinetEflat = Instr "Eb_clarinet" "Clarinet (E-flat)" (Legend "McGill" "2" "11") (Range (InstrRange (HarmonicFreq 1 (Pitch 195.99 43 "g3")) (Pitch 195.99 43 "g3") ...
anton-k/sharc-timbre
src/Sharc/Instruments/ClarinetEflat.hs
bsd-3-clause
33,465
0
15
9,725
12,562
6,504
6,058
1,155
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Time.RO.Corpus ( corpus , negativeCorpus ) where impor...
facebookincubator/duckling
Duckling/Time/RO/Corpus.hs
bsd-3-clause
2,744
0
11
1,085
789
482
307
70
1
{-# LANGUAGE ExistentialQuantification, Rank2Types, PolyKinds #-} module Data.GADT.Untagged where -- | Existential type, representing GADT, abstracted from typelevel tag (first type parameter). data Untagged con = forall a. Tagged (con a) -- | Function to untag values. -- -- > f :: [Term A] -> [Term B] -> [...
apsk/ungadtagger
src/Data/GADT/Untagged.hs
bsd-3-clause
1,376
0
10
320
318
175
143
17
1
----------------------------------------------------------------------------- -- StaticThih: Static environment for Thih -- -- Part of `Typing Haskell in Haskell', version of November 23, 2000 -- Copyright (c) Mark P Jones and the Oregon Graduate Institute -- of Science and Technology, 1999-2000 -- -- This program...
yu-i9/thih
src/Thih/Static/Thih.hs
bsd-3-clause
7,441
0
21
1,745
3,268
1,760
1,508
144
1
{-# LANGUAGE Arrows #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveGeneric #-} module Database where import Prelude hiding (sum) import Opaleye (Column, Nullable, matchNullable, isNull, ...
vavans/Flashcard
server/app/Database.hs
bsd-3-clause
1,952
0
10
364
540
327
213
41
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SGIX.Subsample -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability :...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SGIX/Subsample.hs
bsd-3-clause
806
0
5
107
67
48
19
11
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Templates.Config where import Text.InterpolatedString.Perl6 (q) import Types configTemplate :: Template configTemplate = Template ".generate-component.yaml" config where config = [q|# Type of the current project; determ...
tpoulsen/generate-component
src/Templates/Config.hs
bsd-3-clause
635
0
6
110
48
31
17
8
1
{-# OPTIONS -fglasgow-exts -fth #-} -- Typechecker to GADT -- Implementing a typed DSL *compiler* with the typed evaluator and the -- the typechecker from untyped terms to typed ones -- We use TH later on to lift TypedTerms to true top-level typed terms. -- That is, if we have a value (TypedTerm tp tm) of the type -...
rosenbergdm/language-r
src/Language/R/sketches/TypecheckedDSLTH.hs
bsd-3-clause
6,988
24
13
1,604
2,020
1,067
953
-1
-1
{-# LANGUAGE Safe #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} ------------------------------------------------------------------------ -- | -- Module : AI.Rete.State -- Copyright : (c) 2015 Konrad Grzanek -- License : BSD-style (see the file LICENSE) -- ...
kongra/rete
AI/Rete/State.hs
bsd-3-clause
2,521
0
10
598
599
320
279
51
1
{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Core.DFA -- Copyright : (c) Radek Micek 2009, 2010 -- License : BSD3 -- Stability : experimental -- -- Deterministic finite state automaton. -- module Core.DFA ( DFA , State , StateData(..) , Transitions , updateWhatMat...
radekm/crep
Core/DFA.hs
bsd-3-clause
11,918
0
15
3,082
3,020
1,622
1,398
-1
-1
module Data.Unums.Ubound ( Ubound (..) ) where import Data.Unums.Unum -- | An ubound is an interval (open or closed) data Ubound ess fss = Ubound (Unum ess fss) (Unum ess fss)
hsyl20/unums
src/Data/Unums/Ubound.hs
bsd-3-clause
184
0
8
39
52
32
20
4
0
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} module TestChapter4DP ( testChapter4 )where import Control.Concurrent import Control.Monad imp...
Xingtao/RLHask
test/TestChapter4DP.hs
bsd-3-clause
8,895
0
29
2,422
2,370
1,210
1,160
156
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperato...
qmuli/qmuli
library/Qi/Program/Config/Lang.hs
mit
5,809
0
14
1,505
945
528
417
118
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module: BDCS.Export.Ostree -- Copyright: (c) 2017 Red Hat, Inc. -- License: LGPL -- -- Maintainer: https://github.com/weldr -- Stability: alpha -- Portability: portable -- -- Functions for exporting objects from ...
atodorov/bdcs
src/BDCS/Export/Ostree.hs
lgpl-2.1
16,661
0
19
4,522
3,008
1,544
1,464
-1
-1
{-# LANGUAGE TemplateHaskell, CPP, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided...
mbakke/ganeti
test/hs/Test/Ganeti/Utils.hs
bsd-2-clause
15,928
0
21
3,600
3,583
1,926
1,657
262
2
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-2006 RnEnv contains functions which convert RdrNames into Names. -} {-# LANGUAGE CPP, MultiWayIf, NamedFieldPuns #-} module RnEnv ( newTopSrcBinder, lookupLocatedTopBndrRn, lookupTopBndrRn, lookupLocatedOccRn, lookupOccRn, lookupOccRn_m...
shlevy/ghc
compiler/rename/RnEnv.hs
bsd-3-clause
64,163
61
22
17,960
8,684
4,447
4,237
721
13
{- Copyright 2015 Google Inc. 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://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
d191562687/codeworld
codeworld-base/src/GHC/Err.hs
apache-2.0
729
0
4
136
23
17
6
4
0
-- 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...
tensorflow/haskell
tensorflow-ops/tests/DataFlowOpsTest.hs
apache-2.0
2,667
0
14
541
538
296
242
40
1
{-# LANGUAGE PatternGuards #-} module Idris.Elab.Clause where import Idris.AbsSyntax import Idris.ASTUtils import Idris.DSL import Idris.Error import Idris.Delaborate import Idris.Imports import Idris.Elab.Term import Idris.Coverage import Idris.DataOpts import Idris.Providers import Idris.Primitives import Idris.Inli...
adnelson/Idris-dev
src/Idris/Elab/Clause.hs
bsd-3-clause
49,068
10
28
19,802
14,141
7,011
7,130
786
43
{-# LANGUAGE RankNTypes, ScopedTypeVariables, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-} -- This tests scoped type variables, used in an expression -- type signature in t1 and t2 module Foo7 where import Control.Monad import Control.Monad.ST import Data.Array.MArray import Data....
sdiehl/ghc
testsuite/tests/typecheck/should_compile/tc213.hs
bsd-3-clause
1,969
0
14
550
685
357
328
33
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Install -- Copyright : Isaac Jones 2003-2004 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This is the entry point into installing a built pa...
edsko/cabal
Cabal/src/Distribution/Simple/Install.hs
bsd-3-clause
8,561
0
18
2,044
1,692
879
813
132
13
module Backend.AST ( module Backend.AST , module Frontend.Types ) where import Data.Map (Map) import qualified Data.Map as M import Frontend.Types import Frontend.Values import Frontend.Primitives import Internal -- SSA-like lowlevel IR type Label = Name type LType = Type type LTypeEnv = Map Name LType typ...
alpicola/mel
src/Backend/AST.hs
mit
1,022
0
8
317
298
181
117
31
0
import qualified Test.Algorithms as Algorithms import qualified Test.Attributes as Attributes import qualified Test.Basic as Basic import Test.Tasty main :: IO () main = defaultMain $ testGroup "Haskell-igraph Tests" [ Basic.tests , Algorithms.tests , Attributes.tests ]
kaizhang/haskell-igraph
tests/test.hs
mit
303
0
8
67
69
42
27
9
1
-- | Defines an abstract evaluation context. module Nix.Evaluator.AbstractContext where import Nix.Common import Nix.Evaluator.Errors -- | Types of directories, as defined in the nix manual. data FileType = RegularType | DirectoryType | SymlinkType | UnknownType deriving (Show, Eq, Ord, Enum) -- | A representatio...
adnelson/nix-eval
src/Nix/Evaluator/AbstractContext.hs
mit
1,789
1
12
331
303
164
139
-1
-1
{-# OPTIONS_GHC -Wall #-} import System.Directory import System.FilePath import System.Environment import Data.List hiding(find) main :: IO () main = do [s, d] <- getArgs r <- find s d print r find :: String -> FilePath -> IO (Maybe FilePath) find s d = do fs <- getDirectoryContents d let fs'...
Forec/learn
2017.3/Parallel Haskell/ch13/findseq.hs
mit
1,364
1
17
435
567
287
280
44
5
module Abc.DeepSeq () where import Control.DeepSeq import Abc.Def instance NFData Abc where rnf (Abc a b c d e f g h i j k l m) = a `deepseq` b `deepseq` c `deepseq` d `deepseq` e `deepseq` f `deepseq` g `deepseq` h `deepseq` i `deepseq` j `deepseq` k `deepseq` l `dee...
phylake/avm3
abc/deepseq.hs
mit
10,955
0
18
2,426
3,804
2,274
1,530
193
0
module Euler.Problem021Test (suite) where import Test.Tasty (testGroup, TestTree) import Test.Tasty.HUnit import Euler.Problem021 suite :: TestTree suite = testGroup "Problem021" [ testCase "unamicability of 6" testUnamicability6 , testCase "amicability of 220" testAmicability220 , testCase "...
whittle/euler
test/Euler/Problem021Test.hs
mit
596
0
7
103
125
69
56
15
1
{-# LANGUAGE OverloadedStrings #-} module Day4 (day4, day4', run, decrypt, RoomData(..)) where import Data.Char (chr, isLower, ord) import Data.Either (rights) import Data.List (group, sort, sortOn) import Text.Parsec ( ParseError , between , char , digit , endBy1 , lower , many1 , pars...
brianshourd/adventOfCode2016
src/Day4.hs
mit
1,676
0
14
395
643
336
307
41
1
module Main where import Control.Monad.Logger (runStdoutLoggingT) import Database.Persist.Postgresql (createPostgresqlPool) import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.RequestLogger (logStdoutDev) import App (app) import Models (connStr) main :: IO () main = do pool <- runStdoutLoggingT $ c...
houli/distributed-file-system
directory-service/app/Main.hs
mit
414
0
9
53
120
67
53
12
1
-- file: ch04/EfficientList.hs myDumbExample xs = if length xs > 0 then head xs else 'Z' -- no good, because length needs to traverse the entire list -- Better: mySmartExample xs = if not (null xs) then head xs else 'Z' -- Or let p...
supermitch/learn-haskell
real-world-haskell/ch04/EfficientList.hs
mit
400
0
8
148
84
44
40
8
2
import Test.HTTP import Data.List (isInfixOf) main = defaultMain $ httpTestCase "BayesHive landing page" "https://bayeshive.com" $ do landing <- get "/" assert "Correct blog link" $ "href=\"https://bayeshive.com/blog\"" `isInfixOf` landing loginResult <- postForm "/auth/page/email/login" ...
openbrainsrc/http-test
test.hs
mit
471
0
11
100
127
64
63
11
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Y2017.M09.D28.Solution where {-- Yesterday, and the two days prior, we focused on ETL for names, a tricky subject that deserve 3 (or even more) days of exercises. Today, we're going back to the reified article concept from the days prior and store those articles...
geophf/1HaskellADay
exercises/HAD/Y2017/M09/D28/Solution.hs
mit
2,500
0
9
453
337
207
130
29
1
{-# LANGUAGE MultiParamTypeClasses #-} -- | This module provides the 'Buffer' type class that abstracts the array type that is being used for I\/O. Inspired by hsndfile. module Sound.PortAudio.Buffer where import Sound.PortAudio import qualified Sound.PortAudio.Base as Base import Foreign.C.Types (CULong) import Fore...
sw17ch/portaudio
src/Sound/PortAudio/Buffer.hs
mit
3,244
0
13
738
534
279
255
32
1
{-# htermination foldM_ :: (a -> b -> IO a) -> a -> [b] -> IO () #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_foldM__4.hs
mit
82
0
3
20
5
3
2
1
0
-- List length. Tail Recursion with "foldl'". module Length where import Prelude hiding (length) import Data.List (foldl') length :: [t] -> Integer length = foldl' (\lengthAccumulator item -> lengthAccumulator + 1) 0 {- GHCi> length "" length "1" length "12" -} -- 0 -- 1 -- 2 -- foldl :: (b -> a -> b) ...
pascal-knodel/haskell-craft
Examples/· Folds/length/foldl'/Length.hs
mit
3,339
0
11
1,131
284
189
95
14
1
{-# LANGUAGE DeriveDataTypeable #-} module RAM.State where -- $Id$ import RAM.Type import RAM.Memory import Machine.History import Autolib.ToDoc import Data.Typeable data State = State { schritt :: Int , memory :: Memory , todo :: Program -- noch auszuführen , past :: [State] -- vorige zuständ...
Erdwolf/autotool-bonn
src/RAM/State.hs
gpl-2.0
695
6
13
184
209
113
96
21
0
{- Copyright (C) 2017 WATANABE Yuki <magicant@wonderwand.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is ...
magicant/flesh
hspec-src/Flesh/Language/Parser/Syntax_RedirSpec.hs
gpl-2.0
6,644
0
22
1,590
1,555
711
844
102
2
{- Copyright (C) 2007-2010 John MacFarlane <jgm@berkeley.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is ...
castaway/pandoc
src/Text/Pandoc/Writers/Man.hs
gpl-2.0
14,967
0
22
4,121
4,589
2,283
2,306
278
10
module FQuoter.Serialize.GroupingSpec(main, spec) where import Test.Hspec import Database.HDBC import FQuoter.Serialize.Grouping import FQuoter.Serialize.SerializedTypes ------------- -- Test data ------------- main :: IO() main = hspec spec single' = Single . toSql testData = [["1","page 3", "quote", "", "title"...
Raveline/FQuoter
testsuite/FQuoter/Serialize/GroupingSpec.hs
gpl-3.0
1,836
0
19
420
585
330
255
32
1
{-# LANGUAGE OverloadedStrings #-} module Lang.PrettyUtils where import Text.PrettyPrint -- | Pretty printing kit. -- First component for variable bindings, -- second for binding variables -- (to be able to say where to print types and where to ignore it) type Kit a = (a -> Doc,a -> Doc) parensIf :: Bool -> Do...
danr/tfp1
Lang/PrettyUtils.hs
gpl-3.0
605
0
10
153
222
122
100
14
2
module Kopia.Model.Snapshot ( Snapshot(..) , getLocalTime ) where import Data.Time ( UTCTime , LocalTime , getCurrentTimeZone , utcToLocalTime ) import Kopia.Model.Bridge (Bridge) data Snapshot = Snapshot { getEvent :: String , getBridge :: Bridge , getTi...
Jefffrey/Kopia
src/Kopia/Model/Snapshot.hs
gpl-3.0
543
0
10
152
138
78
60
20
1
-- nonlinear least-squares fitting import Numeric.GSL.Fitting import Numeric.LinearAlgebra xs = map return [0 .. 39] sigma = 0.1 ys = map return $ toList $ fromList (map (head . expModel [5,0.1,1]) xs) + scalar sigma * (randomVector 0 Gaussian 40) dat :: [([Double],([Double],Double))] dat = zip xs (zip ...
dkensinger/haskell
linear_alg.hs
gpl-3.0
617
0
14
135
327
178
149
15
1
module HEP.Automation.MadGraph.Dataset.Set20110718set1ATLAS where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.SChanC8V import HEP.Automa...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110718set1ATLAS.hs
gpl-3.0
1,808
0
10
610
418
263
155
49
1
{- The Delve Programming Language Copyright 2009 John Morrice Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version. This file is part of Delve. Delve is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
elginer/Delve
src/edc.hs
gpl-3.0
3,814
0
31
948
475
242
233
55
2
data Effect = E String Int data Cast a = C Effect (Cast a) type Capability a = Cast a -> a data Object a = O (Cast a) (Capability a) mkActor :: Capability a -> Object a -> Object a mkActor caps = \(O c1 _) -> O c1 caps takeBuff :: Int -> (Cast Int, String) -> Int takeBuff i (C (E "" eVal) _, _) = i takeBuff i (C (E e...
graninas/Haskell-Algorithms
Tests/DoNotationTest.hs
gpl-3.0
720
0
9
206
312
164
148
17
1
{-| Module : Language.Untyped.Context Description : Definition of the Context of evaluation and some useful functions. Copyright : (c) Juan Gabriel Bono, 2016 License : BSD3 Maintainer : juanbono94@gmail.com -} module Language.Untyped.Context ( Context , Binding (..) , CtxException (..) , Name , ...
juanbono/tapl-haskell
untyped/src/Language/Untyped/Context.hs
gpl-3.0
3,602
0
13
846
994
522
472
75
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Customers/Update.hs
mpl-2.0
4,831
0
19
1,202
786
457
329
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-billing/gen/Network/Google/Resource/CloudBilling/BillingAccounts/Get.hs
mpl-2.0
5,003
0
15
1,113
705
414
291
103
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.YouTubeReporting.Types -- Copyright : (c) 2015-2016 Br...
brendanhay/gogol
gogol-youtube-reporting/gen/Network/Google/YouTubeReporting/Types.hs
mpl-2.0
5,170
0
7
1,194
544
372
172
153
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/GetCredentialsForIdentity.hs
mpl-2.0
4,936
0
11
957
586
351
235
67
1
{-# LANGUAGE TemplateHaskell #-} module XTag.Config ( readConfig , repositories , cacheRoot , port , redisConnectInfo , Port , Config ) where import Control.Applicative import Control.Lens import Control.Monad.State import Control.Monad.Trans.Eit...
yeyan/xtag
src/XTag/Config.hs
lgpl-3.0
2,906
0
22
1,060
628
336
292
-1
-1
{-# OPTIONS_GHC -Wall -Werror #-} module ChapterExercises_1 where import Text.Trifecta import Data.List import Data.Char import Control.Applicative -- Relevant to precedence/ordering, -- cannot sort numbers like strings. data NumberOrString = NOSS String | NOSI Integer deriving (Show, Eq) inst...
dmp1ce/Haskell-Programming-Exercises
Chapter 24/src/ChapterExercises_1.hs
unlicense
4,064
0
15
1,063
1,532
752
780
99
3
{- Copyrights (c) 2016. Samsung Electronics Ltd. All right 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://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
ryzhyk/cocoon
cocoon/Util.hs
apache-2.0
3,861
0
18
1,098
1,636
860
776
69
3
module CostasLikeArrays.A320574Spec (main, spec) where import Test.Hspec import CostasLikeArrays.A320574 (a320574) main :: IO () main = hspec spec spec :: Spec spec = describe "A320574" $ it "correctly computes the first 6 elements" $ map a320574 [1..6] `shouldBe` expectedValue where expectedValue = [1, 1...
peterokagey/haskellOEIS
test/CostasLikeArrays/A320574Spec.hs
apache-2.0
334
0
8
62
112
64
48
10
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module CI.ProcSpec ( test ) where import CI.Proc import Test.Tasty import Test.Tasty.HUnit import Control.Monad.Eff import Control.Monad.Eff.Exception import Control.Monad.Eff.Lift import Data.Text (Text) import qualified Data.Text as T im...
lancelet/bored-robot
test/CI/ProcSpec.hs
apache-2.0
1,284
0
14
337
314
172
142
35
2
module Forms where import Prelude hiding (writeFile, readFile, head, tail, init, last) import Yesod hiding (Route(..)) import Foundation import Data.Monoid (Monoid (mappend, mempty, mconcat), (<>)) import Control.Applicative ((<$>), (<*>), pure) import Control.Arrow ((&&&)) import Data.Text (Text) import qualified Dat...
seizans/yesod-tutorial
Forms.hs
bsd-2-clause
1,278
0
11
257
371
212
159
-1
-1
import Data.Function.ArrayMemoize import Criterion.Main -- Compiled with: ghc -O2 --make heat-benchmark.hs -- Run with: ./benchmark -o heat-benchmark-results.html foo x = undefined -- discretize delx (continuize delx x) alpha = 0.23 delt = 0.05 :: Float delx = 0.1 :: Float nt = 5 :: Float nx = 3 ::...
dorchard/array-memoize
heat-benchmark.hs
bsd-2-clause
4,701
0
17
1,714
1,626
907
719
78
1
matchMarker :: String -> String -> (Bool,String) matchMarker [] xs = (True, xs) matchMarker (c:cs) (x:xs) = if c == x then matchMarker cs xs else (False, (x:xs) ) dropUntilMarker :: String -> String -> (String,String) dropUntilMarker [] xs = ([],xs) dropUn...
wavewave/hournal
trash.hs
bsd-2-clause
2,430
0
12
889
769
406
363
46
2
{-# LANGUAGE FlexibleContexts, Rank2Types #-} module Day14 where import Data.List (maximumBy) import Control.Monad (forM_) import qualified Data.Map.Strict as M import qualified Control.Monad.State.Lazy as S import qualified Text.Parsec as P import qualified Text.Parsec.Char as PC type Parsec s u m b = P.Stream s m ...
taylor1791/adventofcode
2015/src/Day14.hs
bsd-2-clause
3,645
0
19
683
1,508
830
678
78
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Network.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:32 Warning : this file is machine generated - do not m...
keera-studios/hsQt
Qtc/Classes/Network.hs
bsd-2-clause
2,640
0
12
540
889
484
405
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QHBoxLayout_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:25 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QHBoxLayout_h.hs
bsd-2-clause
69,572
239
19
15,999
22,998
10,985
12,013
-1
-1
{-| User Interface and Compilation process for L-System and Turtle movement student: Carlos Gomez date: Sat May 15 22:51:57 BOT 2010 -} module Main where import Graphics.UI.WXCore import Graphics.UI.WX import GenSequences import Process import ParserLS import SistemaL main :: IO() main = start gui -- | GUI for L-sy...
carliros/lsystem
src/Main.hs
bsd-3-clause
4,521
0
17
1,605
1,511
740
771
83
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.IndexFunc -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- --...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/IndexFunc.hs
bsd-3-clause
767
0
4
94
55
44
11
7
0
module Crypto.Blockchain.Mempool where import Data.Set (Set) import qualified Data.Set as Set import Data.Foldable (toList) newtype Mempool tx = Mempool { fromMempool :: Set tx } deriving (Show, Monoid) addTx :: Ord tx => tx -> Mempool tx -> Mempool tx addTx tx (Mempool txs) = Mempool (Set.in...
cloudhead/cryptocurrency
src/Crypto/Blockchain/Mempool.hs
bsd-3-clause
650
0
10
140
274
142
132
14
1
{-# LANGUAGE FlexibleInstances #-} module Types where data OutputStyle = LispStyle | PlainStyle data Options = Options { outputStyle :: OutputStyle , hlintOpts :: [String] , ghcOpts :: [String] , operators :: Bool , detailed :: Bool , expandSplice :: Bool , sandbox :: Maybe Strin...
eagletmt/ghc-mod
Types.hs
bsd-3-clause
2,070
0
13
551
606
341
265
55
1
----------------------------------------------------------------------------- -- | -- Module : Data.Geometry.Instances.RealFloat -- Copyright : Copyright (C) 2015 Artem M. Chirkin <chirkin@arch.ethz.ch> -- License : BSD3 -- -- Maintainer : Artem M. Chirkin <chirkin@arch.ethz.ch> -- Stability : Experi...
achirkin/fastvec
src/Data/Geometry/Instances/RealFloat.hs
bsd-3-clause
482
0
3
66
23
20
3
1
0
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Marshalling where import Control.Monad import Control.Applicative import Test.Tasty.QuickCheck import Network.TLS.Internal import Network.TLS import qualified Data.ByteString as B import Data.Word import Data.X509 import Certificate genByteString :: I...
erikd/hs-tls
core/Tests/Marshalling.hs
bsd-3-clause
3,589
0
14
1,018
841
444
397
82
4
{-# LANGUAGE OverloadedStrings #-} module Bot where import Data.Maybe (fromJust) import Data.List (find) import Control.Applicative ((<$>), (<*>), pure) import Control.Monad (forM, liftM) import qualified Data.Aeson as Aeson import qualified Data.Aeson.Types as Aeson import qualified Data.Text as T import qualified D...
clug-kr/democracy_bot
src/Bot.hs
bsd-3-clause
2,889
44
16
518
1,053
586
467
74
2
module Util where import GHC import Outputable import Data.Text (Text) import qualified Data.Text as T sdocToText :: Outputable a => DynFlags -> a -> Text sdocToText dflags doc = T.pack (show (runSDoc (ppr doc) (initSDocContext dflags defaultUserStyle))) instance Outputable SDoc where...
monto-editor/services-haskell
src/Util.hs
bsd-3-clause
356
0
11
88
114
62
52
10
1
module Ordering where import System.Environment import System.Exit import System.IO import System.Random import Control.Monad.Random import Control.Monad (replicateM) import Data.Ord import Data.Function (on) import Data.List import qualified Data.Set as Set import qualified Data.Map as Map import Dat...
mgree/conflict
ordering.hs
bsd-3-clause
3,945
7
17
1,027
1,340
726
614
78
2
module Language.StreamIt.Compile ( Embedding (..), compile, ) where import Data.ByteString.Lazy (ByteString) import Data.Word import Data.Typeable import qualified Data.ByteString.Lazy as L import qualified Data.Text as DT (replace, pack, unpack) -- import qualified Data.ByteString as B import Control.Exception i...
iu-parfunc/haskell-streamit
Language/StreamIt/Compile.hs
bsd-3-clause
4,617
0
18
912
1,255
648
607
-1
-1
import Test.Hspec import Test.ProductionRule main :: IO () main = do Test.ProductionRule.test
YLiLarry/parser241-production-rule
test/Spec.hs
bsd-3-clause
99
0
7
17
32
17
15
5
1
-- | -- Module : Prose.Normalization -- Copyright : (c) 2014–2015 Antonio Nikishaev -- -- License : BSD-style -- Maintainer : me@lelf.lu -- Stability : experimental -- -- module Prose.Normalization where import qualified Prose.Properties.DecompD as NFD import qualified Prose.Properties.DecompKD as NFKD i...
llelf/prose
Prose/Normalization.hs
bsd-3-clause
4,298
0
16
1,464
1,034
559
475
67
3
{-# LANGUAGE DataKinds, DeriveGeneric, TypeApplications #-} module Test62 (example, example_) where import Data.Generics.Product (field, field_, position, position_) import Optics.Core import GHC.Generics (Generic) data Foo a = Foo { bar :: Bar a } deriving Generic data Bar a = Bar { x :: a, y :: a } deriving Generic ...
kcsongor/generic-lens
generic-optics/test/Test62.hs
bsd-3-clause
614
0
11
133
289
160
129
17
1
{-# LANGUAGE TypeOperators, ScopedTypeVariables #-} module Data.Fin where import Data.Nat newtype Fin n = Fin Int deriving (Show, Eq, Ord) zero :: Fin (S n) zero = Fin 0 succ :: Fin n -> Fin (S n) succ (Fin n) = Fin (n + 1) pred :: Fin n -> Fin n pred (Fin 0) = Fin 0 pred (Fin n) = Fin (n - 1) addFin :: Fin x -...
copumpkin/vector-static
Data/Fin.hs
bsd-3-clause
951
0
12
263
538
267
271
27
1
{-# LANGUAGE OverloadedStrings #-} -- | A format developed as part of the snappy-java library. -- -- From the docs: -- -- > SnappyOutputStream and SnappyInputStream use `[magic header:16 -- > bytes]([block size:int32][compressed data:byte array])*` format -- -- The following example encoding was produced on an x86 mac...
asayers/snappy-framed
src/Codec/Compression/Snappy/Framed/SnappyJava.hs
bsd-3-clause
1,909
0
10
322
223
136
87
24
1
{-# LANGUAGE OverloadedStrings #-} module Pudding.Words where import Data.ByteString.Char8 as BC (ByteString, pack, append) import Data.List (intercalate) import Data.Vector (fromList) import Pudding.Core import Pudding.Imports -- pudding procedure ok :: Monad m => ByteString -> PProc m ok msg = tell . pure $ appe...
masaedw/PuddingX
src/Pudding/Words.hs
bsd-3-clause
3,727
0
17
847
1,392
698
694
84
3
{-# LANGUAGE OverloadedStrings #-} module Text.Lorem.Words (latin) where import qualified Data.Text as DT -- embedding this word list with file-embed introduces template -- haskell and takes longer to compile. latin :: [DT.Text] latin = [ "a" , "ab" , "abditioribus" , "abditis" , "ab...
drhodes/hs-lorem
src/Text/Lorem/Words.hs
bsd-3-clause
72,889
0
6
35,459
10,664
7,110
3,554
3,546
1
{-# LANGUAGE TemplateHaskell #-} module Game.PushedT where import Control.Lens (makeLenses) import Linear (V3(..)) import Types makeLenses ''PushedT newPushedT :: PushedT newPushedT = PushedT { _pEnt = Nothing , _pOrigin = V3 0 0 0 , _pAngles = V3 0 0 0 ,...
ksaveljev/hake-2
src/Game/PushedT.hs
bsd-3-clause
341
0
7
114
90
53
37
12
1
{-# LANGUAGE OverloadedStrings #-} import Network.Wai import Network.HTTP.Types import Network.Wai.Handler.Hope as Hope (run) import Network.Wai.Handler.Warp as Warp (run) import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString as B import Control.Monad.IO.Class (liftIO) import Network.Wai.Applic...
kolmodin/spdy
example/app.hs
bsd-3-clause
2,018
0
13
379
602
308
294
53
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Language.Haskell.Rebind.Do where import qualified Control.Monad.Indexed as P import Prelud...
sleexyz/haskell-fun
Language/Haskell/Rebind/Do.hs
bsd-3-clause
1,121
12
20
291
475
284
191
30
0
{-# LANGUAGE FlexibleInstances, GADTs, TemplateHaskell, TypeFamilies, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module DataFamilies.Instances where import BasePrelude hiding (Product) import Json import DataFamilies.Types import Test.QuickCheck (Arbitrary(..), elements, oneof) instance (Arbitra...
aelve/json-x
tests/DataFamilies/Instances.hs
bsd-3-clause
1,178
0
10
261
276
149
127
-1
-1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable -- -- This module implements a transformation, which tries to avoid exponential -- slow down in some cases. What's the proble...
TomMD/cryptol
src/Cryptol/Transform/MonoValues.hs
bsd-3-clause
11,305
0
26
4,431
2,823
1,470
1,353
165
19
{-# LANGUAGE RecordWildCards , OverloadedStrings #-} module Vaultaire.Collectors.Twitter.Process where import Control.Applicative import Control.Monad.Logger import Control.Monad.State import Data.Aeson import Data.Attoparsec.Text import qualified Data.HashMap...
anchor/vaultaire-collector-twitter
lib/Vaultaire/Collectors/Twitter/Process.hs
bsd-3-clause
3,068
20
30
1,131
689
359
330
62
8
{-# LANGUAGE OverloadedStrings #-} module Text.KarverSpec (spec) where import Text.Karver import Prelude hiding (unlines, concat) import Data.Text (Text, append, concat, empty, unlines) import qualified Data.Text.IO as TI import System.IO.Unsafe (unsafePerformIO) import Test.Hspec renderer :: Text -> Text renderer ...
sourrust/karver
test/Text/KarverSpec.hs
bsd-3-clause
10,337
0
19
4,524
1,417
732
685
190
1
{-# LANGUAGE QuasiQuotes #-} module Test.Euler.Data.Data79 where import MPS data79 = strip [$here| 319 680 180 690 129 620 762 689 762 318 368 710 720 710 629 168 160 689 716 731 736 729 316 729 729 710 769 290 719 680 318 389 162 289 162 718 729 319 790 680 890 362 ...
nfjinjing/bench-euler
src/Test/Euler/Data/Data79.hs
bsd-3-clause
365
1
8
127
129
67
62
4
1
module Geordi.TableBuilder ( -- * The 'TableBuilder' Type TableBuilder -- * Prefixes and Suffixes , prefix , suffix , monadSuffix -- * Adding handlers ...
liamoc/geordi
Geordi/TableBuilder.hs
bsd-3-clause
658
0
4
432
48
33
15
12
0
import Language.NoiseFunge import Control.Lens import Text.Printf import Control.Monad main :: IO () main = void $ flip traverse stdOps $ \o -> do printf "%16s %c %s\n" (o^.opName) (o^.opChar) (o^.opDesc)
wolfspyre/noisefunge
nfops/nfops.hs
gpl-3.0
212
0
11
37
87
46
41
7
1
import NLP.FrenchTAG.Parse main :: IO () -- main = printGrammar "/users/waszczuk/annex-top/annex/work/resources/grammars/FrenchTAG/valuation.xml" main = printGrammar "/users/waszczuk/annex-top/annex/work/resources/grammars/FrenchTAG/part.xml"
kawu/partage4xmg
src/parse-grammar.hs
bsd-2-clause
245
0
6
17
26
14
12
3
1
{-# LANGUAGE ExistentialQuantification, RankNTypes, GADTs, OverloadedStrings #-} ----------------------------------------------------------------------------- -- Copyright 2017, GRACeFUL project team. This file is distributed under the -- terms of the Apache License 2.0. For more information, see the files -- "LICENSE....
GRACeFUL-project/GRACe
src/Library.hs
bsd-3-clause
4,115
0
15
1,217
1,316
695
621
94
12
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Instances of Logic and other classes for the logic Framework Copyright : (c) Kristina Sojakova, DFKI Bremen 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : k.sojakova@jacob...
keithodulaigh/Hets
Framework/Logic_Framework.hs
gpl-2.0
2,873
0
6
525
424
221
203
37
0
module Dotnet.System.IO.TextReader where import Dotnet import qualified Dotnet.System.MarshalByRefObject import qualified Dotnet.System.Array data TextReader_ a type TextReader a = Dotnet.System.MarshalByRefObject.MarshalByRefObject (TextReader_ a) foreign import dotnet "method System.IO.TextReader.ReadLine" rea...
alekar/hugs
dotnet/lib/Dotnet/System/IO/TextReader.hs
bsd-3-clause
1,381
0
11
193
334
186
148
-1
-1
{- wrapper executable that captures arguments to ghc, ar or ld -} {-# LANGUAGE CPP #-} module Main where import Control.Monad (when) import Data.Maybe (fromMaybe) import Distribution.Compiler (CompilerFlavor (..)) import ...
ygale/yesod
yesod-bin/ghcwrapper.hs
mit
2,133
0
16
750
415
227
188
38
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} module Diagrams.TwoD.Path.Metafont.Types where import Control.Lens hiding (( # )) #if __GLASGOW_HAS...
wherkendell/diagrams-contrib
src/Diagrams/TwoD/Path/Metafont/Types.hs
bsd-3-clause
4,283
0
11
933
878
494
384
-1
-1
{-# LANGUAGE CPP #-} module TcSimplify( simplifyInfer, pickQuantifiablePreds, growThetaTyVars, simplifyAmbiguityCheck, simplifyDefault, simplifyTop, simplifyInteractive, solveWantedsTcM, -- For Rules we need these two solveWanteds, runTcS ) where #include "Hs...
AlexanderPankiv/ghc
compiler/typecheck/TcSimplify.hs
bsd-3-clause
81,946
1
19
22,678
7,858
4,147
3,711
623
5