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
module Main where import Test.HUnit import System.Exit import Control.Monad import ___class_dojogen___ main = do counts <- runTestTT tests when ((errors counts, failures counts) /= (0, 0)) $ exitWith (ExitFailure 1) tests = TestList [___camel_dojogen___Test] ___camel_dojogen___Test = TestLi...
dojorio/dojogen
dojogen/generators/haskell/Test___class_dojogen___.hs
mit
512
1
12
136
134
69
65
-1
-1
g :: Double g = 9.8 alpha :: Double alpha = pi / 8.0 gamma :: Double gamma = 0.08 rollSpeed :: Double rollSpeed = 4.0 postImpactRollSpeed :: Double -> Double postImpactRollSpeed l = let y = 2 * g * x / l x = 1 - ( cos $ alpha - gamma ) in sqrt $ (rollSpeed ^ 2) - y lengthGiven...
Zomega/thesis
Wurm/RimlessWheel/calc.hs
mit
572
0
12
142
190
100
90
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Gen2.Utils where import Control.Monad.State.Strict import Data.Array import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Search as S import Data.Char (isSpace) import...
ghcjs/ghcjs
src/Gen2/Utils.hs
mit
3,910
0
12
1,036
1,304
679
625
-1
-1
module HAD.Y2014.M02.D25.Exercise where import Data.List import Control.Arrow -- Implement a variation of the RLE algorithm -- | Compress a list with RLE -- -- Examples: -- -- >>> compress "Hello" -- [('H',1),('e',1),('l',2),('o',1)] -- -- >>> compress [1,1,1,1,1] -- [(1,5)] compress :: Eq a => [a] -> [(a, Int)] com...
smwhr/1HAD
exercises/HAD/Y2014/M02/D25/Exercise.hs
mit
652
0
8
113
130
87
43
7
1
module Out.Syllable ( syllabifyWord ) where import ClassyPrelude hiding (Word, maximumBy) import Data.List (findIndices, findIndex) import HelperFunctions import Data.Phoneme import Data.Word import Data.Inflection import Data.Language -- Word's can be made up of both MorphemeS and MorphemeP's -- The syllabifyWord...
Brightgalrs/con-lang-gen
src/Out/Syllable.hs
mit
5,539
0
13
1,092
1,425
739
686
60
2
module Hasql.Postgres.TemplateConverter where import Hasql.Postgres.Prelude import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Builder as BB import qualified Data.ByteString.Lazy.Builder.ASCII as BB import qualified Hasql.Postgres.TemplateConverter.Parser as Parser convert :: ByteStrin...
begriffs/hasql-postgres
library/Hasql/Postgres/TemplateConverter.hs
mit
703
0
19
178
201
109
92
-1
-1
{-# LANGUAGE OverloadedStrings #-} module RunSpec (spec) where import Control.Lens import qualified Data.List as List import Data.List.Lens import System.Directory.Layout import Test.Hspec.Lens import Run (find) import SpecHelper (withBiegunkaTempDirectory) ...
biegunka/biegunka
test/spec/RunSpec.hs
mit
1,619
0
21
601
388
190
198
-1
-1
l = [1,2,4,5,6,7] addone :: Integer -> Integer addone = (\x -> x+1) g( x, y) = x^2 + 5*y +3 {- - 7.8 exercises - - -} mf0 :: (a -> b) -> (a -> Bool) -> [a] -> [b] mf0 f p xs = op where op = [f x | x<-xs , p x] mf1 :: (a -> b) -> (a -> Bool) -> [a] -> [b] mf1 f p xs = map f (filter p xs...
codingSteve/fp101x
20151026/lambdas.hs
cc0-1.0
1,478
0
12
529
948
497
451
36
1
import GoldenRatio import Clay import Control.Monad.State import Data.Default main = do putCss $ do html ? do fs h1 ? hs h2 ? shs where ts = grTitleSize 20 hs = grHeadLineSize 20 shs = grSubHeadLineSize 20 fs = grFon...
pgarg22/Pottery
test2.hs
gpl-2.0
398
0
14
173
104
52
52
17
1
module Text.Pandoc2.Parsing.Generic where import Text.Parsec import Control.Applicative ((<$>), (*>)) import Control.Monad (join, guard) -- | 'sepBy' redefined to include a 'try', so the separator -- can fail. sepBy :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m [a] sepBy p sep = do x <...
jgm/pandoc2
Text/Pandoc2/Parsing/Generic.hs
gpl-2.0
1,461
0
15
457
539
271
268
31
1
module Language.Untyped.Church where import Language.Untyped.Syntax id :: NamelessTerm id = NmAbs "x" (NmVar 0) -- Church Booleans fls :: NamelessTerm fls = NmAbs "t" (NmAbs "f" (NmVar 0)) tru :: NamelessTerm tru = NmAbs "t" (NmAbs "f" (NmVar 1)) -- Church Boolean Operations test :: NamelessTerm test = N...
juanbono/tapl-haskell
untyped/src/Language/Untyped/Church.hs
gpl-3.0
2,001
0
19
377
1,057
547
510
41
1
{-# LANGUAGE RankNTypes #-} module Language.SPO.Parser.PrimaryParser ( runPrimaryParser ) where -- TODO Get rid of `IO`, carry warnings and other messages around -- before displaying them. -- NB Warnings are shown for code that should be modified but will compile. -- Errors, for code that will n...
gxtaillon/spot
src/lib/Language/SPO/Parser/PrimaryParser.hs
gpl-3.0
23,914
0
24
7,600
6,561
3,238
3,323
538
9
{-| Module : Photobooth Description : Photobooth Core Copyright : (c) Chris Tetreault, 2014 License : GPL-3 Stability : experimental -} module DMP.Photobooth where import DMP.Photobooth.Core import DMP.Photobooth.Core.Types import DMP.Photobooth.Module.Types import Control.Monad.Trans (liftIO) import DMP.Photobooth....
christetreault/dmp-photo-booth-prime
DMP/Photobooth.hs
gpl-3.0
1,604
0
9
335
303
152
151
45
1
module Epics where import Data.List import GHC.Exts import Text.Printf --import Aggregate import Comm import Etran import Portfolio import Types import Utils data Epic = Epic { sym::Sym, eqty::Double , ucost::Double, uvalue::Double , cost::Pennies, value::Pennies, ret::Double} deriving (Show) showE...
blippy/sifi
src/Epics.hs
gpl-3.0
3,295
0
12
832
974
528
446
73
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Main where import Fizz import Fizz.Core as Fizz import Fizz.Infuser as Infuser import qualified Fizz.Store as Fizz import Fizz.Utils (showDollars, between...
josuf107/Fizzckle
src/FizzWeb.hs
gpl-3.0
9,827
0
24
2,462
3,238
1,657
1,581
233
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Sheets.Types.Sum -- Copyright : (c) 2015-2016 Brendan ...
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Sum.hs
mpl-2.0
178,343
0
11
39,973
21,237
11,483
9,754
2,552
0
{-# LANGUAGE DataKinds , GADTs , KindSignatures #-} module Avro.Inspector ( Inspector ( ANull , ABool , AInt , ALong , AFloat , ADouble , ABytes , AString , ARecord , AEnum , AArray , AMap , AFixed ) ) wher...
cumber/havro
src/Avro/Inspector.hs
lgpl-3.0
1,725
0
10
636
392
239
153
72
0
module Serialization where import Protolude import Data.Serialize as S import Gen import Key import Hedgehog import Hedgehog.Gen encodeThenDecode :: Serialize a => a -> Either [Char] a encodeThenDecode = S.decodeLazy . S.encodeLazy prop_blockHeaderSerialization :: Property prop_blockHeaderSerialization = propert...
tdietert/nanocoin
test/Serialization.hs
apache-2.0
1,136
0
11
176
294
151
143
30
1
module HeronianTriangles.A305704 (a305704, a305704_list) where import HelperSequences.A051518 (a051518_list) -- Even numbers not in A051518 a305704_list :: [Integer] a305704_list = map (`div` 2) a051518_list a305704 :: Int -> Integer a305704 n = a305704_list !! (n-1)
peterokagey/haskellOEIS
src/HeronianTriangles/A305704.hs
apache-2.0
270
0
7
36
77
46
31
6
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Control.Monad.Reader import Network.HTTPMock import Web.Shipping.Tracking.USPS -- FOR TESTING main :: IO () main = print =<< trackDat trackDat = runReaderT (getTrackingData myTrackingNumber) ctx myTrackingNumber = TrackingNumber "bogus" ctx = Req...
MichaelXavier/Shipping
Main.hs
bsd-2-clause
385
0
7
53
90
51
39
11
1
module Model.Household where import Import import Data.Maybe (listToMaybe) findHousehold owner = listToMaybe <$> selectList [HouseholdOwner ==. owner] [LimitTo 1]
MasseR/shoppinglist
Model/Household.hs
bsd-2-clause
165
0
8
21
49
27
22
4
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.Annotation.Helpers ( tmAnnotation ) where import Control.Lens (review) import Ast.Type import Ast.Term import Fragment.Annotation.Ast.Term tm...
dalaing/type-systems
src/Fragment/Annotation/Helpers.hs
bsd-3-clause
506
0
8
127
107
58
49
12
1
module Hash ( runInteractive, runScript ) where import Parsing.HashParser import Language.Exec import Control.Monad (when) import Language.Commands (command_tb, CommandTable, ScriptState(..)) import Language.Expressions import System.Directory import System.IO import qualified Data.Map as M import Data.Maybe impor...
edi-smoljan/FER-PUH-2014-Hash
Hash.hs
bsd-3-clause
1,625
0
17
468
503
241
262
49
4
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Main where -----------------------------------...
Soostone/cassy
test/Test.hs
bsd-3-clause
5,619
0
15
1,359
1,215
659
556
-1
-1
module Hub.HelpText(helpText) where helpText :: String helpText = unlines [ " Hub Help Page" , " " , " hub --usage is an aliase for the 'hub usage' command" , " hub --help is an aliase for the 'hub help' command" , " hub --version is an aliase for the 'hub version' co...
Lainepress/hub-src
Hub/HelpText.hs
bsd-3-clause
8,065
0
6
2,981
639
424
215
208
1
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-} module Language.Haskell.Exts.Desugar.Generic.Expression where import Prelude hiding (error,foldl,any,foldr) -- import Prelude (Integer,Enum(..)) --import Text.Show (Show(..)) import Language.Haskell.Exts hiding (binds,name) import Language.Haskell.E...
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/Desugar/Generic/Expression.hs
bsd-3-clause
16,627
2
26
5,581
3,984
2,066
1,918
255
33
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- keep TH usage here -- | Constants used throughout the project. module Stack.Constants (buildPlanDir ,buildPlanCacheDir ,haskellFileExts ,haskellPreprocessorExts ,stackDotY...
juhp/stack
src/Stack/Constants.hs
bsd-3-clause
16,161
0
12
2,641
3,073
1,673
1,400
385
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Examples.Puzzles.Counts -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Consider the sentence: -- -- @ -- In this sentence, t...
josefs/sbv
Data/SBV/Examples/Puzzles/Counts.hs
bsd-3-clause
3,507
0
31
1,156
636
349
287
38
1
import qualified System.IO.Streams.Lzma as LZMA import qualified System.IO.Streams as Streams import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit hiding (Test) import qualified Data.By...
hvr/lzma-streams
src-tests/lzma-streams-test.hs
bsd-3-clause
1,712
0
15
440
577
305
272
44
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Copyright : (c) 2014 Ricky Elrod -- License : BSD3 -- -- Maintainer : Ricky Elrod <ricky@elrod.me> -- Stability : experimental -- -- Provides functions and datatypes for searching Fedora Packages. -...
relrod/fedora-packages-hs
src/Fedora/Packages/Search.hs
bsd-3-clause
2,830
0
21
870
656
366
290
68
1
module Rabbit ( bindHandlers , echoToSlack , doRpc , logQ , rpcQ , runRabbit , rpcDownload ) where import Control.Monad.IO.Class (liftIO) import Control.Monad.Reader (asks) import qualified Data.ByteString.Lazy.Char8 as BC import Data.Monoid ((<>))...
jamesdabbs/zorya
src/Rabbit.hs
bsd-3-clause
2,982
0
17
812
915
482
433
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -fno-warn-unused-do-bind #-} module Blaze.Html5 (-- * Re-exports module Text.Blaze , module Text.Blaze.Html5 , module Text.Blaze.Html5.Attributes -- * Wrapper for class attribute , ClassAttributeValue(..) , toClassValue -- * Attribute combinators , (...
zudov/blaze
src/Blaze/Html5.hs
bsd-3-clause
3,215
4
9
624
744
425
319
61
1
{-# LANGUAGE TemplateHaskell #-} -- | The @member@ element of a OSM file. module Data.Geo.OSM.Member ( Member , member ) where import Text.XML.HXT.Arrow.Pickle import Data.Geo.OSM.MemberType import Data.Geo.OSM.Lens.TypeL import Data.Geo.OSM.Lens.RefL import Data.Geo.OSM.Lens.RoleL import Control.Lens.TH -- | The @...
tonymorris/geo-osm
src/Data/Geo/OSM/Member.hs
bsd-3-clause
1,196
0
12
230
288
171
117
37
1
module Text.Keepalived ( -- * Module imports module Text.Keepalived.Parser , module Text.Keepalived.Lexer , module Text.Keepalived.Types -- * Helper functions , parseFromFile , parseString ) where import Text.Keepalived.Parser import Text.Keepalived.Lexer import Text.Keepalived.Types import Data.Ei...
maoe/text-keepalived
src/Text/Keepalived.hs
bsd-3-clause
1,045
0
16
249
329
165
164
34
3
main = interact shortLinesOnly -- main = do -- contents <- getContents -- putStr (shortLinesOnly contents) shortLinesOnly :: String -> String shortLinesOnly input = let allLines = lines input shortLines = filter (\line -> length line < 10) allLines result = unlines shortLines in result
randallalexander/LYAH
src/Ch9/shortlines.hs
bsd-3-clause
319
0
13
77
76
39
37
7
1
{-# LANGUAGE ScopedTypeVariables, BangPatterns, GADTs, FlexibleContexts, FlexibleInstances, TypeFamilies, NoMonomorphismRestriction #-} module HEP.Parser.LHCOAnalysis.Analysis where import HEP.Parser.LHCOAnalysis.PhysObj import Debug.Trace import qualified Data.ListLike as LL import qualified Data.Ite...
wavewave/LHCOAnalysis
trash/Analysis.hs
bsd-3-clause
2,571
0
18
1,004
396
201
195
37
3
module Logo.Evaluator where import Logo.Types import qualified Data.Map as M import Control.Monad (replicateM) import Control.Applicative ((<$>), (<|>)) import Control.Arrow ((&&&), (***)) import Control.Monad.Trans (lift) import Text.Parsec.Prim (runParserT, tokenPrim, getState, putState, modifyState) import Text....
deepakjois/hs-logo
src/Logo/Evaluator.hs
bsd-3-clause
6,225
0
15
1,275
1,816
945
871
104
7
-- 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. module Duckling.Dimensions.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import...
facebookincubator/duckling
tests/Duckling/Dimensions/Tests.hs
bsd-3-clause
1,319
0
7
184
227
159
68
33
1
{- | Module : ./GMP/GMP-CoLoSS/GMP/Logics/DisjUnion.hs - Description : Implementation of logic instance of disjoint union of features - Copyright : (c) Daniel Hausmann & Georgel Calin & Lutz Schroeder, DFKI Lab Bremen, - Rob Myers & Dirk Pattinson, Department of Computing, ICL - License ...
spechub/Hets
GMP/GMP-CoLoSS/GMP/Logics/DisjUnion.hs
gpl-2.0
3,249
0
18
730
1,040
549
491
45
0
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-} {- Copyright (C) 2009 Ivan Lazar Miljenovic <Ivan.Miljenovic@gmail.com> This file is part of SourceGraph. SourceGraph 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 Foundat...
dzotokan/SourceGraph
Parsing/State.hs
gpl-3.0
2,791
0
9
642
351
198
153
40
1
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - 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 requir...
J2RGEZ/haskell-do
src/ghcjs-specific/Foreign/JQuery.hs
apache-2.0
3,184
80
7
994
693
378
315
-1
-1
import Distribution.Simple import Distribution.Simple.Program.Types import System.Exit import System.Process main = defaultMain
balangs/eTeak
Setup.hs
bsd-3-clause
170
0
4
53
28
17
11
5
1
-- Work stealing scheduler and thread pools -- -- Visibility: HdpH.Internal -- Author: Patrick Maier <P.Maier@hw.ac.uk> -- Created: 06 Jul 2011 -- ----------------------------------------------------------------------------- {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- req'd for type 'RTS' {-# LANGUAGE ScopedTypeV...
bitemyapp/hdph-rs
src/Control/Parallel/HdpH/Internal/Scheduler.hs
bsd-3-clause
14,924
0
23
3,274
2,924
1,549
1,375
210
11
{-# LANGUAGE PatternGuards, ScopedTypeVariables, ExistentialQuantification, DeriveDataTypeable #-} -- | This module captures annotations on a value, and builds a 'Capture' value. -- This module has two ways of writing annotations: -- -- /Impure/: The impure method of writing annotations is susceptible to over-opti...
copland/cmdargs
System/Console/CmdArgs/Annotate.hs
bsd-3-clause
9,331
0
16
2,322
2,663
1,368
1,295
148
7
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, expectedKindInCtxt, checkValidTheta, checkValidFamPats, checkValidInstance, validDerivPred, checkInstTermina...
green-haskell/ghc
compiler/typecheck/TcValidity.hs
bsd-3-clause
55,441
5
16
15,730
8,264
4,212
4,052
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Typechecking class declarations -} {-# LANGUAGE CPP #-} module TcClassDcl ( tcClassSigs, tcClassDecl2, findMethodBind, instantiateMethod, tcClassMinimalDef, HsS...
nushio3/ghc
compiler/typecheck/TcClassDcl.hs
bsd-3-clause
19,623
0
15
6,370
3,392
1,777
1,615
255
2
module Lets.GetSetLens ( Lens(..) , getsetLaw , setgetLaw , setsetLaw , get , set , modify , (%~) , fmodify , (|=) , fstL , sndL , mapL , setL , compose , (|.) , identity , product , (***) , choice , (|||) , cityL , countryL , streetL , suburbL , localityL , ageL , nameL , addressL , getSuburb , setStreet , getAgeAnd...
bitemyapp/lets-lens
src/Lets/GetSetLens.hs
bsd-3-clause
10,549
0
10
2,395
2,170
1,272
898
279
1
{-# LANGUAGE OverloadedStrings #-} module GitHub.ReposSpec where import GitHub (Auth (..), FetchCount (..), Repo (..), RepoPublicity (..), github, repositoryR) import GitHub.Endpoints.Repos (currentUserReposR, languagesForR, userReposR) import Data.Either.Compat (isRight) import Data.String (from...
jwiegley/github
spec/GitHub/ReposSpec.hs
bsd-3-clause
1,720
0
17
370
544
280
264
42
2
module Graceful.Test where import Graceful.Graceful import Graceful.Labeling import Graph.Graph import Graph.Viz main = --writeFile "./graph.out" (getGraphviz Graceful bsp_einfach_g bsp_einfach_l) --transGtoGV bsp_einfach_g bsp_einfach_t --getBeweis Graceful bsp_einfach_g bsp_einfach_l "graph" --getBeweis Gracef...
Erdwolf/autotool-bonn
src/Graph/Graceful/Test.hs
gpl-2.0
1,788
24
9
402
580
344
236
50
1
{-| Generic code to work with jobs, e.g. submit jobs and check their status. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions ...
apyrgio/ganeti
src/Ganeti/Jobs.hs
bsd-2-clause
6,601
0
19
1,636
1,459
745
714
106
3
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeSynonymInstances #-} -- | Hackish Haddock module. module Plugin.Haddock (theModule) where import Plugin import qualified Data.Map as M import qualified Data.ByteString.Char8 as P import Data.ByteString.Char8 (ByteString,pack) $(plugin "Haddock") type HaddockS...
zeekay/lambdabot
Plugin/Haddock.hs
mit
935
0
13
215
249
136
113
19
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Int.BoundedInt.IntProgress ( -- * The IntProgress Widget IntProgress, -- * Constructor mkIntProgress) where -- To keep `caba...
artuuge/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
mit
1,677
0
13
398
274
155
119
35
1
import Control.Concurrent import Control.Monad import Data.Char import Data.IORef import System.Environment import System.IO import GHC.Conc import Foreign hiding (complement) newtype Color = C Int deriving (Storable,Enum) #define Y (C 2) #define R (C 1) #define B (C 0) instance Show Color where show Y = "yellow" ...
kayceesrk/effects-examples
mvar/chameneos.hs
isc
2,525
0
20
946
1,081
532
549
-1
-1
{- Check that we aren't making gcc misinterpret our strings as trigraphs. #2968. http://gcc.gnu.org/onlinedocs/cpp/Initial-processing.html -} module Main where main :: IO () main = do putStrLn "??(" putStrLn "??)" putStrLn "??<" putStrLn "??>" putStrLn "??=" putStrLn...
sdiehl/ghc
testsuite/tests/codeGen/should_run/cgrun063.hs
bsd-3-clause
403
0
7
126
74
30
44
11
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , BangPatterns , AutoDeriveTypeable #-} {-# OPTIONS_GHC -fno-warn-identities #-} -- Whether there are identities depends on the platform {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------...
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/IO/FD.hs
bsd-3-clause
23,093
3
17
5,933
4,273
2,228
2,045
322
5
{-# LANGUAGE TypeFamilies #-} module OverDirectThisModB where import OverDirectThisModA (C, D) data instance C [Int] [a] = CListList2 type instance D [Int] [a] = Int
shlevy/ghc
testsuite/tests/indexed-types/should_fail/OverDirectThisModB.hs
bsd-3-clause
169
0
6
28
54
33
21
5
0
module Gen.Phonology ( makeDiphInventory , makeConsonantMap , makeConsonants , makeVowelMap , makeVowels , makeTones , makeStresses ) where -- Import import ClassyPrelude import Data.RVar import Data.Random.Extras import Data.Random hiding (sample) import Data.Phoneme import HelperFunctions import Constants -- Mak...
Brightgalrs/con-lang-gen
src/Gen/Phonology.hs
mit
8,761
0
16
2,688
2,496
1,396
1,100
151
1
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, GADTs #-} module Vn where import Vector import DepTypes data VNil a = VNil data VCons v a = VCons a (v a) type V0 = VNil type V1 = VCons V0 type V2 = VCons V1 type V3 = VCons V2 type V4 = VCons V3 type V5 = ...
plneappl/HaskellVectorsETC
Vn.hs
mit
1,845
0
8
493
819
427
392
57
1
{-# LANGUAGE UnicodeSyntax #-} module Main (main) where import Data.List (genericLength) import Data.Maybe (catMaybes) import System.Exit (exitFailure, exitSuccess) import System.Process (readProcess) import Text.Regex (matchRegex, mkRegex) import Prelude.Unicode import Control.Monad.Unicode argumen...
odis-project/odis-core
test-suite/Haddock.hs
mit
843
2
11
164
278
151
127
24
2
module Handler.SetSkillLevel where import Import import qualified Network.Wai as WAI skillLevelForm :: Maybe SkillLevel -> Form (Maybe SkillLevel) skillLevelForm sl = renderDivs $ aopt (selectField optionsEnum) "Skill level" (Just sl) postSetSkillLevelR :: TutorialId -> Handler () postSetSkillLevelR tid = do ...
fpco/schoolofhaskell.com
src/Handler/SetSkillLevel.hs
mit
907
0
15
219
284
133
151
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| Write binary data out to .tap format. The BASIC code for the loader is based on that from bin2tap, downloaded from here: http://metalbrain.speccy.org/link-eng.htm. .tap files support concatenation, so you can join them together using `mappend` For example, assuming you are usin...
dpwright/zxspectrum
src/ZXSpectrum/TAP.hs
mit
6,500
0
14
1,637
1,537
832
705
112
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} -- Copyright (c) 2009 Daniel Schoepe -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source co...
fmap/hwb
src/HWB/Plugin/Utilities/ExtensibleState.hs
mit
2,599
0
13
550
367
217
150
-1
-1
{- arch-tag: Euither utilities Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org> All rights reserved. For license and copyright information, see the file LICENSE -} {- | Module : Data.Either.Utils Copyright : Copyright (C) 2004-2011 John Goerzen License : BSD3 Maintainer : John Goerze...
haskellbr/missingh
missingh-all/src/Data/Either/Utils.hs
mit
2,424
0
8
559
417
213
204
32
1
{-# LANGUAGE OverloadedStrings #-} module Y2021.M02.D02.Exercise where import Data.Aeson import Data.Aeson.WikiDatum (Name) import Data.Relation import Graph.Query import Graph.JSON.Cypher (matchSet) {-- With this neo4j cypher query against a CSV file of wine-tasters and wines: LOAD CSV WITH HEADERS FROM 'http...
geophf/1HaskellADay
exercises/HAD/Y2021/M02/D02/Exercise.hs
mit
1,111
0
8
191
161
97
64
20
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGAnimatedLengthList (js_getBaseVal, getBaseVal, js_getAnimVal, getAnimVal, SVGAnimatedLengthList, castToSVGAnimatedLengthList, gTypeSVGAnimatedLengthList) where import Prelude ((.),...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGAnimatedLengthList.hs
mit
1,911
12
10
235
460
283
177
31
1
{- Somehwat modified ghc-pkg, customizes default database locations and lib names based on GHC repository revision 1c0b7362068d05b68bd7e05c4d2ef51da9533bf7 -} {-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, RecordWildCards, GeneralizedNewtypeDeriving, StandaloneDeriving #-} {-# OPTIONS_GHC ...
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src-bin/Pkg.hs
mit
83,270
49
100
23,389
18,097
9,199
8,898
1,388
32
{-# LANGUAGE OverloadedStrings #-} import Prelude hiding ((**), div, span) import Control.Monad import Clay import qualified Clay.Media as M import Data.Monoid import qualified Data.Text.Lazy.IO as T -- colors blogRed = "#6D3B34" blogLightGray = "#E7E4E7" blogGreen ...
rjregenold/blog
css/blog.hs
mit
3,641
0
18
1,013
1,322
631
691
-1
-1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.AudioStreamTrack (js_newAudioStreamTrack, newAudioStreamTrack, AudioStreamTrack, castToAudioStreamTrack, gTypeAudioStreamTrack) where import Prelude ((.), (==), (>>=), return, IO, Int, Float,...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/AudioStreamTrack.hs
mit
1,619
6
12
237
387
243
144
29
1
{- | Module : Control.Monad.Levels.Writer.Lazy Description : Lazy writer monad Copyright : (c) Ivan Lazar Miljenovic License : MIT Maintainer : Ivan.Miljenovic@gmail.com -} module Control.Monad.Levels.Writer.Lazy ( writer , tell , HasWriter , listen , CanListen , ListenFn , ...
ivan-m/monad-levels
Control/Monad/Levels/Writer/Lazy.hs
mit
477
0
6
111
73
51
22
14
0
{-| Module : Main Description : Runs the program. Copyright : (c) Christopher Wells, 2016 License : MIT Maintainer : cwellsny@nycap.rr.com -} module Main where import Test.SystemTest.Main -- | Runs the main function of the program. main :: IO () main = progMain
ExcaliburZero/system-test-haskell
Main.hs
mit
276
0
6
57
27
17
10
4
1
module Main where import Control.Monad.Except import Data.IORef import Data.Logic.Propositional import Data.Logic.Propositional.Class import Data.String testThm = Theorem (Conjunction (Variable "A") (Negation (Variable "A"))) varA = Variable "A" varB = Variable "B" -- This tests the basic non-bindings proving. Tr...
kisom/plc
src/Main.hs
mit
2,203
0
13
546
589
304
285
47
2
{-# LANGUAGE TemplateHaskell #-} module Examples.Diffs.FirstDiff where import CornerPoints.Radius(Radius(..)) import CornerPoints.HorizontalFaces(createBottomFaces, createTopFaces) import CornerPoints.Create(Angle(..), flatXSlope, flatYSlope, Origin(..)) import CornerPoints.CornerPoints((|@+++#@|), (|+++|), CornerPoin...
heathweiss/Tricad
src/Examples/Diffs/FirstDiff.hs
gpl-2.0
16,452
0
32
4,662
3,751
2,096
1,655
214
1
module Language.Mulang.Analyzer.TestsAnalyzer ( analyseTests) where import Language.Mulang import Language.Mulang.Analyzer.Analysis (TestAnalysisType(..)) import Language.Mulang.Analyzer.FragmentParser (parseFragment') import Language.Mulang.Builder (merge) import Language.Mulang.Interpreter.Runner (runTests, TestRe...
mumuki/mulang
src/Language/Mulang/Analyzer/TestsAnalyzer.hs
gpl-3.0
991
0
9
169
266
146
120
17
1
module Dsgen.SetSelect ( -- * Types Emphasis(..), Filter, ComplexityFilterOption(..), Rule, ReactionRuleOption(..), TrasherRuleOption(..), Addition, ColPlatAdditionOption(..), SheltersAdditionOption(..), SetSelectOptions(..), SetSelectResult(..), SetSelectError, ...
pshendry/dsgen
src/Dsgen/SetSelect.hs
gpl-3.0
650
0
5
168
117
82
35
25
0
{-# LANGUAGE DeriveDataTypeable #-} module InnerEar.Exercises.ThresholdOfSilence (thresholdOfSilenceExercise) where import Reflex import Reflex.Dom import Data.Map import Text.JSON import Text.JSON.Generic import Sound.MusicW import InnerEar.Exercises.MultipleChoice import InnerEar.Types.ExerciseId import InnerEar....
d0kt0r0/InnerEar
src/InnerEar/Exercises/ThresholdOfSilence.hs
gpl-3.0
4,227
0
15
662
1,188
641
547
73
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import GI.Gtk (widgetShowAll, onWidgetDestroy, setContainerChild, setWindowTitle, windowNew, mainQuit, menuItemNewWithLabel, menuItemNewWithMnemonic, onMenuItemActivate, menuShellAppend, menuItemSetSubmenu, menuNew, menuBarNew) ...
haskell-gi/gi-gtk-examples
menu/MenuDemo.hs
lgpl-2.1
2,828
0
15
814
451
234
217
43
2
{-# LANGUAGE OverloadedStrings #-} import Test.HUnit (runTestTT) import TestComboLoads (testComboLoads) import TestDistLoads (testDistLoads) import TestPointLoads (testPointLoads) import TestNodes (testNodes) import TestLoads (testLoads) main = do runTestTT testNodes runTestTT testLoads runTestTT testDist...
baalbek/stearnswharf
t/testStearnsWharf.hs
lgpl-3.0
384
0
7
57
87
45
42
13
1
import LLVM.General.AST hiding (type') import LLVM.General.AST.Global import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Type as T import qualified LLVM.General.AST.Linkage as L import qualified LLVM.General.AST.Constant as C import qualified LLVM.General.AST.CallingConvention as CC import LLVM....
scturtle/fun.hs
helloworld.hs
unlicense
2,249
1
26
853
637
355
282
48
1
module Topical.VSpace.IO where
erochest/topical
src/Topical/VSpace/IO.hs
apache-2.0
31
0
3
3
7
5
2
1
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} -- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx> -- -- 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:/...
locaweb/leela
src/warpdrive/src/Leela/Storage/Passwd.hs
apache-2.0
3,825
0
13
1,055
1,114
609
505
79
3
module Data where -- A data type of expression forms data Exp = Lit Int | Add Exp Exp
egaburov/funstuff
Haskell/tytag/xproblem_src/samples/expressions/Haskell/ClosedDatatype/Data.hs
apache-2.0
88
0
6
21
21
13
8
2
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QFtp.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:31 Warning : this file is machine generated - do not modi...
keera-studios/hsQt
Qtc/Network/QFtp.hs
bsd-2-clause
17,395
0
15
3,288
6,169
3,148
3,021
-1
-1
{-# LANGUAGE BangPatterns #-} module Main (main) where import Data.Word import qualified Data.ByteString.Char8 as C import Data.Hashabler -- neat; ghc fully evaluates this hash at compile time before core: -- main = print $ siphash64 (SipKey 1 2) (1::Word64, 2::Word32, 3::Word16, 4::Word8) main = C.getLine >>= p...
jberryman/hashabler
core.hs
bsd-3-clause
633
0
8
142
58
36
22
7
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} -- ^ -- Facade that provides consistent access to persistence functionality module Persistence.Facade ( dbDelete , dbDeleteByQuery , dbDeleteMulti , dbGetExisting , dbGetExistingMulti , dbInsert , dbInsertMulti , dbModify , dbModifyMulti ...
gabesoft/kapi
src/Persistence/Facade.hs
bsd-3-clause
10,201
0
14
1,890
3,198
1,661
1,537
238
2
module Main where import qualified Language.TransactSql.Parser as P main :: IO () main = do str <- readLn print (P.run P.parseQuery "stdin" str)
asztal/transact-sql
app/Main.hs
bsd-3-clause
151
0
10
29
55
30
25
6
1
module Main where import List (isPrefixOf) import Text.XML.HaXml.XmlContent import Text.XML.HaXml.Types import Text.PrettyPrint.HughesPJ (render) import Text.XML.HaXml.Pretty (document) -- Test stuff --value1 :: ([(Bool,Int)],(String,Maybe Char)) value1 = True --main = do (putStrLn . render . document . toXml) v...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/examples/SimpleTestBool.hs
bsd-3-clause
371
0
5
59
67
44
23
8
1
module FPNLA.Operations.BLAS_M.Strategies.GEMM.Utils ( asTrans, asNoTrans ) where import FPNLA.Matrix_M (Matrix(dim_m, elem_m, generate_m)) import FPNLA.Operations.Parameters (Elt(..), TransType(..)) -- ConjTrans could be optimized asTrans :: (...
mauroblanco/fpnla-examples
src/FPNLA/Operations/BLAS_M/Strategies/GEMM/Utils.hs
bsd-3-clause
1,030
0
12
403
407
210
197
25
3
{-# LANGUAGE RecordWildCards #-} module Internal.ARM (toolChain) where import Internal.ToolChain import System.FilePath samDir :: FilePath samDir = "c:/Users/marten/AppData/Local/Arduino15/packages/arduino/hardware/sam/1.6.11" toolChain :: ToolConfig -> ToolChain toolChain tc@ToolConfig{..} = ToolChain{..} where...
marangisto/karakul
src/Internal/ARM.hs
bsd-3-clause
4,046
0
10
926
800
462
338
118
1
{-# LANGUAGE GADTs #-} module Network.LambNyaa.Item where import Data.Hashable import Control.Monad.Identity -- | Vanity type for URLs. type URL = String -- | A data item. What, exactly, a data item represents depends on the source. -- Eq and Ord instances are based on the item's itmIdentifier field for -- perfor...
valderman/lambnyaa
Network/LambNyaa/Item.hs
bsd-3-clause
2,886
0
11
1,005
507
273
234
41
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Ast.Type.Var ( HasTyVarSupply(..) , ToTyVar(.....
dalaing/type-systems
src/Ast/Type/Var.hs
bsd-3-clause
904
0
10
174
241
132
109
25
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.MatrixPalette -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/MatrixPalette.hs
bsd-3-clause
1,149
0
4
127
88
66
22
18
0
{-# LANGUAGE FlexibleContexts #-} module Scale.Tests ( tests ) where import Test.HUnit import Text.Parsec (parse) import Turtle.Options.Scale (Scale(..), scale) scaleTest :: Test scaleTest = TestList $ map testCase cases where cases = [ ("5", Percentage 5) , ("10%", Percentage 0.1) , ("480x3...
elaye/turtle-options
test/Scale/Tests.hs
bsd-3-clause
622
0
12
157
217
122
95
20
2
{-# LANGUAGE OverloadedStrings #-} import qualified Control.Monad.Remote.JSON as Remote import Control.Monad.Remote.JSON import Data.Aeson import Control.Monad (void) import qualified VChanUtil as VChan import VChanUtil createSession :: LibXenVChan -> Session createSession chan = defaultSession Strong (\v-> do ...
roboguy13/remote-json
example/Strong/VChanClient.hs
bsd-3-clause
2,181
0
14
1,197
463
221
242
42
2
module System.Build.Access.AnnotationOptions where import System.Build.Data.KeyPValue class AnnotationOptions r where annotationOptions :: Maybe KeyPValue -> r -> r getAnnotationOptions :: r -> Maybe KeyPValue
tonymorris/lastik
System/Build/Access/AnnotationOptions.hs
bsd-3-clause
237
0
8
50
52
29
23
10
0
module GHCApi ( withGHC , withGHCDummyFile , initializeFlags , initializeFlagsWithCradle , setTargetFile , getDynamicFlags , checkSlowAndSet ) where import CabalApi import Control.Applicative import Control.Exception import Control.Monad import CoreMonad import Data.Maybe (isJust) import DynFlags imp...
eagletmt/ghc-mod
GHCApi.hs
bsd-3-clause
4,585
0
14
896
1,160
591
569
103
1
-- Copyright (c) 1998 Chris Okasaki. -- See COPYRIGHT file for terms and conditions. module ListSeq ( -- type synonym Seq, -- sequence operations empty,single,cons,snoc,append,lview,lhead,ltail,rview,rhead,rtail, null,size,concat,reverse,reverseOnto,fromList,toList, map,concatMap,foldr,foldl...
OS2World/DEV-UTIL-HUGS
oldlib/ListSeq.hs
bsd-3-clause
8,312
0
11
2,485
3,925
2,178
1,747
214
2
{-# LANGUAGE CPP #-} -- We cannot actually specify all the language pragmas, see ghc ticket # -- If we could, these are what they would be: {- LANGUAGE MagicHash, UnboxedTuples, NamedFieldPuns, BangPatterns, RecordWildCards -} {-# OPTIONS_HADDOCK prune #-} -- | -- Module : Data.ByteString -- Copyright...
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString.hs
bsd-3-clause
78,702
0
20
23,325
13,856
7,461
6,395
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} -- | A module for documenting Java source files using @javadoc@. module System.Build.Java.Javadoc ( Javadoc -- * @Javadoc@ values , javadoc ) where import System.Build.Access.Overview import System.Build.Access.Public import System.Build.Access.Protected import System.Build....
tonymorris/lastik
System/Build/Java/Javadoc.hs
bsd-3-clause
18,044
0
18
5,732
4,376
2,528
1,848
572
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Applicative import Control.Arrow import Control.Exception import Control.Lens import ...
anchor/oauth2-server
test/acceptance.hs
bsd-3-clause
25,371
0
25
8,169
6,125
3,077
3,048
-1
-1
module Language.StreamIt.Graph ( StreamItT (..) , StreamIt , StatementS (..) , FileMode (..) , GraphDecl , evalStream , execStream , findDefs , add , add1 , add2 , add3 , pipeline , pipeline_ , splitjoin , splitjoin_ , split , join , roundrobin , fileReader , fileWriter ) w...
adk9/haskell-streamit
Language/StreamIt/Graph.hs
bsd-3-clause
10,218
0
16
2,618
4,450
2,270
2,180
-1
-1