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 GeneralizedNewtypeDeriving #-} {-# LANGUAGE ViewPatterns #-} module Assembler where import Asm import Free import Control.Monad.Identity import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State hiding ( put ) import qualified Data.Binary.Put as P import Data.Bits import qualifi...
djeik/fuckdown2
src/Assembler.hs
mit
11,585
0
19
4,153
3,871
1,862
2,009
355
32
module Main where import Data.List import Control.Concurrent import Control.Monad import Codec.Picture import qualified Data.Matrix as M import qualified Data.Vector as V type RealNum = Float type Vector = M.Matrix RealNum type Point = Vector type Radius = RealNum type Transform = M.Matrix RealNum yellowPixel = Pixe...
rfdickerson/haskell-raytracer
src/Main.hs
mit
4,486
0
15
1,254
1,667
898
769
121
2
{-# LANGUAGE FlexibleContexts #-} module Wf.Network.Http.Request ( Request(..) , HttpVersion , RequestMethod , RequestHeader , RequestQuery , UrlEncoded(..) , queryParam ) where import Wf.Network.Http.Types (Request(..), HttpVersion, RequestMethod, RequestHeader, RequestQuery, UrlEncoded(..)) import Control.Monad (jo...
bigsleep/Wf
src/Wf/Network/Http/Request.hs
mit
691
0
10
95
212
130
82
20
1
-- | Contains internal data structures which represents original datum. {- Parser notes: - Face vertex only, no point or line vertices allowed. - Vertex tag allows only <PREF> tags, no inline <P> tags allowed. Same for normals and texture coordinates. -} module Codec.Soten.Data.XglData ( Model(..) , Autho...
triplepointfive/soten
src/Codec/Soten/Data/XglData.hs
mit
6,024
0
13
1,744
817
495
322
164
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} import Models import Config import Actions.Types import Actions import qualified Database.Persist as DB import qualified Database.Persist.Postgresql as DB import Web.Scotty.Trans import Data.Aeson (Value (Null),...
benweitzman/PhoBuddies
src/Main.hs
mit
1,109
0
15
208
341
172
169
35
3
module Framework.L0 where import Framework.LangFramework data Program = Prog [Func] Main data Main = Main [Block] data Func = Func Name [Var] [Block] data Block = Block Label [Expr] | EmptyBlock [Expr] data Expr = SetP Var Prim | SetB Var Bop | SetC Var Call | Begin [E...
cgswords/Grift
Framework/L0.hs
mit
556
0
7
182
195
112
83
25
0
module Discern.GHC.Type where import Discern.Type import qualified Class as G import qualified GHC as G import qualified Name as G import qualified Outputable as G import qualified Type as G import qualified Var as G unTypeTyVar :: Type -> Either String TyVar unTypeTyVar (TypeTyVa...
TravisWhitaker/discern
src/Discern/GHC/Type.hs
mit
3,042
0
16
938
913
458
455
52
4
module Help.Command where import Data.List data Command = Command { cmd :: String, grupos :: [OptionGroup] } instance Show Command where show (Command c o) = c ++ " " ++ show o data OptionGroup = OptionGroup { groupName :: String, options :: [Option] } mapGroup :: (Option -> a) -> OptionGroup -...
Miguel-Fontes/hs-file-watcher
src/Help/Command.hs
mit
789
0
9
219
325
172
153
24
1
module Context where import Data.List (nub) type Context = [(String,String)] ctx = [] has :: String -> Context -> Bool has x [] = False has x ((k,v):cs) = if (x==k) then True else has x cs get :: String -> Context -> String get x ((k,v):cs) = if (x==k) then v else get x cs put :: String -> St...
thiry/DComp
src/Context.hs
gpl-2.0
635
0
16
166
351
202
149
16
2
module Scene.Main ( scene , MainState(..) ) where import Data.IORef import System.Directory (createDirectoryIfMissing, doesFileExist) import System.Environment (getEnv) import Demo -- (ReplayInfo(), demoData) import Game (isGameover, render, update) import Monadius import Recorder import Util (padding) import ...
keqh/Monadius_rewrite
Monadius/Scene/Main.hs
gpl-2.0
2,327
0
19
435
835
426
409
54
3
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module PGIP.GraphQL.Result.ConservativityStatus where import Data.Data data ConservativityStatus = ConservativityStatus { required :: String , proved :: String } deriving (Show, Typeable, Data)
spechub/Hets
PGIP/GraphQL/Result/ConservativityStatus.hs
gpl-2.0
300
0
8
79
50
31
19
7
0
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 3 of the Lice...
karamellpelle/grid
source/Game/LevelPuzzle/LevelPuzzleWorld/OutputState.hs
gpl-3.0
1,193
0
5
180
71
60
11
2
0
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 3 of the Lice...
karamellpelle/grid
source/Game/Run/RunWorld/Scene/Fancy/Values.hs
gpl-3.0
2,672
0
6
374
389
248
141
58
1
import Data.List import System data Lit a = Id a | Not a deriving Show type T = Int type CNF = [[Lit (T,T,T)]] level :: T level = 4 verts :: T verts = 2^level-1 edges :: T edges = 2^level-2+1 -- "virtual" edge 0 from node 1 to "parent" between :: T -> T -> T -> Bool between l u x = l <= x && x <= u encode :: (T,...
xkollar/handy-haskell
other/pt-2012-03/sat/kwak.hs
gpl-3.0
3,100
0
14
840
1,595
888
707
93
2
{- Copyright (C) 2009 John Millikin <jmillikin@gmail.com> 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 3 of the License, or any later version. This program is ...
astro/network-protocol-xmpp
Tests.hs
gpl-3.0
845
0
7
173
49
28
21
6
1
import Control.Monad import Data.List import System.Environment import System.Exit import System.IO import System.Random data Cell = Alive | Dead deriving (Show, Eq) step Alive Alive Alive = Dead step Alive Alive Dead = Alive step Alive Dead Alive = Alive step Alive Dead Dead = Dead step Dead Alive Alive = A...
h3nnn4n/Rule110
Rule110.hs
gpl-3.0
2,069
0
12
612
1,002
491
511
66
1
module Main where import Control.Monad (replicateM_) import Data.Attoparsec.ByteString.Char8 import Data.List (intercalate) import Pipes import System.Environment (getArgs) import System.IO import ...
cbpark/scalar-portal
src/hist_pdecay.hs
gpl-3.0
884
0
13
309
233
121
112
22
1
{-# LANGUAGE FlexibleInstances #-} module Pudding.Utilities.ComplexFunctions ( cabs , scaleComplex ) where import Data.Complex import Pudding.Utilities.FloatEq import Pudding.Utilities.DoubleFunctions complexEq :: Complex Double -> Complex Double -> Bool complexEq a b = (realPart a) ~= (realPart b) && (imagPart ...
jfulseca/Pudding
src/Pudding/Utilities/ComplexFunctions.hs
gpl-3.0
550
0
9
92
183
99
84
16
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Tables/Features/Get.hs
mpl-2.0
3,969
0
16
945
546
323
223
81
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Patch.hs
mpl-2.0
3,594
0
15
841
507
298
209
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/ExternalVPNGateways/Insert.hs
mpl-2.0
4,672
0
16
1,013
484
292
192
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs
mpl-2.0
5,425
0
17
1,283
848
492
356
119
1
---------------------------------------------------------------------- -- | -- Module : Graphics.UI.Awesomium.Javascript.JSValue -- Copyright : (c) 2012 Maksymilian Owsianny -- License : LGPL-3 (see the file LICENSE) -- -- Maintainer : Maksymilian.Owsianny+Awesomium@gmail.com -- Stability : Experime...
MaxOw/awesomium
src/Graphics/UI/Awesomium/Javascript/JSValue.hs
lgpl-3.0
2,195
0
9
350
412
236
176
53
1
module Git.Command.FastImport (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/FastImport.hs
unlicense
88
0
7
15
42
23
19
3
1
-- Copyright 1999-2011 The Text.XHtml 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...
robinbb/hs-text-xhtml
Text/XHtml/Transitional/Elements.hs
apache-2.0
2,067
0
5
591
200
120
80
31
1
stringEq :: [Char] -> [Char] -> Bool stringEq [] [] = True stringEq (x:xs) (y:ys) = x == y && stringEq xs ys stringEq _ _ = False
EricYT/Haskell
src/real_haskell/chapter-6/naiveeq.hs
apache-2.0
134
0
7
32
81
42
39
4
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-m...
donnie4w/tim
protocols/gen-hs/ITim_Iface.hs
apache-2.0
2,952
0
12
545
797
463
334
56
0
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ru-RU"> <title>Groovy Support</title> <maps> <homeID>top</homeID> <mapref location="map...
secdec/zap-extensions
addOns/groovy/src/main/javahelp/org/zaproxy/zap/extension/groovy/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
959
77
66
156
407
206
201
-1
-1
isPrime :: Int -> Bool isPrime 1 = False isPrime n = let lim = floor $ sqrt $ fromIntegral n in foldl (\acc x -> acc && rem n x /= 0) True [2..lim]
plilja/h99
p31.hs
apache-2.0
161
0
12
48
83
41
42
4
1
import LogicGrowsOnTrees.Parallel.Adapter.Threads (driver) import LogicGrowsOnTrees.Parallel.Main (RunOutcome(..),TerminationReason(..),simpleMainForExploreTree) import LogicGrowsOnTrees.Utils.WordSum (WordSum(..)) import LogicGrowsOnTrees.Examples.Queens (nqueensUsingBitsSolutions) main :: IO () main = simpleMai...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/tutorial/tutorial-11.hs
bsd-2-clause
743
0
15
172
192
104
88
15
3
{-# LANGUAGE CPP, ForeignFunctionInterface #-} module Network.Socket.ByteString.Internal ( mkInvalidRecvArgError #if !defined(mingw32_HOST_OS) , c_writev , c_sendmsg #endif ) where import System.IO.Error (ioeSetErrorString, mkIOError) #if !defined(mingw32_HOST_OS) import Foreign.C.Types (CInt) import Foreign...
tibbe/network-bytestring
Network/Socket/ByteString/Internal.hs
bsd-2-clause
1,229
0
9
247
232
142
90
19
1
{-# LANGUAGE CPP #-} #ifdef TEMPLATE_HASKELL {-# LANGUAGE TemplateHaskell #-} #endif module Happstack.Server.Internal.SocketTH(supportsIPv6) where #ifdef TEMPLATE_HASKELL import Language.Haskell.TH #endif import Network.Socket(SockAddr(..)) -- find out at compile time if the SockAddr6 / HostAddress6 constructors are...
arybczak/happstack-server
src/Happstack/Server/Internal/SocketTH.hs
bsd-3-clause
1,170
0
16
420
197
115
82
5
1
{-# LANGUAGE OverloadedStrings, RankNTypes #-} module EventToElement ( eventToElementAll, eventToElement, showElement, convert, ) where import Data.Conduit -- import Control.Arrow import Control.Applicative import Data.XML.Types -- import Data.Text (Text) import qualified Data.Text as T import Control.Monad.IO....
YoshikuniJujo/forest
subprojects/xmpp-analysis/EventToElement.hs
bsd-3-clause
4,692
20
17
922
1,393
678
715
100
7
module Horbits.Orbit.Anomaly where import Control.Applicative import Control.Monad import Data.List.NonEmpty as NE import Horbits.Dimensional.Prelude class Anomaly a where eccentricity :: a -> Dimensionless Double meanAnomaly :: a -> Dimensionless Double ...
chwthewke/horbits
src/horbits/Horbits/Orbit/Anomaly.hs
bsd-3-clause
1,487
0
15
402
505
256
249
30
0
module Util ( expandRecur , minimumOf, maximumOf , replace, replace2 , rotates , splitString ) where import Data.Text (split, pack, unpack) expandRecur :: Foldable t => (a -> Either (t a) [b]) -> a -> [b] expandRecur f = g . f where g (Left as) = concatMap (expandRecur f) as g (Right...
tyfkda/SolokusSolver
src/Util.hs
bsd-3-clause
1,034
0
11
264
552
290
262
26
2
module Sexy.Instances.BoolC () where import Sexy.Instances.BoolC.Bool ()
DanBurton/sexy
src/Sexy/Instances/BoolC.hs
bsd-3-clause
74
0
4
8
20
14
6
2
0
module Level.Render where #include "Utils.cpp" import Data.Foldable (foldrM) import Control.Monad (forM_, mapM_) import qualified Graphics.GL as GL import qualified Ressources as R import qualified Gamgine.Gfx as G import Gamgine.Math.Vect as V import qualified Gamgine.State.RenderState as RS import qualified GameData...
dan-t/layers
src/Level/Render.hs
bsd-3-clause
2,118
0
16
465
686
371
315
-1
-1
{-# LANGUAGE FlexibleContexts #-} -- ----------------------------------------------------------------------------- -- | -- Module : PixelParty.Main -- Copyright : (c) Andreas-Christoph Bernstein 2011 -- License : BSD3-style (see LICENSE) -- -- Maintainer : andreas.bernstein@googlemail.com -- Stability ...
bernstein/pixelparty
src/PixelParty/Main.hs
bsd-3-clause
8,863
0
17
1,968
2,575
1,315
1,260
169
4
{-# LANGUAGE TemplateHaskell,DataKinds #-} module HLearn.Optimization.QuasiNewton where import Control.DeepSeq import Control.Monad import Control.Monad.Random import Control.Monad.ST import Control.Lens import Data.List import Data.List.Extras import Data.Typeable import Debug.Trace import qualified Data.Vector a...
ehlemur/HLearn
src/HLearn/Optimization/QuasiNewton.hs
bsd-3-clause
4,622
0
20
1,519
1,259
709
550
-1
-1
{-# LANGUAGE OverloadedStrings, TypeFamilies, TupleSections, FlexibleContexts, PackageImports #-} import Data.UUID import System.Environment import System.Random import Control.Applicative import Control.Monad import "monads-tf" Control.Monad.State import Control.Concurrent (forkIO) import Data.Pipe import Data.Hand...
YoshikuniJujo/xmpipe
old/notlssv.hs
bsd-3-clause
2,736
22
18
549
1,217
614
603
78
7
{-# LANGUAGE OverloadedStrings #-} import Network.API.TLDR import Network.API.TLDR.HTTP import Network.API.TLDR.Types --import qualified Data.ByteString.Lazy.Char8 as B import Data.Aeson import Control.Monad (when) import Network.Http.Client import System.Exit (exitFailure) import Test.HUnit (Test(..), Counts(..)...
joshrotenberg/tldrio-hs
Test/TLDR.hs
bsd-3-clause
2,553
0
18
767
484
243
241
46
3
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ProjectHistory -- Copyright : -- License : BSD3-style (see LICENSE) -- -- Maintainer : -- Stability : unstable -- Portability : unportable -- -- Keeps tr...
eb-gh-cr/XMonadContrib1
XMonad/Hooks/ProjectHistory.hs
bsd-3-clause
2,936
0
12
714
470
273
197
37
1
{-# LANGUAGE DeriveGeneric , DataKinds , KindSignatures , InstanceSigs , RecordWildCards #-} module Data.Wizard where import qualified Data.Wizard.Command as Com import Data.Wizard.Model import qualified Data.Text as T import GHC.TypeLits import Data.FiniteDouble import Cont...
smobs/elblog
server/src/Data/Wizard.hs
bsd-3-clause
3,073
0
15
966
976
531
445
55
4
module System.Win32.Notify ( Event(..) , EventVariety(..) , Handler , WatchId(..) , WatchManager(..) , initWatchManager , killWatch , killWatchManager , watch , watchDirectory ) where import Control.Concurrent import Control.Concurrent.MVar import Data.Bits import Data.List (int...
haskell-fswatch/win32-notify
src/System/Win32/Notify.hs
bsd-3-clause
5,537
0
14
1,377
1,324
685
639
113
5
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE RankNTypes #-} module Graphics.UI.WX.Turtle( -- * meta data xturtleVersion, -- * types and classes Field, Turtle, ColorClass, -- * Field functions -- ** meta openField, closeField, waitField, topleft, center, -- ** o...
YoshikuniJujo/wxturtle
src/Graphics/UI/WX/Turtle.hs
bsd-3-clause
8,671
178
17
1,648
3,629
1,932
1,697
254
2
------------------------------------------------------------ -- The Xtract tool - an XML-grep. ------------------------------------------------------------ module Main where import System (getArgs, exitWith, ExitCode(..)) import IO import Char (toLower) import List (isSuffixOf) import Text.XML.HaXml.T...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/tools/Xtract.hs
bsd-3-clause
2,061
0
23
610
513
284
229
33
4
{-# LANGUAGE FlexibleContexts #-} module RDSTests.DBSnapshotTests ( runDBSnapshotTests ) where import Control.Applicative ((<$>)) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Resource (MonadResource, MonadBaseControl) import Data.Text (Text) import Test.Hspec import Cloud.AWS.RDS imp...
worksap-ate/aws-sdk
test/RDSTests/DBSnapshotTests.hs
bsd-3-clause
2,309
0
22
582
483
248
235
54
1
{-# LANGUAGE OverloadedStrings #-} {- HLINT ignore "Reduce duplication" -} module DTX2MIDISpec where import Codec.Midi (Midi (..)) import qualified Codec.Midi as Midi import DTX2MIDI import DTX2MIDI.DTX import DTX2MIDI.DTX.Parser import Test.Hspec spec :: Spec spec = do describe "keyCompletion" $ do it "retur...
akiomik/dtx2midi
test/DTX2MIDISpec.hs
bsd-3-clause
8,917
0
20
3,498
3,088
1,692
1,396
177
1
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-} module Talks.Free.UglyExample where import Talks.Free.Prelude import Talks.Free.Ugly import Data.Text (unpack) import Data.Monoid ((<>)) import Data.Foldable (elem) runUglyExample :: IO () runUglyExample = -- turn up logging do setSetting "log.level" "nois...
markhibberd/fp-syd-free
src/Talks/Free/UglyExample.hs
bsd-3-clause
1,636
0
10
451
377
187
190
44
6
{-# LANGUAGE NamedFieldPuns #-} -- | -- Module: Data.Pool -- Copyright: (c) 2013 Kim Altintop, (c) 2011 MailRank, Inc. -- License: BSD3 -- Maintainer: Kim Altintop <kim.altintop@gmail.com> -- Stability: experimental -- Portability: portable -- -- A high-performance striped pooling abstraction for managin...
kim/ex-pool
Data/Pool.hs
bsd-3-clause
9,073
0
24
2,735
2,303
1,156
1,147
185
3
module Atomo.Spawn where import Control.Concurrent import Control.Monad.State import Atomo.Types -- | Spawn a process to execute x. Returns the Process value. spawn :: VM Value -> VM Value spawn x = do e <- get chan <- liftIO newChan tid <- liftIO . forkIO $ do runWith (x >> return (particle "ok...
vito/atomo
src/Atomo/Spawn.hs
bsd-3-clause
396
0
16
101
135
67
68
12
1
module Pos.Infra.StateLock ( module X ) where import Pos.DB.GState.Lock as X
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/StateLock.hs
mit
102
0
4
36
22
16
6
3
0
{- Parser.hs: Parser for the Hamlet language Copyright (c) 2009, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing to: ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems G...
razvan9310/barrelfish
tools/hamlet/Parser.hs
mit
7,866
0
15
2,463
1,919
984
935
161
6
module SmallestSrcLocContainingCursor (testSelect) where import Test.Tasty import Test.Tasty.HUnit import Prelude hiding (span) import Language.Astview.SmallestSrcLocContainingCursor (smallestSrcLocContainingCursorPos) import Language.Astview.DataTree(annotateWithPaths) import Language.Astview.Language import Data....
jokusi/Astview
test/SmallestSrcLocContainingCursor.hs
mit
2,354
0
12
770
944
489
455
65
1
{- | Module : ./HasCASL/MinType.hs Description : choose a minimal type for overloaded terms Copyright : (c) Christian Maeder and Uni Bremen 2003 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable choose a minimal type -...
spechub/Hets
HasCASL/MinType.hs
gpl-2.0
5,871
0
31
1,830
2,374
1,229
1,145
129
11
{- | Module : $Header$ Description : devGraph rule that calls provers for specific logics Copyright : (c) J. Gerken, T. Mossakowski, K. Luettich, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : non-port...
mariefarrell/Hets
Proofs/InferBasic.hs
gpl-2.0
5,261
0
18
1,254
1,133
574
559
99
4
-- Print module -- By G.W. Schwartz -- {- | Collection of functions for the printing of data (converting data structures into strings for use with writing to output files). -} {-# LANGUAGE BangPatterns #-} module Math.Diversity.Print ( printDiversity , printRarefaction ...
DrexelSystemsImmunologyLab/diversity
src/src-lib/Math/Diversity/Print.hs
gpl-3.0
5,669
0
23
2,738
1,115
570
545
109
4
module Command.STUN where import Network.Socket (Socket, SockAddr(..), PortNumber, hostAddressToTuple) import Network.Socket.ByteString (sendTo, recv) import Control.Applicative ((<|>)) import Network.Stun import Network.Stun.Internal import Data.Serialize import Control.Concurrent.Timeout (timeout) import Network.V...
rlupton20/vanguard-dataplane
app/Command/STUN.hs
gpl-3.0
1,712
0
18
392
531
276
255
40
5
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, TupleSections, GeneralizedNewtypeDeriving, DeriveTraversable #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| JSON utility functions. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and...
apyrgio/ganeti
src/Ganeti/JSON.hs
bsd-2-clause
19,912
0
18
4,762
4,778
2,522
2,256
329
3
module Tandoori.Typing.Unify (mgu, fitDeclTy) where import Tandoori import Tandoori.Typing import Tandoori.Typing.Monad import Tandoori.Typing.Error import Control.Monad.Error import Tandoori.Typing.Substitute mgu :: [(Maybe VarName, TyEq)] -> ErrorT TypingError Typing Subst mgu eqs = mgu' False eqs fitDeclTy ::...
bitemyapp/tandoori
src/Tandoori/Typing/Unify.hs
bsd-3-clause
2,685
0
17
1,024
859
437
422
40
7
module Main where import Pipes.Cliff.Examples import qualified Data.ByteString.Char8 as BS8 main :: IO () main = standardOutputAndError >>= BS8.putStr
rimmington/pipes-cliff
tests/standardOutputAndError.hs
bsd-3-clause
153
0
6
21
40
25
15
5
1
{-# LANGUAGE OverloadedStrings #-} module StarGist where import qualified GitHub.Data.Name as N import qualified GitHub.Endpoints.Gists as GH import qualified Data.Text as T import qualified Data.Text.IO as T main :: IO () main = do let gid = "your-gist-id" result <- GH.starGist (GH.OAuth "your-toke...
jwiegley/github
samples/Gists/StarGist.hs
bsd-3-clause
475
0
14
109
146
81
65
13
2
{-# LANGUAGE RankNTypes, NoMonomorphismRestriction, BangPatterns #-} -- The following are program transformations I would like us to be able to do -- They might not require many rules -- -- NOTE: no support for beta, gamma, dirichlet distributions yet, hence -- some of these examples won't work module Examples....
bitemyapp/hakaru
Examples/OptimizationTests.hs
bsd-3-clause
2,693
0
13
925
664
334
330
52
2
-- -*- haskell-hugs-program-args: ("+." "-98") -*- {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} -- An monadic variant of the library from "Adaptive Functional -- Programming", by Acar, Blelloch and Harper (POPL 2002). -- Magnus Carlsson, magnus@cse.ogi.edu module Control.Monad.Adaptive ( Adaptive , ...
Blaisorblade/Haskell-Adaptive
Control/Monad/Adaptive.hs
bsd-3-clause
5,691
0
23
1,666
2,626
1,303
1,323
-1
-1
module Code.Huffman ( make ) where -- $Id$ import Code.Type import Code.Huffman.LR import Code.Measure import Util.Sort import Data.FiniteMap import Reporter import ToDoc isoptimalprefix :: ( ToDoc [b], ToDoc [a], ToDoc a, Ord a, Eq b ) => Frequency a -> Code a b -> Reporter () isoptimalprefi...
Erdwolf/autotool-bonn
src/Code/Huffman.hs
gpl-2.0
1,418
16
17
444
549
286
263
-1
-1
{-# LANGUAGE CPP, GADTs, TypeFamilies, ScopedTypeVariables, RankNTypes #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif module Compiler.Hoopl.Block ( -- * Shapes O, C , MaybeO(..), MaybeC(..) , IndexedCO , Shape(..) -- * Blocks , Block(..) -- ** Predicates on Blocks , isEmpty...
hvr/hoopl
src/Compiler/Hoopl/Block.hs
bsd-3-clause
14,669
0
15
4,846
5,691
2,935
2,756
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, ScopedTypeVariables, RecursiveDo, GADTs, TypeFamilies, EmptyDataDecls, FlexibleInstances #-} {-# OPTIONS_GHC -fno-cse -fno-full-laziness #-} module FRP.Sodium.Plain where import qualified FRP.Sodium.Context as R -- Note: the 'full-laziness' optimization messes up finalizer...
kevintvh/sodium
haskell/src/FRP/Sodium/Plain.hs
bsd-3-clause
35,960
0
33
10,099
9,387
4,686
4,701
-1
-1
module Generate.JavaScript.BuiltIn where import Control.Arrow (first) import qualified Language.ECMAScript3.Syntax as JS import qualified AST.Module.Name as ModuleName import Generate.JavaScript.Helpers import qualified Reporting.Region as R utils :: String -> [JS.Expression ()] -> JS.Expression () utils func args...
laszlopandy/elm-compiler
src/Generate/JavaScript/BuiltIn.hs
bsd-3-clause
2,058
0
12
441
782
403
379
52
2
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module Hakyll.Core.Runtime.Tests ( tests ) where -------------------------------------------------------------------------------- import qualified Data.ByteString as B import Syste...
bergmark/hakyll
tests/Hakyll/Core/Runtime/Tests.hs
bsd-3-clause
2,611
0
21
673
517
255
262
55
1
{-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} module Database.Persist.Quasi ( parse , PersistSettings (..) , upperCaseSettings , lowerCaseSettings , nullable #if TEST , Token (..) , tokenize , parseFieldType #endif ) where import Prelude hiding (l...
gbwey/persistent
persistent/Database/Persist/Quasi.hs
mit
21,105
0
20
6,506
6,565
3,387
3,178
431
13
module FrontEnd.Infix ( buildFixityMap, infixHsModule, FixityMap,size, infixStatement, restrictFixityMap, dumpFixityMap) where import Data.Binary import Data.Monoid import qualified Data.Map as Map import FrontEnd.HsSyn import FrontEnd.Lex.ParseMonad import FrontEnd.Syn.Traverse import FrontEnd.Warning import...
hvr/jhc
src/FrontEnd/Infix.hs
mit
7,994
0
22
2,577
2,876
1,428
1,448
-1
-1
import System.IO (hFlush, stdout) import Control.Monad.Except (runExceptT) import Readline (readline, load_history) import Types import Reader (read_str) import Printer (_pr_str) -- read mal_read :: String -> IOThrows MalVal mal_read str = read_str str -- eval eval :: MalVal -> String -> MalVal eval ast env = ast -...
0gajun/mal
haskell/step1_read_print.hs
mpl-2.0
1,031
1
18
317
359
174
185
34
5
-- train.hs -- Compiles to executable. -- We're passed (1) the path to a directory and (2) an integer. -- Saves a hyperplane (dim = 2nd arg) that is the linear regression -- of all of the images in the directory to hyperplane.txt in the same -- directory. import PCA import ImageToVector import System.Directory import ...
IsToomersCornerBeingRolledRightNow/principalComponentAnalysisViaSingularValueDecomposition
train.hs
mit
1,100
1
15
275
322
163
159
29
2
{-# LANGUAGE LambdaCase #-} module TC.Unify where import Control.Applicative import Control.Monad import Control.Monad.Except import qualified Data.Map as M import Data.List (intersect) import Source import TC.Util type Subst = M.Map Name...
jozefg/hi
src/TC/Unify.hs
mit
2,724
0
16
828
1,269
635
634
73
7
module P13 where import P11(Item(..)) -- | Modified run-length encoding -- >>> encodeModified "aaaabccaadeeee" -- [Multiple 4 'a',Single 'b',Multiple 2 'c',Multiple 2 'a',Single 'd',Multiple 4 'e'] encodeModified :: Eq a => [a] -> [Item a] encodeModified = foldr func [] where func x [] = [Single x] func x lis...
briancavalier/h99
p13.hs
mit
504
0
12
108
205
112
93
9
5
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.WebKitCSSRegionRule (js_getCssRules, getCssRules, WebKitCSSRegionRule, castToWebKitCSSRegionRule, gTypeWebKitCSSRegionRule) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Dou...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebKitCSSRegionRule.hs
mit
1,434
6
10
165
371
236
135
24
1
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- @src\/Validate.hs@ -- -- Functions for turning a list of statements (a source -- document) into an output representing its validation -- status. -- ---------------------------------------------...
aartifact/aartifact-verifier
src/Validation.hs
mit
5,277
0
14
1,079
2,527
1,340
1,187
70
4
{-# LANGUAGE TypeSynonymInstances #-} module Oden.Core where import Oden.Core.Operator import Oden.Identifier import Oden.Metadata import Oden.QualifiedName (QualifiedName(..)) import Oden.SourceInfo import qualified Oden.Type.Polymorphic as Poly data NameBinding = Na...
AlbinTheander/oden
src/Oden/Core.hs
mit
6,441
0
10
2,052
2,495
1,274
1,221
112
1
setList (a:b) 0 value= value:b setList (a:b) n value= a:setList b (n-1) value delete :: [a]->Int->[a] delete xs n = let (ys,zs) = splitAt n xs in ys ++ (tail zs) data DoodleTimeSlot timeType = DoodleTimeSlot { begin :: timeType , end :: timeTy...
salenaer/functionProject
try.hs
mit
559
0
9
200
207
109
98
13
1
-- SYNTAX TEST "source.haskell" {-# LANGUAGE GADTs #-} module Test where -- it understands GADT syntax data Term a where -- ^^^^^ meta.declaration.type.data keyword.other -- ^ meta.declaration.type.data meta.type-signature variable.other.generic-type -- ^^^^ meta.declaration.type.data meta.type-s...
atom-haskell/language-haskell
spec/fixture/gadt.hs
mit
1,155
0
7
262
61
43
18
7
1
{-# LANGUAGE OverloadedStrings #-} module WaiAppStatic.Types ( -- * Pieces Piece , toPiece , fromPiece , unsafeToPiece , Pieces , toPieces -- * Caching , MaxAge (..) -- * File\/folder serving , FolderName , Folder (..) , File (..) , LookupResult (..) , L...
rgrinberg/wai
wai-app-static/WaiAppStatic/Types.hs
mit
5,363
0
11
1,291
621
390
231
64
1
{-# LANGUAGE DeriveDataTypeable #-} module HolyProject.HolyFiles where import Paths_holy_haskell_sc import Data.Data import Text.Hastache import Text.Hastache.Context import System.Directory import System.FilePath.Posix (takeDirectory, (</>)) import qualified Data.ByteString as BS import qualified Data...
mankyKitty/holy-haskell-project-starter
src/HolyProject/HolyFiles.hs
mit
2,365
0
11
758
409
232
177
38
1
module Six where data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn x) (TisAn x') = x == x' data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two x y) (Two x' y') = x == x' && y == y' data StringOrInt = TisAnInt Int | TisAString String ins...
mudphone/HaskellBook
src/Six.hs
mit
1,115
0
8
337
574
309
265
48
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module MLUtil.Roundable ( Roundable (..) ) where import qualified Data.Vector.Storable as VS import MLUtil.Imports class Roundable a where roundToPrecision :: Int -> a -> a instance Roundable R where -- http://stackov...
rcook/mlutil
mlutil/src/MLUtil/Roundable.hs
mit
1,016
0
10
187
191
103
88
16
0
mergeSort :: (Ord a) => [a] -> [a] mergeSort [] = [] mergeSort [x] = [x] mergeSort xs = merge (mergeSort left) (mergeSort right) where left = take (length xs `div` 2) xs right = drop (length xs `div` 2) xs merge :: (Ord a) => [a] -> [a] -> [a] merge xs [] = xs merge [] ys = ys merge (x:xs) (y:ys) | (x <= y...
siemiatj/algorithms
Coursera/haskell/mergesort.hs
mit
380
0
10
93
261
138
123
12
1
module Zwerg.Generator.Default ( module EXPORTED , generateSkeleton , generatePlayerSkeleton ) where import Zwerg.Generator as EXPORTED import Zwerg.UI.GlyphMap generatePlayerSkeleton :: MonadCompState () generatePlayerSkeleton = do --TODO: check if player already exists and throw error if it does addCom...
zmeadows/zwerg
lib/Zwerg/Generator/Default.hs
mit
1,797
0
14
300
447
202
245
45
1
{-# LANGUAGE TypeOperators #-} module Document.Phase.Transient where -- -- Modules -- import Document.Phase as P import Document.Phase.Types import Document.Visitor import Latex.Parser hiding (contents) import Logic.Expr import Logic.Expr.Parser import UnitB.Syntax as AST -- -- Libraries --...
literate-unitb/literate-unitb
src/Document/Phase/Transient.hs
mit
3,091
0
19
1,130
993
535
458
-1
-1
{-# htermination maxBound :: Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_maxBound_4.hs
mit
37
0
2
6
3
2
1
1
0
module Deposit where import qualified Rest import qualified Rest import Network.HTTP.Conduit import Network.HTTP.Types import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy.Char8 as LC8 import Data.String (fromString) address :: IO (Response LC8.ByteString) address = Rest.post "/bitcoin_...
GildedHonour/BitstampApi
src/Deposit.hs
mit
432
0
8
49
113
68
45
12
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {- | See the documentation in "Crypto.Sodium.Sign". -} module Crypto.Sodium.Sign.Ed25519 ( -- * Constants publicKeyBytes -- | Number of bytes in a 'PublicKey'. , secretKeyBytes -- | Number of bytes in a 'SecretKey'. , seedBytes -- | Number of byt...
dnaq/crypto-sodium
src/Crypto/Sodium/Sign/Ed25519.hs
mit
11,660
0
19
3,332
2,084
1,142
942
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html module Stratosphere.ResourceProperties.CloudFrontDistributi...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/CloudFrontDistributionDefaultCacheBehavior.hs
mit
10,880
0
13
755
1,261
714
547
87
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Common (loggerName) import Config (readConfig, ServerType(..)) import Control.Exception (catch, SomeException) import Control.Concurrent (forkIO) import Contro...
VictorDenisov/keystone
src/Nova.hs
gpl-2.0
6,793
0
24
1,508
1,942
1,000
942
153
4
import Control.Monad ( filterM ) import System.Directory ( Permissions(..), getModificationTime, getPermissions) import System.Time (ClockTime(..)) import System.FilePath ((</>), takeExtension) import Control.Exception (bracket, handle, IOException ) import System.IO (IOMode(..), hClose, hFileSize, openFile) import Rec...
Tr1p0d/realWorldHaskell
rwh9/BetterPredicate.hs
gpl-2.0
1,904
25
11
408
871
458
413
54
1
-- Author: Viacheslav Lotsmanov -- License: GPLv3 https://raw.githubusercontent.com/unclechu/xmonadrc/master/LICENSE {-# LANGUAGE PackageImports #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where import "base" Data.Function ((&), fix) import "base" Data.List (stripPrefix, f...
unclechu/xmonadrc
xmobar/indicators-cmd/test/Spec.hs
gpl-3.0
12,885
0
26
4,640
3,460
1,890
1,570
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Sound.Tidal.Tempo where import Data.Time (getCurrentTime, UTCTime, diffUTCTime) import Data.Time.Clock.POSIX import Control.Monad (forM_, forever, void) import Control.Monad.IO.Class (liftIO) import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.MVar impo...
lennart/Tidal
Sound/Tidal/Tempo.hs
gpl-3.0
7,582
0
22
2,221
2,575
1,260
1,315
177
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE...
rsasse/tamarin-prover
lib/theory/src/Theory/Model/Rule.hs
gpl-3.0
41,188
0
18
10,724
10,267
5,359
4,908
682
10
{-| Module : Setseer.Pixel Description : Generate pixels Copyright : Erik Edlund License : GPL-3 Maintainer : erik.edlund@32767.se Stability : experimental Portability : POSIX -} module Setseer.Pixel where import Codec.Picture import Data.Complex import Data.Vector import Data.Word import Setseer.Color...
edlund/setseer
sources/Setseer/Pixel.hs
gpl-3.0
2,058
0
13
583
734
380
354
68
2
module ModifyingTreeSpec where import Test.Hspec import NodeEditor.Data import NodeEditor.Parser spec = do describe "setNodeBody" $ do it "replaces the node body for the given id" $ do let tree = treeFromText "node body" let newTree = setNodeBody tree 0 "fosho" getNodeBody newTree 0 `shouldBe...
rickardlindberg/node-editor-2
test/ModifyingTreeSpec.hs
gpl-3.0
330
0
16
72
86
42
44
10
1
-- | Compute a Gram-Schmidt orthogonal basis module Math.LinearAlgebra.GramSchmidt ( gramSchmidtBasis, gramSchmidtOrthogonalization ) where import Prelude hiding ((*>)) import Math.Algebra.LinearAlgebra -- | Given a basis, return the Gram-Schmidt orhthogonal basis gramSc...
bcoppens/Lattices
src/Math/LinearAlgebra/GramSchmidt.hs
gpl-3.0
1,453
0
9
348
309
177
132
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Operations/Delete.hs
mpl-2.0
5,429
0
15
1,137
702
413
289
103
1