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
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, GADTs, OverloadedStrings, CPP #-} module Haste.AST.Print () where import Prelude hiding (LT, GT) import Haste.Config import Haste.AST.Syntax import Haste.AST.Op import Haste.AST.PP as PP import Haste.AST.PP.Opts as PP import Data.ByteString.Builder i...
nyson/haste-compiler
src/Haste/AST/Print.hs
bsd-3-clause
9,616
0
19
3,101
4,237
2,050
2,187
269
6
module Tandoori.Typing.DataType (constructorsFromDecl) where import Tandoori import Tandoori.Typing import Tandoori.Typing.Error import Tandoori.Typing.Monad import Tandoori.GHC.Internals import Tandoori.Typing.Repr import Control.Monad constructorsFromDecl :: TyClDecl Name -> Typing [(ConName, Ty)] construc...
bitemyapp/tandoori
src/Tandoori/Typing/DataType.hs
bsd-3-clause
934
0
21
220
325
161
164
23
2
{-# LANGUAGE TemplateHaskell, OverloadedStrings, GeneralizedNewtypeDeriving #-} module SecondTransfer.Socks5.Session ( tlsSOCKS5Serve' , ConnectOrForward (..) , Socks5ServerState , initSocks5ServerState , targ...
shimmercat/second-transfer
hs-src/SecondTransfer/Socks5/Session.hs
bsd-3-clause
19,315
0
34
8,438
3,029
1,533
1,496
312
9
module EnumFrom where main :: Fay () main = do forM_ [1..5] $ \i -> print i forM_ (take 5 [1..]) $ \i -> print i forM_ [1,3..9] $ \i -> print i forM_ (take 3 [1,3..]) $ \i -> print i
fpco/fay
tests/enumFrom.hs
bsd-3-clause
200
0
11
59
129
65
64
7
1
module Options.Language where import Types languageOptions :: [Flag] languageOptions = [ flag { flagName = "-fconstraint-solver-iterations=⟨n⟩" , flagDescription = "*default: 4.* Set the iteration limit for the type-constraint "++ "solver. Typically one iteration suffices; so please "...
olsner/ghc
utils/mkUserGuidePart/Options/Language.hs
bsd-3-clause
30,401
0
10
9,447
3,825
2,477
1,348
656
1
{- $Id: AFRPTestsAccum.hs,v 1.2 2003/11/10 21:28:58 antony Exp $ ****************************************************************************** * A F R P * * * * Module: ...
ony/Yampa-core
tests/AFRPTestsAccum.hs
bsd-3-clause
11,437
28
15
4,076
3,799
2,152
1,647
252
2
-- | Simple example of storing a file on a server using Haste.App. -- Please remember to never, ever, use unsanitized file names received from -- a client on the server, as is done in this example! import Haste.App import Haste.Binary import Haste.DOM import Haste.Events import qualified Data.ByteString.Lazy as BS ...
beni55/haste-compiler
examples/sendfile/sendfile.hs
bsd-3-clause
840
0
23
222
221
110
111
20
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.FixedColumn -- Copyright : (c) 2008 Justin Bogner <mail@justinbogner.com> -- License : BSD3-style (as xmonad) -- -- M...
adinapoli/xmonad-contrib
XMonad/Layout/FixedColumn.hs
bsd-3-clause
3,802
0
16
1,058
674
368
306
-1
-1
{-# LANGUAGE PatternGuards #-} -- Some things could be improved, e.g.: -- * Check that each file given contains at least one instance of the -- function -- * Check that we are testing all functions -- * If a problem is found, give better location information, e.g. -- which problem the file is in module Main (main...
ekmett/ghc
utils/checkUniques/checkUniques.hs
bsd-3-clause
3,507
0
17
1,416
943
473
470
87
3
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances, FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module T7332 where import GHC.Exts( IsString(..) ) import Data.Monoid new...
oldmanmike/ghc
testsuite/tests/polykinds/T7332.hs
bsd-3-clause
1,802
0
10
488
353
190
163
27
1
import Safe main :: IO () main = print $ headMay ([] :: [Int])
AndreasPK/stack
test/integration/tests/444-package-option/files/Test.hs
bsd-3-clause
64
0
8
15
37
20
17
3
1
module Main where import Data.IORef loop r 0 = return () loop r c = loop r (c-1) >> writeIORef r 42 main = newIORef 0 >>= \r -> loop r 1000000 >> putStrLn "done"
beni55/ghcjs
test/pkg/base/ioref001.hs
mit
166
0
8
39
84
42
42
5
1
module SpaceState.City(gotoCity, catapult) where import Data.List hiding (concat) import Data.Maybe import Data.Foldable import Control.Monad hiding (mapM_) import Control.Monad.State as State hiding (mapM_) import Prelude hiding (catch, concat, mapM_) import Text.Printf import Graphics.Rendering.OpenGL as OpenGL imp...
anttisalonen/starrover2
src/SpaceState/City.hs
mit
11,240
0
19
3,253
3,478
1,739
1,739
266
8
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} module Bank.ReadModels.CustomerAccounts ( CustomerAccounts (..) , customerAccountsAccountsById , customerAccountsCustomerAccounts , customerAccountsCustomerIdsByName , getCustomerAccountsFromName , customerAcco...
jdreaver/eventful
examples/bank/src/Bank/ReadModels/CustomerAccounts.hs
mit
2,658
0
13
349
536
284
252
48
1
{-# htermination replicateM_ :: Monad m => Int -> m a -> m () #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_replicateM__1.hs
mit
79
0
3
17
5
3
2
1
0
module Example2 where import qualified WeightedLPA as WLPA import Graph import qualified Data.Map as M import qualified Data.Set as S import FiniteFields weighted_example :: WeightedGraph String String weighted_example = WeightedGraph (buildGraphFromEdges [("e",("v","u"))]) (M.fromList [("e",2)]) unweighted_equivale...
rzil/honours
LeavittPathAlgebras/Example2.hs
mit
1,324
0
12
171
463
251
212
24
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANG...
plow-technologies/Vinyl
Data/Vinyl/Core.hs
mit
5,674
0
14
1,426
1,774
945
829
141
2
module Chip8.Memory where import Data.Word (Word8, Word16) import Data.STRef import Data.Array.ST (STUArray, newArray, readArray, writeArray) import System.Random (StdGen) import Control.Monad (foldM_) import Control.Monad.ST (ST) import Chip8.Event import Chip8.VideoMemory (VideoMemory, newVideoMemory) data Address...
ksaveljev/chip-8-emulator
Chip8/Memory.hs
mit
4,789
0
13
1,655
1,673
908
765
107
1
module Database.Siege.DBNode where import Control.Monad.Trans.Store import Control.Monad.Error import Data.Word import qualified Data.ByteString as B -- TODO: move this into the distributed backend newtype Ref = Ref { unRef :: B.ByteString } deriving (Read, Show, Eq, Ord) validRef :: Ref -> Bool validRef = (== 20...
DanielWaterworth/siege
src/Database/Siege/DBNode.hs
mit
1,752
0
11
413
682
353
329
58
3
{-# LANGUAGE OverloadedStrings #-} module Y2020.M10.D16.Solution where {-- `sequence` is really cool: a neat trick. The problem is that we have to use it in the first place. The question becomes if the data structure you are using doesn't give you what you need, then you need to move to a better data model. Data.Map...
geophf/1HaskellADay
exercises/HAD/Y2020/M10/D16/Solution.hs
mit
2,870
0
9
485
421
241
180
32
1
module AST where data BinOp = Extend | Plus | Minus | Mul | Div | Eq | NonEq | And | Or deriving Show data Expression = BinaryExpression BinOp Expression Expression | PrimaryExpression PrimaryExpression deriving Show data PrimaryExpression = Expression Expression | PrefixedExpression Pr...
jinjor/poorscript
src/AST.hs
mit
1,046
0
8
225
256
156
100
50
0
-- playing around with STRefs - BST example etc import Control.Monad.ST import Data.STRef -- items in tree (monomorphic, no separate key+value currently) type Item = Int -- tree of ints (for simple BST) -- with STRefs so we can use (monadic) destructive update -- This leads to an extra level of indirection in data s...
lee-naish/Pawns
bench/hsrbst.hs
mit
4,082
0
14
1,350
1,137
549
588
124
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {- This example shows how to extract all - user friends, get their similarity score and - then sort them based on it outputting top 5 - - User friends of which are searched is 'target' - - Most of hard work there is on 'aeson-lens' actually :) - - Sa...
supki/liblastfm
example/sort-friends.hs
mit
2,780
0
16
737
691
377
314
-1
-1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Main where import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy as LBS import Data.Char (isSpace, toLower) import Control.Monad.State import Data.Maybe (fromJust) import System.IO (Handle, hFlush, hIsEOF, isEOF, openFile, IOM...
elegios/konkordans-haskell
src/main.hs
mit
4,857
8
22
989
1,907
950
957
117
5
{-# LANGUAGE DeriveFunctor #-} ------------------------------------------------------------------------------ -- | -- Module : Hajong.Game.Yaku.Builder -- Copyright : (C) 2014 Samuli Thomasson -- License : MIT (see the file LICENSE) -- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi> ...
SimSaladin/hajong
hajong-server/src/Mahjong/Hand/Yaku/Builder.hs
mit
9,974
0
15
2,768
2,195
1,199
996
-1
-1
f::(a,b)->(c,d)->((b,d),(a,c)) f a b = (,) ((,) (snd a) (snd b)) ((,) (fst a) (fst b))
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/04/04.09.03-function.hs
mit
87
0
9
16
108
60
48
2
1
{-# LANGUAGE TupleSections #-} module Akari where import Control.Applicative import Data.Attoparsec.ByteString import Data.Attoparsec.ByteString.Char8 import Data.Char (ord) import Data.SBV import Control.Monad.Writer import Data.Map (Map, (!)) import Data.List (transpose) import Data.Maybe (fromJust, catMaybes) imp...
tjhance/logic-puzzles
src/Akari.hs
mit
5,390
0
31
1,996
1,564
826
738
99
7
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : translating a HasCASL subset to Isabelle Copyright : (c) C. Maeder, DFKI 2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional...
nevrenato/Hets_Fork
Comorphisms/MonadicHasCASLTranslation.hs
gpl-2.0
2,087
0
8
415
295
160
135
34
0
{-# LANGUAGE OverloadedStrings #-} module IRCSpec where import Data.Attoparsec.Text (parseOnly) import Data.Text as T import Test.Hspec import Test.QuickCheck import IRC import Default -- | main spec spec :: Spec spec = toIrcSpec -- = specs toIrcSpec :: Spec toIrcSpec = describe "toIrc" $ do it "adds correct...
ibabushkin/wormbot
test/IRCSpec.hs
gpl-3.0
745
0
17
189
217
113
104
21
1
module Config ( parseConfigXML, showConfig ) where import Text.XML.HXT.Core --------------------------------------------- -- types -- TODO nasty things (does it have to be like this?): -- 1. lack of type unions (lots of nested constructors instead) -- 2. record field names must be unique globally?? => bad nam...
sfindeisen/xtiles
src/Config.hs
gpl-3.0
5,849
0
17
1,302
1,976
1,090
886
146
3
{-# LANGUAGE TemplateHaskell #-} module Vdv.Settings where import ClassyPrelude hiding(FilePath,(<>)) import System.FilePath import Options.Applicative(strOption,long,help,option,(<>),Parser,execParser,helper,fullDesc,progDesc,header,info,switch) import Control.Lens(makeLenses) import Vdv.Filter import Vdv.Exclusions ...
pmiddend/vdvanalyze
src/Vdv/Settings.hs
gpl-3.0
1,728
0
15
318
394
213
181
30
1
module Demo where -- Ðåàëèçóéòå êëàññ òèïîâ class (Eq a, Enum a, Bounded a) => SafeEnum a where ssucc :: a -> a ssucc x | x == maxBound = minBound | otherwise = succ x spred :: a -> a spred x | x == minBound = maxBound | otherwise = pred x {- îáå ôóíêöèè êîòîðîãî âåäóò ñåáÿ êàê succ è p...
devtype-blogspot-com/Haskell-Examples
SafeEnum/Demo.hs
gpl-3.0
1,442
0
10
265
146
71
75
12
0
module Events where import GHC.IO.Handle import Control.Concurrent.STM.TChan import Text.Parsec data EventPackage = EventPackage EventPrinter EventParser -- for getting from the wire data EventParser = EventParser (Parsec String () Event) -- for printing on the wire data EventPrinter = EventPrinter (Event -> String...
RocketPuppy/PupEvents
Events.hs
gpl-3.0
855
0
10
168
242
127
115
19
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/SetSize.hs
mpl-2.0
8,216
0
24
1,869
1,033
604
429
161
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Get.hs
mpl-2.0
3,012
0
15
742
408
243
165
62
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/FreeListingsprogram/Get.hs
mpl-2.0
4,936
0
17
1,143
724
421
303
107
1
-- Introduction -- This is Vocabulink, the SCGI program that handles all web requests for -- http://www.vocabulink.com/. The site helps people learn languages through -- fiction. It provides a mnemonics database and spaced repetion (review) -- tools. -- Architecture -- Requests arrive via a webserver. (I'm currently...
jekor/vocabulink
hs/Vocabulink.hs
agpl-3.0
18,955
0
39
5,583
3,566
1,816
1,750
-1
-1
----------------------------------------------------------------------------------------- {-| Module : CompileClassInfo Copyright : (c) Daan Leijen 2003, 2004 License : BSD-style Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : portable ...
sherwoodwang/wxHaskell
wxdirect/src/CompileClassInfo.hs
lgpl-2.1
8,756
0
15
3,538
816
461
355
112
1
-- mapM & mapM_ -- Because mapping a function that returns an I/O action over a list and then sequencing -- it is so common, the utility functions mapM and mapM_ were introduced. -- mapM takes a function and a list, maps the function over the list and sequence it. -- mapM_ does the same thing but throws away the resul...
Ketouem/learn-you-a-haskell
src/chapter-8-input-and-output/useful-io-fns/mapM.hs
unlicense
327
0
2
62
7
6
1
1
0
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module Handler.Root ( getRootR ) where import Foundation import Handler.Page (getPageR') getRootR :: Handler RepHtml getRootR = getPageR' []
snoyberg/yesodcms
Handler/Root.hs
bsd-2-clause
216
0
6
35
43
25
18
7
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} module Yesod.Default.Main ( defaultMain , defaultRunner , defaultDevelApp ) where import Yesod.Default.Config import Yesod.Logger (Logger, defaultDevelopmentLogger, logString) import Network.Wai (Application) import Network.Wai.Han...
chreekat/yesod
yesod-default/Yesod/Default/Main.hs
bsd-2-clause
3,276
0
11
701
589
330
259
56
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------ module OpenArms.Types.AttendeePrivateNote ( -- * Types AttendeePrivateNote (..) , columnOffsetsAtten...
dmjio/openarms
src/OpenArms/Types/AttendeePrivateNote.hs
bsd-2-clause
957
0
7
198
83
55
28
23
0
module WASH.HTML.HTMLTemplates where import WASH.HTML.HTMLBase import WASH.Utility.SHA1 import WASH.Utility.JavaScript import qualified WASH.Utility.Base32 as Base32 import Control.Monad (unless) import Data.List ((\\)) data ST s a = ST { unST :: s -> (a, s) } instance Monad (ST s) where return x = ST (\s -> (x, ...
nh2/WashNGo
WASH/HTML/HTMLTemplates.hs
bsd-3-clause
13,411
507
21
3,530
4,805
2,614
2,191
439
21
{-# LANGUAGE DeriveGeneric #-} -- | -- Copyright : Anders Claesson 2014-2016 -- Maintainer : Anders Claesson <anders.claesson@gmail.com> -- -- TODO: Generalize interface and share with Sym.Perm.Pattern module Sym.Perm.MeshPattern ( MeshPattern (..) , Mesh , Box , mkPattern , pattern , mesh...
akc/sym
Sym/Perm/MeshPattern.hs
bsd-3-clause
4,338
2
17
1,056
1,696
927
769
102
1
module Utils where import SFML.Window -- Utility functions multVec :: Vec2f -> Float -> Vec2f multVec (Vec2f x y) n = Vec2f (x * n) (y * n) divVec :: Vec2f -> Float -> Vec2f divVec v f = multVec v (1/f) toVec2f :: Vec2u -> Vec2f toVec2f (Vec2u x y) = Vec2f (fromIntegral x) (fromIntegral y) vecLength :: Ve...
bombpersons/HaskellAsteroids
src/Utils.hs
bsd-3-clause
621
0
9
132
293
154
139
16
1
halve :: Double -> Double halve = (/ 2) seven :: Integer seven = 7 convert :: (Double -> Double) -> Integer -> Double convert f n = f $ fromIntegral n
YoshikuniJujo/funpaala
samples/09_tuple/convert.hs
bsd-3-clause
153
0
7
34
78
38
40
6
1
module Language.JsLib ( module Language.JsLib.AST , module Language.JsLib.Scanner , module Language.JsLib.Parser , module Language.JsLib.Printer ) where import Language.JsLib.AST import Language.JsLib.Scanner import Language.JsLib.Parser import Language.JsLib.Printer
JeanJoskin/JsLib
src/Language/JsLib.hs
bsd-3-clause
269
0
5
25
60
41
19
9
0
module ApiSpec (spec) where import Test.Hspec spec :: Spec spec = return ()
channable/icepeak
server/tests/ApiSpec.hs
bsd-3-clause
78
0
6
15
29
17
12
4
1
-- | Convenience module to import everything except a specific -- rewriting combinator implementation. See "ADP.Multi.Rewriting.All" -- for that. module ADP.Multi.All (module X) where import ADP.Multi.Parser as X import ADP.Multi.ElementaryParsers as X import ADP.Multi.Combinators as X import ADP.Multi.TabulationT...
adp-multi/adp-multi
src/ADP/Multi/All.hs
bsd-3-clause
362
0
4
48
56
42
14
6
0
{-# LANGUAGE CPP #-} {- | Module : $Header$ Description : Writing various formats, according to Hets options Copyright : (c) Klaus Luettich, C.Maeder, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-por...
keithodulaigh/Hets
Driver/WriteFn.hs
gpl-2.0
17,052
0
25
5,103
5,124
2,524
2,600
357
23
{- | Module : ./Comorphisms/DynLogicList.hs Description : Automatically modified file, includes the user-defined logics in the Hets logic list. Do not change. Copyright : (c) Kristina Sojakova, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : k.sojakova@jacobs-un...
spechub/Hets
Comorphisms/DynLogicList.hs
gpl-2.0
492
0
5
98
27
17
10
4
1
import qualified UI.HSCurses.Curses as Curses import qualified UI.HSCurses.CursesHelper as CursesH import UI.HSCurses.Widgets import Control.Exception import System.Exit draw s = do (h, w) <- Curses.scrSize CursesH.gotoTop CursesH.drawLine w s Curses.refresh done = return () forever :: Mona...
beni55/hscurses
tests/widget-test/EditTest.hs
lgpl-2.1
1,436
4
13
398
521
247
274
45
3
{- Parsec parser for fullerror. The sole expected method, parseFullError, takes a string as input, and returns a list of terms, where each term was separated by a semicolon in the input. -} module Parser ( parseFullError ) where import Text.ParserCombinators.Parsec import qualified Text.ParserCombinators.Parse...
markwatkinson/luminous
tests/regression/haskell/Parser.hs
lgpl-2.1
13,038
0
28
4,874
2,660
1,298
1,362
240
3
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {- Copyright 2016 The CodeWorld Authors. 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 ...
nomeata/codeworld
funblocks-client/src/Blockly/DesignBlock.hs
apache-2.0
8,059
46
20
2,129
1,948
1,020
928
153
3
module Help where import Euphs.Bot (Net, botName) import Control.Monad.Reader (asks) --import Options.Applicative --import Safe import Data.List helpIntro :: String -> String helpIntro bn = "I am @" ++ bn ++ ", a bot created by viviff for use with rooms with video players.\n\ \This bot continues the work of...
MicheleCastrovilli/Euphs
Bots/MusicBot/Help.hs
bsd-3-clause
3,874
0
10
733
274
153
121
36
1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module Hakyll.Core.Dependencies.Tests ( tests ) where -------------------------------------------------------------------------------- import Data.List (delete) import q...
bergmark/hakyll
tests/Hakyll/Core/Dependencies/Tests.hs
bsd-3-clause
2,255
0
10
417
381
227
154
36
1
{-# OPTIONS -cpp #-} ------------------------------------------------------------------------ -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. -- Certain items known only to the C compiler can then be used in -- the Haskell modul...
alekar/hugs
hsc2hs/Main.hs
bsd-3-clause
29,871
733
41
9,360
9,964
5,088
4,876
672
14
module Chip8.OpCode ( Fun(..), Op(..) , decode ) where import Chip8.Utils import Chip8.Types data Fun = Id | Or | And | XOr | Add | Subtract | ShiftRight | SubtractFlip | ShiftLeft deriving (Show) data Op = ClearScr...
gergoerdi/chip8-haskell
src/Chip8/OpCode.hs
bsd-3-clause
3,272
0
10
1,227
1,378
770
608
95
37
-- Copyright (c) 2015 Eric McCorkle. 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 code must retain the above copyright -- notice, this list of conditi...
emc2/saltlang
src/salt/Control/Monad/TypeCheck/Class.hs
bsd-3-clause
2,278
0
9
398
148
103
45
13
0
{- Image.hs - Write an image to PPM (Portable Pixmap) format. - http://en.wikipedia.org/wiki/Portable_pixmap - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Image where import Color import Math import Scene -- Convert a pixel to PPM P3 format p3color :: Color -> String p3color (Vec3f r g b) = unwords [s...
tchagnon/cs636-raytracer
a6/Image.hs
apache-2.0
1,358
0
14
389
503
251
252
31
2
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[Simplify]{The main module of the simplifier} -} {-# LANGUAGE CPP #-} module Simplify ( simplTopBinds, simplExpr ) where #include "HsVersions.h" import DynFlags import SimplMonad import Type hiding ( substTy, extendTvSubst, substTyVar ) import Sim...
christiaanb/ghc
compiler/simplCore/Simplify.hs
bsd-3-clause
118,610
18
25
36,268
14,240
7,535
6,705
-1
-1
module Generate.JavaScript.Port (inbound, outbound, task) where import qualified Data.List as List import qualified Data.Map as Map import Language.ECMAScript3.Syntax import qualified AST.Type as T import qualified AST.Variable as Var import Generate.JavaScript.Helpers import qualified Reporting.Render.Type as Render...
laszlopandy/elm-compiler
src/Generate/JavaScript/Port.hs
bsd-3-clause
8,276
0
20
2,905
2,894
1,433
1,461
206
10
{-# OPTIONS_JHC -fm4 -fno-prelude -fffi -funboxed-values #-} module Jhc.Enum(Enum(..),Bounded(..)) where -- Enumeration and Bounded classes import Jhc.Basics import Jhc.Inst.PrimEnum() import Jhc.Int m4_include(Jhc/Enum.m4) class Enum a where succ, pred :: a -> a toEnum :: Int -> a from...
hvr/jhc
lib/jhc/Jhc/Enum.hs
mit
4,047
6
12
1,363
1,036
563
473
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fr-FR"> <title>Regular Expression Tester</title> <maps> <homeID>regextester</homeID> <m...
thc202/zap-extensions
addOns/regextester/src/main/javahelp/help_fr_FR/helpset_fr_FR.hs
apache-2.0
978
77
66
157
409
207
202
-1
-1
module Guards4In where f x@(Left a) = case x of (Left x) | x == 1 -> Right x | otherwise -> Left x (Right b) -> Left b
kmate/HaRe
old/testing/simplifyExpr/GuardsIn4.hs
bsd-3-clause
209
0
11
119
77
37
40
6
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples, StandaloneDeriving, AutoDeriveTypeable, NegativeLiterals #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Int -...
tibbe/ghc
libraries/base/GHC/Int.hs
bsd-3-clause
39,413
4
17
13,284
8,464
4,369
4,095
560
2
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.Portuguese where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) portugueseFormMessage :: FormMessage -> Text portugueseFormMessage (MsgInvalidInteger t) = "Número inteiro inválido: " `mappend` t portugueseFormMe...
ygale/yesod
yesod-form/Yesod/Form/I18n/Portuguese.hs
mit
1,588
0
7
176
317
176
141
24
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} ------------------------------------------------------------------------ -- | -- Module : Yeast.Parse -- Copyright : (c) 2015-2016 Stevan Andjelkovic -- License : ISC (see the file LICENSE) -- Maintainer : Stevan Andjelkovic --...
stevana/yeast
src/Yeast/Parse.hs
isc
5,803
0
24
1,684
1,518
785
733
-1
-1
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} import Data.List import Data.Char import Numeric (readHex) import qualified Data.Map as Map import qualified Data.Text as T import System.Environment (getArgs) import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy.UTF8 as BSLU import Co...
k16shikano/hpdft
data/map/cidmapToList.hs
mit
12,822
0
15
2,141
6,490
4,147
2,343
285
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGTransformList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGTransformList #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGTransformList.hs
mit
361
0
5
33
33
26
7
4
0
{-# LANGUAGE FlexibleInstances #-} module Pianola.Geometry ( Interval, Point1d, inside1d, before1d, after1d, Point2d, Dimensions2d, mid, Geometrical (..), sameLevelRightOf ) where import Prelude hiding (catch,(.),id) import C...
danidiaz/pianola
src/Pianola/Geometry.hs
mit
2,049
0
13
600
677
376
301
60
1
module Main where import Language.Haskell.Exts import Language.Haskell.Exts.GenericPretty.Instances import Shared import System.Environment import System.IO uglyPrintHs :: String -> IO () uglyPrintHs path = do result <- parseFileWithMode myParseMode path case resu...
adarqui/haskell-src-exts-genericpretty
examples/ugly-ast.hs
mit
568
0
11
162
156
79
77
18
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE ViewPatterns #-} module Graphics.UI.GroupBox ( createGroupBox , groupBoxAlignment , flat , checked , checkable , GroupBox() ) where import Graphics.UI.Interna...
Noeda/userinterface
src/Graphics/UI/GroupBox.hs
mit
4,294
0
18
1,136
1,178
602
576
99
3
module Web.Stripe.Client.Stripe (stripe) where import Web.Stripe.Client.HttpStreams (stripe)
dmjio/stripe
stripe-haskell/src-http-streams/Web/Stripe/Client/Stripe.hs
mit
94
0
5
8
25
17
8
2
0
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ConstraintKinds #-} import Prelude hiding (repeat) repeat :: Int -> (a -> a) -> a -> a repeat 1 f x = f x repeat n f x = n `seq` x `seq` repeat (n-1) f $ f x ---- Buggy version ------------------ type Numerical a = (Fractional a, Real a) dat...
vladfi1/hs-misc
Bug.hs
mit
1,947
15
9
446
804
419
385
42
1
-- Each well-formed expression in Haskell has a well-formed type. -- Each well-formed expression has a value. -- Names for functions and values begin with a lowercase letter, except for data constructors -- which begin with an uppercase letter. -- 3 + 4 is the same as (+) 3 4 -- div 15 3 is the same as 15 `div` 3 -- ...
v0lkan/learning-haskell
expressions.hs
mit
990
0
9
221
69
45
24
2
2
module Codewars.G964.Countdig where import Data.Char nbDig :: Int -> Int -> Int nbDig n d = sum (map (\a -> stringDigits (show (a^2)) d) [0..n]) stringDigits :: String -> Int -> Int stringDigits num digit = length (filter (== intToDigit digit) num) nbDig2 :: Int -> Int -> Int nbDig2 n d = sum [length $ filter (==c...
pasaunders/code-katas
src/count_digit.hs
mit
374
0
14
76
195
103
92
9
1
module SignalProperties where import qualified Data.ByteString.Lazy.Char8 as LBS import Network.Linx.Gateway.Signal import Network.Linx.Gateway.Types import Generators () prop_signal :: Signal -> Bool prop_signal sig = let encodedSignal = encode sig len = payloadSize sig in (asInt len) == LBS.len...
kosmoskatten/linx-gateway
test/SignalProperties.hs
mit
638
0
11
138
164
87
77
17
1
{-# LANGUAGE UnicodeSyntax #-} module Data.Poset.Semilattice where import Data.Maybe (isJust) import Data.Poset -- | Semilattice is a Poset if infimum for every two elements exists -- isSemilattice ∷ Eq α ⇒ Poset α → Bool isSemilattice p@(Poset es _) = and [ isJust $ infimum' p a b | a ← es, b ← es ]
dmalikov/posets
src/Data/Poset/Semilattice.hs
mit
319
0
8
61
96
52
44
7
1
module Main where import Test.HUnit import Chapter2_Tests import qualified System.Exit as Exit testsSuite = TestList [ Chapter2_Tests.tests ] main :: IO () main = do count <- runTestTT $ testsSuite if failures count > 0 then Exit.exitFailure else return ()
omelhoro/haskell-hutton
Main.hs
mit
309
0
9
92
84
46
38
9
2
{-# htermination range :: (Char,Char) -> [Char] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_range_3.hs
mit
52
0
2
8
3
2
1
1
0
-- | Defines the StlImporter. module Codec.Soten.Importer.StlImporter ( StlImporter(..) ) where import Control.Monad ( liftM2 ) import qualified Data.ByteString.Lazy as BS import Data.Maybe ( isJust , fromJust ...
triplepointfive/soten
src/Codec/Soten/Importer/StlImporter.hs
mit
5,140
0
17
1,882
1,125
616
509
115
3
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Hablog.Data.Markup ( MarkupEngine(..) , convertToHtml ) where import Database.Persist import Database.Persist.TH import Text.Pandoc import qualified Data.Text as T data MarkupEngine = Markdown deriving (Show, Read, Eq) derivePersistField "MarkupEngine" conve...
garrettpauls/Hablog
src/Hablog/Data/Markup.hs
mit
477
0
11
64
129
72
57
13
1
{-# LANGUAGE OverloadedStrings #-} module Network.AMQP.Internal.Producer ( produceTopicMessage ) where import Config.Config as Config (RabbitMQConfig (..)) import Control.Monad.Reader import Data.Aeson as Aeson import Network.AMQP.Internal.Types import qualified Network.AMQP as AMQP produceTopicMessage :: ToJSON a =...
gust/feature-creature
legacy/lib/Network/AMQP/Internal/Producer.hs
mit
1,046
0
14
187
292
156
136
21
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-input.html module Stratosphere.ResourceProperties.KinesisAnalyticsApplicationInp...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationInput.hs
mit
5,819
0
13
410
599
346
253
54
1
{-# language UndecidableInstances #-} -- | this is the general module (top module after refactoring) module Rewriting.Derive where import Rewriting.Apply import Rewriting.Derive.Instance {- import Rewriting.Step import Rewriting.Steps import Rewriting.Derive.Quiz import Rewriting.Derive.Config -} import Autolib.Rep...
florianpilz/autotool
src/Rewriting/Derive.hs
gpl-2.0
2,743
0
13
813
690
347
343
-1
-1
-- OmegaGB Copyright 2007 Bit Connor -- This program is distributed under the terms of the GNU General Public License ----------------------------------------------------------------------------- -- | -- Module : Display -- Copyright : (c) Bit Connor 2007 <bit@mutantlemon.com> -- License : GPL -- Maintain...
bitc/omegagb
src/Display.hs
gpl-2.0
877
0
11
144
129
86
43
6
1
{- Copyright (C) 2006-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/Parsing.hs
gpl-2.0
34,269
0
21
10,379
8,006
4,132
3,874
649
10
{- | Module : $Header$ Description : Symbols of propositional logic Copyright : (c) Dominik Luecke, Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable Definition of symbols for propositional logic...
nevrenato/HetsAlloy
Propositional/Symbol.hs
gpl-2.0
2,366
0
16
569
471
269
202
43
1
module Access.Data.Time.Clock.POSIX ( module Data.Time.Clock.POSIX ) where import Data.Time.Clock.POSIX import Access.Core class Access io => POSIXTimeAccess io where getPOSIXTime' :: io POSIXTime instance POSIXTimeAccess IO where getPOSIXTime' = getPOSIXTime
bheklilr/time-io-access
Access/Data/Time/Clock/POSIX.hs
gpl-2.0
282
0
7
51
68
40
28
8
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import Control.Monad import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT(..),left,right) import Control.Monad.Trans.Mayb...
wavewave/lhc-analysis-collection
analysis/SimplifiedSUSY_ATLAS1to2L2to6JMET_8TeV.hs
gpl-3.0
6,020
2
23
1,423
1,937
1,002
935
121
3
{-| Module: Ice.Gauss Description: Functions for Gaussian elimination used in Ice. -} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module Ice.Gauss ( -- * Forward elimination performElimination -- * Backwar...
kantp/ice
Ice/Gauss.hs
gpl-3.0
10,497
103
16
2,769
3,386
1,854
1,532
179
7
module Plugins.Sql where import Database.HDBC import Database.HDBC.Sqlite3 import Plugins.Html import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html4.Transitional.Attributes as A import qualified Data.ByteString import Data.Char fun = do conn <- connectSqlite3 "new.db" quickQuery' co...
xpika/interpreter-haskell
Plugins/Sql.hs
gpl-3.0
697
0
19
120
215
113
102
19
1
module Tile.Query (evalTileQuery) where import Declare import Dir import History import State import Types import Data.List hiding (filter, lookup) import Data.Maybe type TileQueryResult = [(TileRef, Maybe (History TileRef))] evalTileQuery :: TileQuery -> Config -> World -> TileQueryResult evalTileQuery tq c wo = ...
ktvoelker/argon
src/Tile/Query.hs
gpl-3.0
2,110
0
13
476
941
480
461
-1
-1
module Object ( Object() , newObject , newObjectIO , readObject , readObjectIO , writeObject , modifyObject , modifyObject' , swapObject , useObject , overObject , overObject' ) where import Control.Concurrent.STM import Control.Lens import Control.Monad.STM.Class import H.IO import H.Prelud...
ktvoelker/airline
src/Object.hs
gpl-3.0
1,887
0
10
399
793
408
385
54
1
module TestParse (tests) where import Test.HUnit(Assertion,Test(..),assertFailure) import Ast(Identifier(..),PartialDef(..),Param(..),Unparsed(..)) import Compile(compile) import Parse(parse) tests :: Test tests = TestList [ TestCase testSimple, TestCase testTwo, TestCase testComment, TestCase te...
qpliu/esolang
01_/hs/compiler2/TestParse.hs
gpl-3.0
4,231
0
13
1,252
1,167
622
545
90
2
-- -*-haskell-*- -- Vision (for the Voice): an XMMS2 client. -- -- Author: Oleg Belozeorov -- Created: 10 Sep. 2010 -- -- Copyright (C) 2010 Oleg Belozeorov -- -- 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 F...
upwawet/vision
src/Properties/Order.hs
gpl-3.0
2,763
0
14
532
658
349
309
-1
-1
module HFlint.FMPZPoly.Base where import Control.DeepSeq ( NFData(..) ) import Data.Composition ( (.:) ) import qualified Data.Vector as V import Data.Vector ( Vector ) import Foreign.C.String ( peekCString , withCString ) import Foreign.Marshal ( free ) import System.IO...
martinra/hflint
src/HFlint/FMPZPoly/Base.hs
gpl-3.0
2,827
0
15
470
705
381
324
59
1
module Nucleic.IO ( Signal, Edge, signal, behS, pushS, edge, evtE, pushE ) where import Control.Monad.Trans ( liftIO ) import qualified FRP.Sodium as FRP import FRP.Sodium (Behavior) data Signal a = Signal (FRP.Behavior a) (a -> FRP.Reactive ()) data Edge a = Edge (FRP.Event...
RayRacine/nucleic
Nucleic/IO.hs
gpl-3.0
1,079
0
10
292
413
220
193
30
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-searchconsole/gen/Network/Google/Resource/Webmasters/Sitemaps/List.hs
mpl-2.0
5,284
0
19
1,268
795
464
331
115
1