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 OverloadedStrings #-} module Rho.PeerComms.Handshake where import Data.Binary.Get import Data.Bits import qualified Data.ByteString as B import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy...
osa1/rho-torrent
src/Rho/PeerComms/Handshake.hs
bsd-3-clause
2,178
0
16
531
608
331
277
48
4
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Time/GA/Rules.hs
bsd-3-clause
19,633
0
19
5,243
5,653
3,122
2,531
658
2
module NormalForm where data Fiction = Fiction deriving (Eq, Show) data Nonfiction = Nonfiction deriving (Eq, Show) data BookType = FictionBook Fiction | NonfictionBook Nonfiction deriving (Eq, Show) type AuthorName = String data Author = Author (AuthorName, BookType) -- the above is n...
chengzh2008/hpffp
src/ch11-AlgebraicDataTypes/normalForm.hs
bsd-3-clause
685
0
7
200
153
89
64
16
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, TupleSections, ViewPatterns #-} module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, ContextKind(..), expectedKindInCtxt, checkValidTheta, checkValidFamPats, checkVal...
mcschroeder/ghc
compiler/typecheck/TcValidity.hs
bsd-3-clause
75,187
4
24
21,057
11,455
5,867
5,588
844
15
module Type.Effect.Env where import Type.Effect.Common import Control.Arrow (second) import Control.Applicative ((<$>)) import qualified Control.Monad as Monad import Control.Monad.Error import qualified Data.Map as Map import qualified Text.PrettyPrint as PP import qualified Reporting.Annotation as A import qualifi...
JoeyEremondi/elm-type-effect
src/Type/Effect/Env.hs
bsd-3-clause
9,087
0
19
2,050
3,348
1,695
1,653
211
7
{-# OPTIONS -XGeneralizedNewtypeDeriving #-} module Scurry.Types.Network ( MACAddr(..), EthernetHeader(..), SrcMAC, DstMAC, EthType, EndPoint(..), ScurryAddress(..), ScurryMask, ScurryPort(..), epToSa, saToEp, ) where import Data.Binary import Numeric import Network.Socket ...
dmagyar/scurry
src/Scurry/Types/Network.hs
bsd-3-clause
3,781
0
11
1,164
1,136
612
524
85
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} module Hoopl ( module Compiler.Hoopl, module Hoopl.Dataflow, ) where import Compiler.Hoopl hiding ( (<*>), mkLabel, mkBranch, mkMiddle, mkLast, -- clashes with our MkGraph DataflowLattice, OldFact, NewFact, JoinFun, fact_bot, fact_join, joinOutFacts...
mettekou/ghc
compiler/cmm/Hoopl.hs
bsd-3-clause
558
0
6
102
139
96
43
15
0
-- | -- Module: Control.Wire.Trans.Simple -- Copyright: (c) 2012 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- -- Basic wire combinators. module Control.Wire.Trans.Simple ( -- * Predicate-based ifW ) where import Control.Arrow import Control.Monad imp...
MaxDaten/netwire
Control/Wire/Trans/Simple.hs
bsd-3-clause
1,364
0
23
464
365
199
166
-1
-1
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_EXT_extended_dynamic_state" module Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state ( cmdSetCullMode , cmdSetFrontFace ...
expipiplus1/vulkan
src/Vulkan/Core13/Promoted_From_VK_EXT_extended_dynamic_state.hs
bsd-3-clause
85,239
0
21
18,899
5,703
3,451
2,252
-1
-1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} module Network.TLS.Handshake.Common ( handshakeFailed , errorToAlert , unexpected , newSession , handshakeTerminate -- * sending packets , sendChangeCipherAndFinish -- * receiving packets , recvChangeCipherAndFinish , RecvSta...
tolysz/hs-tls
core/Network/TLS/Handshake/Common.hs
bsd-3-clause
5,591
0
18
1,380
1,449
733
716
114
3
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Core.Operations -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Constructors and basic operations on symbolic values -----------...
josefs/sbv
Data/SBV/Core/Operations.hs
bsd-3-clause
42,226
1
22
13,421
11,034
5,598
5,436
559
7
module Control.Monad.Ghc ( GhcT, runGhcT ) where import Control.Applicative import Prelude import Control.Monad import Control.Monad.Trans import qualified Control.Monad.Trans as MTL import Control.Monad.Catch import qualified GHC (runGhcT) import qualified MonadUtils as GHC import qualified Exception as GHC im...
int-e/hint
src/Control/Monad/Ghc.hs
bsd-3-clause
2,441
0
19
533
861
469
392
47
1
-- HACKERRANK - The Love-Letter Mystery -- https://www.hackerrank.com/challenges/the-love-letter-mystery module Main where import Control.Monad import Data.Char main :: IO () main = do line <- getLine let caseNum = read line :: Int subMain caseNum subMain :: Int -> IO() subMain caseNum = unless...
everyevery/programming_study
hackerrank/Algorithms/Warmup/TheLoveLetterMystery/TheLoveLetterMystery.hs
mit
545
0
16
139
210
104
106
16
1
module Cardano.Wallet.API.V1.Swagger.Example ( module Pos.Util.Example ) where import Pos.Util.Example
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/API/V1/Swagger/Example.hs
mit
122
0
5
28
25
18
7
3
0
module Web.Slack.Message ( Message(..), MessageRaw(..), convertRawMessage, TimeStamp(..), timeStampToString, channelHistory, channelHistoryBefore, channelHistoryAll, channelHistoryRecent, messagesByUser, postMessag...
dhrosa/hslack
Web/Slack/Message.hs
mit
5,137
0
19
1,187
1,161
640
521
99
2
module Reverse where rvrs :: String -> String rvrs curry = third ++ " " ++ second ++ " " ++ first where first = take 5 curry second = take 2 $ drop 6 curry third = drop 9 curry main :: IO () main = print $ rvrs "Curry is awesome"
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Reverse.hs
mit
246
0
8
69
98
50
48
8
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} -- | -- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Benedikt Schmidt <beschmi@gmail....
kmilner/tamarin-prover
lib/term/src/Term/Term/Raw.hs
gpl-3.0
7,643
0
14
2,085
2,314
1,204
1,110
141
10
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/UploadFunction.hs
mpl-2.0
12,116
0
31
2,793
1,852
1,096
756
175
1
module Common (View, Bitmap, Render, RGBA32, prettyRGBA,) where import Data.Array.Accelerate as A import Data.Array.Accelerate.IO as A -- Types ----------------------------------------------------------------------- -- Current view into the complex plane type View a = (a...
aesadde/AccObsBenchmarks
Mandel/src/Common.hs
bsd-3-clause
1,057
0
9
249
266
153
113
14
1
{-# LANGUAGE GADTs, OverloadedStrings, ScopedTypeVariables, NoMonomorphismRestriction #-} -- | -- Module : Data.Array.Accelerate.Pretty.HTML -- Copyright : [2010..2011] Sean Seefried -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Stability : experimental -- Portabili...
wilbowma/accelerate
Data/Array/Accelerate/Pretty/HTML.hs
bsd-3-clause
6,625
0
17
2,055
1,301
699
602
165
1
import "hint" HLint.Default import "hint" HLint.Dollar ignore "Eta reduce" ignore "Use ."
ssaavedra/liquidhaskell
HLint.hs
bsd-3-clause
91
0
5
13
25
12
13
-1
-1
{- Disable some errors and warnings during the haddock pass (caused by compiler plugins and hs-boot) -} {-# OPTIONS_GHC -Wall #-} module Main (main) where import Distribution.Simple import Distribution.Simple.Setup main :: IO () main = defaultMainWithHooks simpleUserHooks { confHook = \a -> confHook simpleUserHo...
achirkin/easytensor
easytensor/Setup.hs
bsd-3-clause
972
0
10
131
227
131
96
22
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cloudwatch/gen/Network/AWS/CloudWatch/GetMetricStatistics.hs
mpl-2.0
8,923
0
12
1,853
1,105
664
441
106
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Error -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
sdiehl/ghc
libraries/base/Foreign/C/Error.hs
bsd-3-clause
23,003
0
14
6,219
4,855
2,670
2,185
381
4
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Tidying up Core} -} {-# LANGUAGE CPP #-} module TidyPgm ( mkBootModDetailsTc, tidyProgram, globaliseAndTidyId ) where #include "HsVersions.h" import TcRnTypes import DynFlags import CoreSyn import CoreUnfold import CoreFVs import CoreT...
forked-upstream-packages-for-ghcjs/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
62,960
0
18
19,079
7,500
4,049
3,451
560
5
module IsabelleDecl where import IsabelleType(ConstsDecl,TypesDecl,DomainType,DomainDecl(..)) import IsabelleTerm(HMatches,FixrecDecl(..)) import IsabelleProp(PredDecl,PropDecl) import Mixfix -- For top level declarations: data IsaDecl = IsaTypes TypesDecl | IsaDomain DomainDecl | IsaConsts ConstsDecl | IsaFi...
forste/haReFork
tools/hs2isabelle/AST/IsabelleDecl.hs
bsd-3-clause
1,096
0
12
208
335
174
161
30
0
module A2 where import C2 import D2 hiding (anotherFun) main xs = (sumSquares xs) + (anotherFun xs)
kmate/HaRe
old/testing/duplication/A2_AstOut.hs
bsd-3-clause
101
0
7
18
40
23
17
4
1
main = do x <- return "Hello, World!" >>= return putStrLn x
beni55/ghcjs
test/fay/doBindAssign.hs
mit
64
0
9
16
26
11
15
3
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module GHC.Conc.Signal ( Signal , HandlerFun , setHandler , runHandlers , runHandlersPtr ) where import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Data.Dynamic (Dynamic) import Foreign.C.Types...
szatkus/haste-compiler
libraries/ghc-7.10/base/GHC/Conc/Signal.hs
bsd-3-clause
3,405
0
20
764
823
431
392
71
3
module T9415 where class D a => C a where meth :: D a => () class C a => D a
siddhanathan/ghc
testsuite/tests/typecheck/should_fail/T9415.hs
bsd-3-clause
80
0
8
25
48
23
25
-1
-1
module Main where import Control.Monad.Random (evalRandIO) import HW07 (State (..), newDeck, repl) main :: IO () main = evalRandIO newDeck >>= repl . State 100
mrordinaire/upenn-haskell
src/HW07/Main.hs
mit
162
0
7
27
62
36
26
5
1
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, OverloadedStrings, GADTs, FlexibleContexts #-} -- {-# OPTIONS_GHC -ddump-splices #-} module Hablog.Data.Persist where import Data.ByteString import Data.Text import Data.Time.Clock import Database.Persist import Database.Persist.TH import Hablog.Data.Markup (Ma...
garrettpauls/Hablog
src/Hablog/Data/Persist.hs
mit
983
0
7
220
82
51
31
10
0
{- Glossary: a simple glossary generator for Barrelfish Copyright (c) 2010, 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. A...
modeswitch/barrelfish
doc/001-glossary/Main.hs
mit
18,808
116
9
6,327
1,032
552
480
106
1
{-# htermination listToFM :: [(Char,b)] -> FiniteMap Char b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_listToFM_3.hs
mit
81
0
3
12
5
3
2
1
0
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} module Protocol where import System.Console.Haskeline hiding (catch) import Control.Applicative import Data.String import Control...
paolino/mootzoo
Protocol.hs
mit
3,919
4
14
1,362
1,150
594
556
82
1
import Data.Char import Control.Monad import Data.List.Split -- parse the strings of signed integers parseLines :: FilePath -> IO [[Char]] parseLines = fmap lines . readFile -- one scan of the String removing reactive pairs oneStep :: [Char] -> [Char] oneStep = foldl react "" where react acc x | ...
bbglab/adventofcode
2018/ferran/day05/AlchemicalReduction.hs
mit
1,446
0
13
427
455
239
216
26
2
{-# LANGUAGE TemplateHaskell, TypeFamilies, BangPatterns #-} module Game.Collision ( newOctree , newBoundary , GameOctree , octreeUpdate , octreeRemoveObject , octreeQueryObject , goStaticObjects , ooRealBoundary , rbLines , vectorXY , toFloat ) where -- * Note: we query using the maximum boundary diameter of all ob...
mfpi/q-inqu
Game/Collision.hs
mit
10,145
67
23
1,710
2,975
1,640
1,335
-1
-1
{-# LANGUAGE CPP #-} module GHCJS.DOM.MediaElementAudioSourceNode ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.MediaElementAudioSourceNode #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/MediaElementAudioSourceNode.hs
mit
394
0
5
33
33
26
7
4
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.HTMLPreElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.HTMLPreElement #else module Graphics.UI.Gtk.WebKit.DOM.HTMLPreElement #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI))...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/HTMLPreElement.hs
mit
455
0
5
39
33
26
7
4
0
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-} module Main where import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine drawHead h = arrowAt' (with & arrowHead .~ h & shaftStyle %~ lw none & headLength .~ local 0.5) origin (r2 (1, 0)) <> square 0.5 # alignL...
jeffreyrosenbluth/NYC-meetup
meetup/Arrowheads.hs
mit
966
0
18
279
348
170
178
21
1
module Graphics.Gloss.Interface.FRP.Yampa (playYampa, InputEvent) where import Control.Monad (when) import Data.IORef (newIORef, writeIORef, readIORef) import Graphics.Gloss (Display, Color, Picture, blank) import Graphics.Gloss.Interface.IO.Game (playIO) import FRP.Yampa (Event(..), SF, reactInit, react) import Type...
ksaveljev/yampa-2048
src/Graphics/Gloss/Interface/FRP/Yampa.hs
mit
1,483
0
16
424
382
210
172
29
2
-- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubern...
soundcloud/haskell-kubernetes
lib/Kubernetes/Model/V1/VolumeMount.hs
mit
1,617
0
14
472
302
180
122
35
1
{-# htermination isSuffixOf :: Eq a => [(Maybe a)] -> [(Maybe a)] -> Bool #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_isSuffixOf_10.hs
mit
90
0
3
17
5
3
2
1
0
module SudokuUtil where import Control.Monad.List import Data.List -- Type declarations type LE e = ListT (Either e) -- Generic Utils cons :: a -> [a] cons = (:[]) occurrencesInList :: Eq a => a -> [a] -> Int occurrencesInList e = foldl' (\n a -> if a == e then n+1 else n) 0 findError :: [(Bool,a)] -> (Bool,a) f...
dermesser/Yadoku
SudokuUtil.hs
mit
394
0
10
81
193
113
80
10
2
module Util.Persistent ( RawQuery(..) , GetEntitiesWithCountQuery(..) , EntitiesWithCount(..) , getEntitiesWithCount , LimitOffset(..) ) where import Import import qualified Database.Persist.Sql as Sql import Data.Function ((&)) data RawQuery = RawQuery { query :: Text , queryValues :...
prasmussen/glot-www
Util/Persistent.hs
mit
1,270
0
14
333
317
181
136
-1
-1
module Generator where import Core pathMapAsCp :: PathMap -> String pathMapAsCp pathMap = "cp -fv " ++ pathMapSource pathMap ++ " " ++ pathMapDest pathMap generateScript :: PathMaps -> String generateScript pathMaps = unlines $ map pathMapAsCp pathMaps
rexim/mapie
src/Generator.hs
mit
256
0
8
41
68
35
33
6
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
trezona-lecomte/quizster
src/Models.hs
mit
2,621
0
8
826
461
259
202
54
1
module OWL2.TestMS where import System.Process import System.Environment import System.IO import System.Directory import Data.List as L (sort,isSuffixOf, isPrefixOf, (\\), sortOn) import qualified Data.Set as S (fromList, difference, null, size) import Data.Map(empty, unions) import Control.Monad import Common.Parse...
spechub/Hets
OWL2/TestMS.hs
gpl-2.0
8,102
0
21
2,419
1,922
1,004
918
117
3
-- | Read a Microscope JSON file and verify that it's correct. module Main where import Control.Monad import System.Environment (getArgs) import qualified Data.ByteString.Lazy as BL import Data.Aeson import Data.Maybe import Data.List import Microscope.JSON import Microscope.Types import Microscope.References import Mi...
evilcandybag/Microscopesoft
hs/microlint.hs
gpl-2.0
1,043
0
15
223
321
164
157
29
2
data Tree a = Node a [Tree a] deriving (Eq, Show) tree1 = Node 'a' [] tree2 = Node 'a' [Node 'b' []] tree5 = Node 'a' [ Node 'f' [Node 'g' []], Node 'c' [], Node 'b' [Node 'd' [], Node 'e' []] ] -- 70B isTree -- 70C nnodes (Node _ []) = 1 nnodes (Node _ ...
liuyang1/H99
70.hs
gpl-2.0
421
0
10
148
209
106
103
10
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Rectangles -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : stab...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Rectangles.hs
gpl-2.0
2,552
0
10
433
393
220
173
22
0
{-# LANGUAGE FlexibleInstances, TypeFamilies, DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses #-} module Language.SecreC.Parser.Tokens where import Safe import Data.Generics import Text.PrettyPrint import Data.Digits (digits, unDigits) import Data.List as List import Language.SecreC.Pretty import La...
haslab/SecreC
src/Language/SecreC/Parser/Tokens.hs
gpl-3.0
11,721
0
15
4,401
3,427
1,733
1,694
324
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module ATP.Util.Prelude ( module Prelude , Impossible(..) , throwImpossible , (<$>) , error' , first, second , (<>), (<+>) , trace , trace' , tracef, tracef' , tracef2, tracef2' , tracef3, tracef3' , tracef4, tracef4' , tracef5, tracef5' , tracef6,...
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell
src/ATP/Util/Prelude.hs
gpl-3.0
1,199
0
8
352
331
217
114
44
1
{-# LANGUAGE Arrows #-} {-# LANGUAGE OverloadedStrings #-} -- | Talk with the bot module MirakelBot.Handlers.Mirakel where import Control.Concurrent.MVar import Control.Monad.Reader import Data.Foldable import Data.Monoid import qualified Data.Text ...
azapps/mirakelbot
src/MirakelBot/Handlers/Mirakel.hs
gpl-3.0
3,212
1
15
827
961
481
480
67
5
{-# LANGUAGE TypeFamilies, FlexibleInstances #-} {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Numerical.PETSc.Internal.Utils -- Copyright : (c) Marco Zocca 2015 -- License : LGPL3 -- Maintainer : zocca . marco . gmail . com ...
ocramz/petsc-hs
src/Numerical/PETSc/Internal/Utils.hs
gpl-3.0
9,832
2
14
2,640
4,303
2,350
1,953
197
2
module Language.LCC.Lexer ( whiteSpace , symbol , reserved , lexeme , angles , parens , braces , brackets , dot , semicolon , colon , comma , commaSep , commaSep1 , identifier , intLiteral , floatLiteral , charLiteral , stringLiteral , boolLiteral ) where import Data.Functor...
xcv-/LCC
lib/Language/LCC/Lexer.hs
gpl-3.0
5,102
0
10
1,845
1,166
705
461
120
1
{-# OPTIONS_GHC -F -pgmF htfpp #-} module Main where import Test.Framework import Test.Framework.BlackBoxTest import {-@ HTF_TESTS @-} Test.HTCF.ArrowXml import {-@ HTF_TESTS @-} Test.HTCF.ConfigParser import {-@ HTF_TESTS @-} Test.HTCF.Tokenizer import {-@ HTF_TESTS @-} Test.HTCF.TcfParser main = htfMain htf_importe...
lueck/htcf
testsuite/TestMain.hs
gpl-3.0
327
0
5
39
52
35
17
9
1
module Tokenizer(Token(Symbol,Zero,One,Equal,Dot,Nil),tokenize) where data Token = Symbol String | Zero | One | Equal | Dot | Nil tokenize :: String -> [Token] tokenize ('=':'=':cs) = tokenize (dropComment cs) tokenize ('0':cs) = Zero : tokenize cs tokenize ('1':cs) = One : tokenize cs tokenize ('=':cs) = Equal : to...
qpliu/esolang
01_/hs/interp/Tokenizer.hs
gpl-3.0
1,291
0
11
289
606
307
299
33
10
{-# LANGUAGE RecursiveDo, OverloadedStrings #-} module Estuary.Widgets.Sequencer where import Reflex import Reflex.Dom import GHCJS.DOM.EventM import Control.Monad import Data.Map.Strict as M import Data.Text (Text) import qualified Data.Text as T import Safe.Foldable (maximumMay) import Text.Read (readMaybe) import ...
d0kt0r0/estuary
client/src/Estuary/Widgets/Sequencer.hs
gpl-3.0
3,929
0
20
641
1,268
644
624
57
2
-- 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
designer/source/Game/Grid/GridWorld/Make.hs
gpl-3.0
2,386
0
10
523
310
178
132
37
1
{-# LANGUAGE ScopedTypeVariables #-} module Tests.Gui where import qualified Control.Lens as Lens import Control.Monad.Once (OnceT, _OnceT) import Control.Monad.State (mapStateT) import Control.Monad.Unit (Unit(..)) import qualified Data.Map as Map import qualified Data.Property as Prope...
Peaker/lamdu
test/Tests/Gui.hs
gpl-3.0
21,260
0
24
5,945
5,713
2,947
2,766
-1
-1
module Tree where data Tree a = Node a (Tree a) (Tree a) | Empty deriving Show type BTree a = Tree a add :: BTree Int -> Int -> BTree Int add Empty a = Node a Empty Empty add (Node n left right) a = if a > n then Node n left (add right a) else Node n (add left a) right remove :: BTree Int -> Int -> BTree Int remove...
cwlmyjm/haskell
Learning/Tree.hs
mpl-2.0
397
0
8
94
198
102
96
10
2
module Main where main :: IO () main = do cs <- getContents putStr $ c_head cs c_head :: String -> String c_head = unlines . take 10 . lines
tyoko-dev/coreutils-haskell
src/Head.hs
agpl-3.0
153
0
8
42
61
31
30
6
1
{-# LANGUAGE NoImplicitPrelude #-} module Lib where import Protolude hiding (Map) {- https://github.com/conal/talk-2014-lambdajam-denotational-design ------------------------------------------------------------------------------ 1. Introduction data type rep collects related pieces of info : making more convenient...
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/conal-elliot/2009-03-denotational-design-with-type-class-morphisms/src/Lib.hs
unlicense
9,115
0
5
1,953
15
11
4
3
0
module Tex (display) where import Tree tex :: Tree -> String tex p@(Plus a b) = binop "+" p a b tex p@(Minus a b) = binop "-" p a b tex p@(Expt a b) = binop "^" p a b tex p@(Times a b) = binop "\\times" p a b tex p@(Divide a@(Divide x y) b) = frac (divide a x ...
jmgimeno/haskell-playground
src/FourFours/Tex.hs
unlicense
1,656
0
11
556
828
417
411
43
1
module Main where import Numeric.Integration.Simpson as S import Numeric.Integration.Gauss as G f :: Double -> Double f x = x ** 2 integratedF :: Double -> Double integratedF x = x ** 3 / 3 a :: Double a = 1 b :: Double b = 2 accuracy :: Double accuracy = 0.000001 main::IO() main = do putStrLn $ "integrated ...
xdcrafts/Numenor
src/Main.hs
apache-2.0
531
0
11
115
196
104
92
18
1
{-# LANGUAGE MultiWayIf #-} import Data.List lcs_out :: [Int] -> Int lcs_out [] = 0 lcs_out a = let sorted_l = sort a first = head sorted_l in lcs (tail sorted_l) (first,1,1) lcs :: [Int] -> (Int,Int,Int) -> Int lcs [] (_,largest,_) = largest lcs (x:xs) (last, largest, this_ro...
ccqpein/Arithmetic-Exercises
Longest-Consecutive-Sequence/LCS.hs
apache-2.0
666
5
11
186
350
188
162
20
2
{-| Module to access the information provided by the Xen hypervisor. -} {- Copyright (C) 2013 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 of source code must retain ...
ganeti/ganeti
src/Ganeti/Hypervisor/Xen.hs
bsd-2-clause
4,129
0
15
808
734
388
346
57
4
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module YesodDsl.Generator.PureScript (moduleToPureScript) where import YesodDsl.AST import Data.List import Data.Maybe import Data.Char (toLower) import Data.String.Utils (rstrip, replace) import Data.Text (Text) impo...
tlaitinen/yesod-dsl
YesodDsl/Generator/PureScript.hs
bsd-2-clause
9,803
0
18
2,439
2,599
1,273
1,326
161
22
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QListWidget_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generated - do...
keera-studios/hsQt
Qtc/Gui/QListWidget_h.hs
bsd-2-clause
99,274
359
19
21,666
32,796
15,781
17,015
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} module Database.SqlServer.Definition.Identifier ( RegularIdentifier , ArbUUID , ParameterIdentifier , renderRegularIdentifier , renderParameterIdentifier , unwrap ) w...
SuperDrew/sql-server-gen
src/Database/SqlServer/Definition/Identifier.hs
bsd-2-clause
2,054
0
12
467
552
302
250
58
1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} -- XEP 0030: Service Discovery (disco) module Network.Xmpp.Xep.ServiceDiscovery ( QueryInfoResult(..) , Identity(..) , queryInfo , Item(..) , queryItems , DiscoError(.....
Philonous/pontarius-xmpp
source/Network/Xmpp/Xep/ServiceDiscovery.hs
bsd-3-clause
7,281
0
18
2,549
2,104
1,111
993
162
5
module Unparse where type Unparser a = a -> String class Unparse a where unparse :: a -> String instance (Unparse a, Unparse b) => Unparse (a, b) where unparse (a, b) = unparse a ++ unparse b instance (Unparse a) => Unparse [a] where unparse = concatMap unparse instance (Unparse a) => Unparse (Maybe a) where...
facebookarchive/lex-pass
src/Unparse.hs
bsd-3-clause
476
0
8
103
212
111
101
13
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
23Skidoo/snap
src/Snap/Snaplet/Internal/Types.hs
bsd-3-clause
19,860
0
15
4,242
2,926
1,625
1,301
195
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.TextureStencil8 -- 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/TextureStencil8.hs
bsd-3-clause
678
0
4
81
40
33
7
4
0
{-# LANGUAGE FlexibleInstances #-} module JArchiveParser.Model ( Clue (..) , Game (..) , Round (..) , Season (..) , Category (..) , RoundType (..) , GameId (..) , SeasonId (..) ) where import qualified Data.List as L newtype GameId = GameId Int newtype SeasonId = SeasonId Int dat...
joshuaclayton/j-archive-parser
src/JArchiveParser/Model.hs
bsd-3-clause
2,262
0
14
666
684
388
296
67
0
------------------------------------------------------------ -- | -- Module : Instances -- copyright : Kotaro Ohsugi -- License : BSD-style (see the LICENSE file in the distribution) -- -- Now, there's only Show Root instance though, -- this module should contain all data types, classes and instances. -- -- __IMP...
pythonissam/Cyclic
src/Instances.hs
bsd-3-clause
644
0
14
107
96
55
41
4
0
{-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeOperators, TypeFamilies, ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Glambda.Exp -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE) --...
goldfirere/glambda
src/Language/Glambda/Exp.hs
bsd-3-clause
4,576
0
10
1,034
1,361
714
647
69
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGU...
IxpertaSolutions/freer-effects
src/Data/OpenUnion.hs
bsd-3-clause
1,422
0
8
295
161
110
51
31
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE OverloadedStrings #-} module Language.Haskell.Liquid.Measure ( Spec (..) , BareSpec , MSpec (..) , mkM, mkMSpec, mkMSpec' , qualifySpec , mapTy , dataConTypes , de...
abakst/liquidhaskell
src/Language/Haskell/Liquid/Measure.hs
bsd-3-clause
14,472
0
18
4,850
4,731
2,541
2,190
333
2
{-# LANGUAGE ScopedTypeVariables, CPP #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | More IO functions. The functions include ones for reading files with specific encodings, -- strictly reading files, and writing files with encodings. There are also some simple -- temporary file functions, more advanced ...
ndmitchell/extra
src/System/IO/Extra.hs
bsd-3-clause
9,401
0
18
2,075
1,863
970
893
140
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 The @Inst@ type: dictionaries or method instances -} {-# LANGUAGE CPP, MultiWayIf, TupleSections #-} module Inst ( deeplySkolemise, topInstantiate, topInstantiateInferred, deeplyInstantiate, instCall...
snoyberg/ghc
compiler/typecheck/Inst.hs
bsd-3-clause
30,898
8
17
9,522
5,634
2,948
2,686
415
7
{-# LANGUAGE Arrows #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} module Parse.Type ( parseTypes ) where import Data.Char(isAlpha) import Parse.CType import Parse.State import Parse.Utils import Spec.Type import Text.Regex.TDFA((=~)) import Text.XML.HXT.Core parseTypes :: ParseArrow XmlT...
oldmanmike/vulkan
generate/src/Parse/Type.hs
bsd-3-clause
9,198
12
15
2,990
1,825
908
917
172
2
{-# LANGUAGE OverloadedStrings #-} module Data.Config.Parser where import Prelude hiding (takeWhile) {- import Data.Text (Text) import Data.HashMap.Strict (HashMap) -} import Control.Applicative import Data.Char import qualified Data.HashMap.Strict as Map import Data.Text (Text) import qualified Data.Text as T import...
afcowie/konvig
lib/Data/Config/Parser.hs
bsd-3-clause
1,849
0
16
430
469
245
224
44
5
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} module ViewModels.DeviceViewModel where import Graphics.QML as QML import qualified Data.Text.Encoding as T import qualified Data.Text as T import Data.Typeable import Data.Proxy import Control.Concurrent.MVar import Control.Monad (when) import Androm...
graninas/Andromeda
app/ViewModels/DeviceViewModel.hs
bsd-3-clause
1,184
0
13
194
257
143
114
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Arbitrary instances for Update System networking types. module Test.Pos.Infra.Arbitrary.Update ( ) where import Universum hiding (id) import Test.QuickCheck (Arbitrary ...
input-output-hk/pos-haskell-prototype
infra/test/Test/Pos/Infra/Arbitrary/Update.hs
mit
1,393
0
14
344
251
152
99
23
0
{------------------------------------------------------------------------------- Outbound message queue Intended for qualified import > import Network.Broadcast.OutboundQ (OutboundQ) > import qualified Network.Broadcast.OutboundQ as OutQ > import Network.Broadcast.OutboundQueue.Types References: * http...
input-output-hk/pos-haskell-prototype
networking/src/Network/Broadcast/OutboundQueue.hs
mit
60,597
4
31
16,353
11,234
5,893
5,341
900
10
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Main ( main ) where import Data.Maybe (fromJust) import Data.Version (showVersion) import Paths_sproxy_web (getDataDir, version) -- from cabal import System.Environment (getArgs) import Text.InterpolatedString.Perl6 (qc) import qualified System....
zalora/sproxy-web
src/Main.hs
mit
1,544
0
17
345
345
180
165
33
3
{-# LANGUAGE DeriveDataTypeable #-} {- | 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 Definitio...
keithodulaigh/Hets
Propositional/Symbol.hs
gpl-2.0
2,437
0
16
579
485
277
208
45
1
module Main where import Data.Maybe import Data.Either import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.Ingredients.Rerun import Traduisons.Resources import Traduisons.Util main :: IO () main = defaultMainWithIngredients [rerunningTests defaultIngredients] tests tests :: TestTree tests = testGroup "Tes...
bitemyapp/traduisons-hs
tests/TestMain.hs
bsd-3-clause
1,016
0
10
176
253
135
118
30
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE CPP #-} -- | This module provides a basic text editor widget. You'll need to -- embed an 'Editor' in your application state and transform it with -- 'handleEditorEve...
sjakobi/brick
src/Brick/Widgets/Edit.hs
bsd-3-clause
8,629
0
16
2,440
1,723
929
794
-1
-1
module Lang.Hask.Monads where import FP import MAAM hiding (Time(..)) import Lang.Hask.Semantics import Lang.Hask.Execution import Lang.Hask.Pretty () type PSΣ' ν lτ dτ = (ID :.: ListSetWithTop) :.: (,) (𝒮 ν lτ dτ) newtype PSΣ ν lτ dτ a = PSΣ { runPSΣ :: ListSetWithTop (a, 𝒮 ν lτ dτ) } deriving (PartialOrder, Bot,...
FranklinChen/maam
src/Lang/Hask/Monads.hs
bsd-3-clause
1,968
65
8
412
1,156
608
548
-1
-1
-- |Re-exports commonly used modules. module Language.ECMAScript3 ( module Language.ECMAScript3.Syntax , module Language.ECMAScript3.Parser , renderStatements , renderExpression ) where import Language.ECMAScript3.Syntax import Language.ECMAScript3.Parser import Language.ECMAScript3.PrettyPrint
sinelaw/language-ecmascript
src/Language/ECMAScript3.hs
bsd-3-clause
308
0
5
37
47
32
15
8
0
------------------------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.Pars.ShiftRegisters -- Based on System.Hardware.Arduino -- Copyright : (c) University of Kansas -- System.Hardware.Arduino (c) Levent Erkok --...
ku-fpg/kansas-amber
legacy/Parts/ShiftRegisters.hs
bsd-3-clause
3,902
0
11
1,033
638
353
285
48
1
{-# LANGUAGE FlexibleInstances, GADTs, MultiParamTypeClasses, FlexibleContexts, IncoherentInstances, LambdaCase, DataKinds #-} -- Note on IncoherentInstances: the two instances below will both work fine -- for `GeneralizeSignal Void Void`. They should never be called. module React.Local (GeneralizeSignal(..), locally...
silky/react-haskell
src/React/Local.hs
mit
1,782
0
7
337
158
105
53
16
1
{-------------------------------------------------------------------------------- Copyright (c) Daan Leijen 2003 Copyright (c) Jeremy O'Donoghue 2008 wxWindows License. Demonstrates: - many different kind of controls - message logging. ----------------------------------------------------------------------------...
ekmett/wxHaskell
samples/test/XRCControls/XRCControls_Wx.hs
lgpl-2.1
2,175
0
14
629
623
293
330
38
2
{-# LANGUAGE NoMonomorphismRestriction #-} module TH_bracket2 where d_show = [d| data A = A instance Show A where show _ = "A" |]
sdiehl/ghc
testsuite/tests/quotes/TH_bracket2.hs
bsd-3-clause
172
0
4
65
14
11
3
-1
-1
{-@ LIQUID "--no-termination" @-} module RedBlackTree where import Language.Haskell.Liquid.Prelude data RBTree a = Leaf | Node Color a !(RBTree a) !(RBTree a) deriving (Show) data Color = B -- ^ Black | R -- ^ Red deriving (Eq,Show) ----------------------------...
mightymoose/liquidhaskell
tests/pos/RBTree-height.hs
bsd-3-clause
6,936
0
17
2,213
2,015
1,017
998
77
7
type X = + 1
sdiehl/ghc
testsuite/tests/parser/should_fail/typeops_B.hs
bsd-3-clause
13
2
4
5
9
5
4
-1
-1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ImplicitParams, GADTs #-} module T3743 where class Foo a data M where M :: Foo a => a -> M x :: (?x :: ()) => () x = undefined -- foo :: (?x :: ()) => M -> () foo y = case y of M _ -> x
christiaanb/ghc
testsuite/tests/typecheck/should_compile/T3743.hs
bsd-3-clause
260
0
8
65
78
44
34
-1
-1