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
tanh x = sinh x / cosh x
scravy/nodash
doc/Math/tanh.hs
mit
25
0
6
8
19
8
11
1
1
{-| Core is the internal implementation of joebot2. For the most part, only parts of Core are exposed to the plugin writer, namely "Core.Types" and "Core.Cmds". -} module Joebot.Core (module C) where import Joebot.Core.Cmds as C import Joebot.Core.Types as C
joeschmo/joebot2
src/Joebot/Core.hs
mit
268
0
4
49
29
21
8
3
0
module Golf where skips :: [a] -> [[a]] skips [] = [] skips [x] = [[x]] skips xs = skips' 1 xs where skips' :: Int -> [a] -> [[a]] skips' n xs | n > length xs = [] | otherwise = everyNth n xs : skips' (n+1) xs everyNth :: Int -> [a] -> [a] everyNth 0 _ = [] everyNth 1 xs = xs everyNth n xs =...
CreaturePhil/cis194
Golf.hs
mit
751
0
11
227
443
228
215
25
2
{- | Module : $Header$ Description : hets server queries Copyright : (c) Christian Maeder, DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable (via imports) query strings -} module PGIP.Query where {-...
nevrenato/HetsAlloy
PGIP/Query.hs
gpl-2.0
11,342
0
28
3,447
3,502
1,861
1,641
220
14
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} module...
JonathanReeve/JonathanReeve.github.io
src/Main.hs
gpl-2.0
13,230
0
37
2,969
3,065
1,521
1,544
226
9
{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-} ---------------------------------------------------------------------------- -- | -- Module : Text.XML.Serializer -- Copyright : (c) Simon Foster 2005 -- License : GPL version 2 (see COPYING) -- -- Maintainer : a...
twopoint718/haifa
src/Text/XML/Serializer.hs
gpl-2.0
2,160
0
5
399
115
92
23
11
0
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverloadedStrings, Arrows #-} module Csvstuff ( csvFile, dread, rownames, colnames, Col, line, isdouble, vlookup, toBool, columns, rows ) where import Prelude hiding (id) import Numeric (readFloat) import CsvParser import CsvDatabase {...
b1g3ar5/CsvDatabase
src/Csvstuff.hs
gpl-3.0
1,720
0
11
458
512
277
235
29
2
module While.ParserSpec (spec) where import Test.Hspec import Test.QuickCheck import Test.Hspec.QuickCheck import System.Directory import Data.List import qualified Data.Map.Strict as Map import While.AST import While.ASTGenerator() import While.Parser import While.Compiler spec :: Spec spec = modifyMaxSuccess (...
fpoli/abstat
test/While/ParserSpec.hs
gpl-3.0
5,341
0
21
1,865
1,344
653
691
103
2
import Numeric.Odeint import Numeric.Odeint.Examples import Data.Array.Repa as Repa import Criterion.Main takeNth :: Int -> Double takeNth n = ((iterate teo v0) !! n) ! (Z :. 0) where teo = lorenz63 (10, 28, 8.0/3.0) v0 = fromListUnboxed (Z :. 3) [1, 0, 0] main :: IO () main = defaultMain [ bgroup "Lore...
termoshtt/odeint
app/Bench.hs
gpl-3.0
456
0
10
127
173
94
79
12
1
{- Copyright 2011 Alexander Midgley 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 (at your option) any later version. This program is distributed in the hope th...
shadwstalkr/GrahamScanDemo
test.hs
gpl-3.0
1,313
0
11
259
264
135
129
22
1
{-# LANGUAGE GeneralizedNewtypeDeriving , ScopedTypeVariables #-} module HW07.Editor where import System.IO import HW07.Buffer import Control.Exception import Control.Monad.State import Control.Applicative import Control.Arrow (first, second) import Data.Char import Data.List -- Editor command...
martinvlk/cis194-homeworks
src/HW07/Editor.hs
gpl-3.0
3,809
0
14
1,194
1,422
713
709
105
2
module Main where import NBTrain (tsvToStats, tsvToModel) import NB (testUtterance, NBModel, trainUtterance) import System.IO (hSetBuffering, stdout, BufferMode (NoBuffering), isEOF) import Data.Char (toLower) endToEnd :: IO (Int, Int, Float) endToEnd = tsvToStats "../data/train.tsv" "../data/test.tsv" main :: IO () ...
dimidd/senths
src/Main.hs
gpl-3.0
2,215
0
16
905
546
263
283
60
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeInstances.hs
mpl-2.0
15,365
0
11
2,750
1,091
741
350
87
1
{-# LANGUAGE OverloadedStrings #-} module PreludeSpec(spec) where import PPrelude import Testing import qualified Data.ByteString as BS import Test.Hspec import Test.QuickCheck spec :: Spec spec = do describe "decodeInt" $ do it "should decode what it encodes (ints)" $...
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/blockchain/ben-kirwin-merkle/test/PreludeSpec.hs
unlicense
789
0
19
210
232
121
111
19
1
module Foundation where import Import.NoFoundation import Text.Hamlet (hamletFile) import Text.Jasmine (minifym) import Yesod.Core.Types (Logger) import Yesod.Default.Util (addStaticContentExternal) import qualified Yesod.Core.Unsafe as Unsafe import qualified Data.Ca...
philipmw/yesod-website
Foundation.hs
unlicense
5,872
0
14
1,280
591
332
259
-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="id-ID"> <title>DOM XSS Active Scan Rule | ZAP Extension</title> <maps> <homeID>top</homeID>...
0xkasun/security-tools
src/org/zaproxy/zap/extension/domxss/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
986
80
66
163
421
213
208
-1
-1
module ToHoTTSQLTest where import ToHoTTSQL import CosetteParser import qualified Test.HUnit as H xs :: HSSchema xs = MakeSchema "xs" [("a", "int"), ("k", "int")] ys :: HSSchema ys = MakeSchema "ys" [("k", "int")] env :: HSEnv env = MakeHSEnv [("x", "xs"), ("y", "ys")] [xs, ys] q2hst :: Either String HSQueryExpr...
uwdb/Cosette
dsl/ToHoTTSQLTest.hs
bsd-2-clause
941
0
13
154
312
173
139
21
2
--- --- ktemkin's xmonad.hs --- (Three monitors; dzen/conky based status bar; --- import Data.Monoid import Control.Monad --XMonad Core --(This exposes the window manager itself.) import XMonad import XMonad.Core --XMonad Hooks --(These allow the addition of user functionality to WM functions.) import XMonad.Hooks....
ktemkin/dotfiles
xmonad/xmonad.hs
bsd-2-clause
22,175
0
14
6,770
2,578
1,549
1,029
229
8
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} module Roguelike.Game ( initGameLoop , gameLoop -- re-export from Model , GameState , RoundResult (..) ) where import Control.Ef...
tr00per/roguelike0
src/Roguelike/Game.hs
bsd-2-clause
1,620
0
15
424
401
211
190
42
4
-- | -- Module: $HEADER$ -- Description: Class for constructing characters from ASCI values. -- Copyright: (c) 2013 Peter Trsko -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: stable -- Portability: portable -- -- Class for constructing characters from ASCI values. This allow...
trskop/hpwgen
src/Text/Pwgen/FromAscii/Class.hs
bsd-3-clause
1,109
0
8
220
138
87
51
14
0
module Data.SSTable.Reader ( openReader , closeReader , withReader , scan , leastUpperBound ) where import qualified Data.ByteString as B import System.IO (openFile, hSeek, hClose, Handle, SeekMode(..), IOMode(..)) import System.IO.Unsafe (unsafeInterleaveIO) import Control.Monad (when, liftM) import Data....
mariusae/sstable
src/Data/SSTable/Reader.hs
bsd-3-clause
4,864
0
15
1,435
1,305
670
635
96
3
module App.Layouts.Default where import Config.Master import Turbinado.Layout import Turbinado.View import Turbinado.View.Helpers import Control.Monad.Trans import Data.List import qualified Network.HTTP as HTTP import Network.URI as URI markup = <html> <head> <meta http-equiv="content-type" con...
abuiles/turbinado-blog
tmp/compiled/App/Layouts/Default.hs
bsd-3-clause
2,503
147
82
811
838
421
417
-1
-1
import Common.Numbers.Primes (primes') main = print (primes' !! 10000)
foreverbell/project-euler-solutions
src/7.hs
bsd-3-clause
72
0
7
10
27
15
12
2
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module DecisionTests where import Control.Applicative import Control.Lens import Control.Monad.Catch.Pure import Control.Monad.Reader import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B import qua...
webcrank/webcrank.hs
test/DecisionTests.hs
bsd-3-clause
26,589
0
21
6,236
7,772
3,944
3,828
-1
-1
import System.IO (BufferMode(..), hSetBuffering, stdout, stderr) -- Tests import Test.Game.Ur as Game.Ur main :: IO () main = do hSetBuffering stdout LineBuffering hSetBuffering stderr LineBuffering _results <- sequence [ Game.Ur.tests ] pure ()
taksuyu/game-of-ur
tests/Test.hs
bsd-3-clause
266
0
10
53
90
48
42
9
1
{-| Module providing the scotty backend for the digestive-functors library >{-# LANGUAGE OverloadedStrings #-} > >import Web.Scotty > >import Text.Digestive >import Text.Digestive.Scotty > >import Control.Applicative ((<$>), (<*>)) > >data FormData = FormData { field1 :: String > , field2 :: In...
mmartin/digestive-functors-scotty
src/Text/Digestive/Scotty.hs
bsd-3-clause
2,492
0
12
649
424
235
189
28
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} module DataKinds where data Access = Public | Private deriving (Show, Eq) data Object (n::Access) = Object Int deriving (Show, Eq) instance Num (Object n) where Object x + Object y = Object $ x + y
notae/haskell-exercise
type/DataKinds.hs
bsd-3-clause
286
0
7
55
94
52
42
8
0
-- 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 NoRe...
rfranek/duckling
exe/Duckling/Ranking/Generate.hs
bsd-3-clause
7,535
0
15
1,737
1,769
991
778
152
27
module Main where import JavaScript main = print "Hello"
ku-fpg/wakarusa
wakarusa-examples/sunroof-lite/Main.hs
bsd-3-clause
59
0
5
11
15
9
6
3
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE MagicHash #-} module Blip.Interpreter.HashTable.CacheLine ( cacheLineSearch , cacheLineSearch2 , cacheLineSearch3 , forwardSearch2 , forwardSearch3 , isC...
bjpop/blip
blipinterpreter/src/Blip/Interpreter/HashTable/CacheLine.hs
bsd-3-clause
35,326
0
18
11,689
12,289
5,771
6,518
528
5
module Filesystem.Find where import Filesystem.Utils import Utils import Control.Monad (foldM) import System.Directory (getDirectoryContents,doesDirectoryExist) import System.FilePath ((</>)) findFiles :: FilePath -> (FilePath -> Bool) -> IO [FilePath] findFiles base pred = loop base where loop path = do (m...
elliottt/din
src/Filesystem/Find.hs
bsd-3-clause
812
0
17
223
307
159
148
21
3
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, FlexibleContexts, FlexibleInstances, LiberalTypeSynonyms #-} -- | Facilities for defining new object types which can be marshalled between -- Haskell and QML. module Graphics.QML.Objects ( -- * Object References ObjRef, newObject, newObjectD...
marcinmrotek/hsqml-fork
src/Graphics/QML/Objects.hs
bsd-3-clause
17,688
3
23
4,016
4,929
2,560
2,369
-1
-1
{-# LANGUAGE OverloadedStrings, FlexibleContexts, PackageImports #-} module ManyChanPipe ( fromChan, fromChans, toChan, ) where import Control.Applicative -- import Control.Monad import "monads-tf" Control.Monad.Trans import Control.Monad.Base import Control.Monad.Trans.Control import Data.Pipe -- import Data.Pipe....
YoshikuniJujo/xmpipe
test/ManyChanPipe.hs
bsd-3-clause
1,520
6
13
297
417
215
202
25
2
{-# language CPP #-} -- | = Name -- -- VK_KHR_dynamic_rendering - device extension -- -- == VK_KHR_dynamic_rendering -- -- [__Name String__] -- @VK_KHR_dynamic_rendering@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 45 -- -- [__Revision__] -- 1 -- -- [__Exten...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_dynamic_rendering.hs
bsd-3-clause
42,110
0
18
6,097
4,100
2,549
1,551
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexib...
UCSD-PL/RefScript
src/Language/Rsc/Pretty/Module.hs
bsd-3-clause
1,224
0
19
347
229
127
102
28
0
module Ivory.OS.FreeRTOS ( kernel , wrapper , objects , Config(..) , defaultConfig ) where import System.FilePath import qualified Paths_ivory_freertos_bindings as P import Ivory.Artifact import Ivory.OS.FreeRTOS.Config kernel :: Config -> [Located Artifact] kernel conf = configHeader conf : kas where ...
GaloisInc/ivory-tower-stm32
ivory-freertos-bindings/src/Ivory/OS/FreeRTOS.hs
bsd-3-clause
2,289
0
10
366
425
249
176
67
3
{-# LANGUAGE ImplicitParams, FlexibleContexts #-} module Frontend.TVarOps(varMapExpr, varType) where import Control.Monad.Error import TSLUtil import Pos import Name import Frontend.Spec import Frontend.NS import Frontend.TVar import Frontend.Type import Frontend.TypeOps import Frontend.Expr import {-# SOURCE #-} Fr...
termite2/tsl
Frontend/TVarOps.hs
bsd-3-clause
613
0
10
93
216
121
95
17
1
{-# LANGUAGE TypeSynonymInstances #-} -- | This module contains a number of utility functions useful for converting -- Lava circuits to the Netlist AST. module Language.KansasLava.Netlist.Utils ( ToTypedExpr(..), ToStdLogicExpr(..), toStdLogicTy, AddNext(..), toIntegerExpr, sizedRange, sigName, isHi...
andygill/kansas-lava
Language/KansasLava/Netlist/Utils.hs
bsd-3-clause
14,626
96
17
3,700
3,707
1,923
1,784
226
6
module RecompileRelaunchTest where import qualified Config.Dyre as Dyre import Config.Dyre.Relaunch import System.IO realMain message = do state <- restoreTextState False putStr message >> hFlush stdout if state then putStrLn "" else relaunchWithTextState True Nothing recompileRelaunchTest =...
bitemyapp/dyre
Tests/recompile-relaunch/RecompileRelaunchTest.hs
bsd-3-clause
521
0
9
115
130
71
59
14
2
{-# LANGUAGE RecordWildCards #-} module Lang.Lexer ( BracketSide(..) , _BracketSideOpening , _BracketSideClosing , UnknownChar(..) , FilePath'(..) , Token(..) , _TokenSquareBracket , _TokenParenthesis , _TokenString , _TokenAddress , _TokenPu...
input-output-hk/pos-haskell-prototype
auxx/src/Lang/Lexer.hs
mit
9,796
0
15
2,504
2,719
1,430
1,289
-1
-1
{-# LANGUAGE OverloadedStrings #-} module RarecoalLib.ModelTemplate.Test (tests) where import RarecoalLib.ModelTemplate (ModelTemplate(..), MTEvent(..), MTConstraint(..), ParamSpec(..), ConstraintOperator(..), getModelTemplate, ModelOptions(..)) import Test.Tasty import Test.Tasty.HUnit (testCase, Assertion, asse...
stschiff/rarecoal
src/RarecoalLib/ModelTemplate/Test.hs
gpl-3.0
2,533
0
10
467
495
273
222
30
1
-- Copyright (C) 2017 Red Hat, Inc. -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This library i...
atodorov/bdcs
src/BDCS/Label/InfoPage.hs
lgpl-2.1
1,327
0
11
263
189
117
72
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} -- -- Reg.hs --- I/O register access from Ivory. -- -- Copyright (C) 2013, Galois, Inc. -- All Rights Reserved. -- module Ivory.HW.Reg where import Ivory.Language import Ivory.HW.Prim -- | An I/O register containing a value of type "t". Define registers -- using the "mkReg" func...
GaloisInc/ivory
ivory-hw/src/Ivory/HW/Reg.hs
bsd-3-clause
975
0
9
185
185
100
85
11
1
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Concurrent -- Copyright : (c) The University of Glasgow 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@haskell.org -...
alekar/hugs
packages/base/Foreign/Concurrent.hs
bsd-3-clause
2,123
10
9
328
168
108
60
5
0
----------------------------------------------------------------------------- -- -- Machine-dependent assembly language -- -- (c) The University of Glasgow 1993-2004 -- ----------------------------------------------------------------------------- {-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a...
mcmaniac/ghc
compiler/nativeGen/PPC/Instr.hs
bsd-3-clause
15,650
340
13
4,402
4,905
2,566
2,339
306
49
module Handler.Comments where import Import import Model.Comment import Model.Subscription import Model.UserComment import Notification import Helper.Request import Helper.Validation import Text.Markdown import qualified Data.Text.Lazy as TL data CommentRequest = CommentRequest { reqArticle :: Text , reqA...
thoughtbot/carnival
Handler/Comments.hs
mit
2,189
1
18
535
584
296
288
60
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-iam/gen/Network/AWS/IAM/AddClientIDToOpenIDConnectProvider.hs
mpl-2.0
4,615
0
9
892
399
246
153
55
1
{- (c) The University of Glasgow, 2006 \section[HscTypes]{Types for the per-module compiler} -} {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} -- | Types for the per-module compiler module HscTypes ( -- * compilation state HscEnv(..), hscEPS, FinderCache, FindResult(..), FoundH...
fmthoma/ghc
compiler/main/HscTypes.hs
bsd-3-clause
119,691
1
21
36,084
15,268
8,516
6,752
1,414
6
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Debug -- Copyright : (c) Hamish Mackenzie, Juergen Nicklisch-Franken -- License : GNU-GPL -- -- Maintainer : <maintainer at leksah.org> -- Stability ...
573/leksah
src/IDE/Debug.hs
gpl-2.0
15,140
35
34
3,574
3,681
1,814
1,867
-1
-1
{- Copyright (C) 2001, 2004 Ian Lynagh <igloo@earth.li> Modified by Einar Karttunen to remove dependency on packed strings and autoconf. Modified by John Meacham for code cleanups. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
hvr/jhc
src/Util/SHA1.hs
mit
11,613
11
30
3,855
5,255
2,642
2,613
-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="hi-IN"> <title>OpenAPI Support Add-on</title> <maps> <homeID>openapi</homeID> <mapref l...
thc202/zap-extensions
addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_hi_IN/helpset_hi_IN.hs
apache-2.0
971
77
67
157
413
209
204
-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="tr-TR"> <title>Custom Payloads Add-on</title> <maps> <homeID>custompayloads</homeID> <m...
kingthorin/zap-extensions
addOns/custompayloads/src/main/javahelp/org/zaproxy/zap/extension/custompayloads/resources/help_tr_TR/helpset_tr_TR.hs
apache-2.0
978
77
67
157
413
209
204
-1
-1
{-| Module : Idris.REPL.Parser Description : Parser for the REPL commands. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE FlexibleContexts #-} module Idris.REPL.Parser ( parseCmd , help , allHelp , setOptions ) where import Idris.AbsSyntax import Idris.Colours import Idris.Core....
kojiromike/Idris-dev
src/Idris/REPL/Parser.hs
bsd-3-clause
21,587
0
21
5,580
6,751
3,496
3,255
444
3
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module WorkerSample where import Control.Distributed.Process import Control.Distributed.Process.Serializable import Control.Distributed.Process.Closure import Control.Monad.IO.Class import Control.Monad...
prt2121/haskell-practice
parconc/distrib-db/WorkerSample.hs
apache-2.0
1,108
0
17
228
338
185
153
39
2
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Ratio -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : stab...
lukexi/ghc
libraries/base/Data/Ratio.hs
bsd-3-clause
3,036
0
11
1,224
424
233
191
32
1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import JSImages import LI11718 import qualified Tarefa3_${group} as T3 import System.Environment import Data.Maybe import Data.List as List import qualified Data.Text as Text import Text.Read import Control.Monad import Control.Exception import GHC.Float imp...
hpacheco/HAAP
examples/plab/oracle/CollisionSimulator.hs
mit
22,262
18
15
5,734
8,929
4,898
4,031
-1
-1
-- xmonad config used by Vic Fryzel -- Author: Vic Fryzel -- http://github.com/vicfryzel/xmonad-config import System.IO import System.Exit import Data.List(isPrefixOf) import XMonad import XMonad.Actions.PhysicalScreens import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.InsertPosition ...
justinhoward/dotfiles
modules/xmonad/installed-config/xmonad.hs
mit
12,090
139
21
2,251
2,394
1,416
978
180
1
module Text.Docvim.Compile (compile) where import Text.Docvim.AST import Text.Docvim.Optimize import Text.Docvim.Visitor import Text.Docvim.Visitor.Command import Text.Docvim.Visitor.Commands import Text.Docvim.Visitor.Footer import Text.Docvim.Visitor.Function import Text.Docvim.Visitor.Functions import Text.Docvim.V...
wincent/docvim
lib/Text/Docvim/Compile.hs
mit
1,720
0
12
518
398
230
168
40
1
module Job.Tracking ( sendGoogleAnalyticsTracking ) where import Import import qualified Data.ByteString.Lazy.Char8 as C import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.UUID as UU import qualified Data.UUID.V1 ...
Tehnix/campaigns
Job/Tracking.hs
mit
2,759
0
19
544
767
377
390
52
3
import Data.List import Data.Char incletter c i = chr (ord c + i) letter = incletter 'a' doubles = [ [c, c] | i <- [0..25], let c = letter i ] runs = [ [letter i, letter (i+1), letter (i+2)] | i <- [0..23] ] noneof = ["i", "o", "l"] increv ('z' : xs) = 'a' : increv xs increv (c : xs) = incletter c 1 : xs inc = reve...
msullivan/advent-of-code
2015/A11a.hs
mit
707
0
11
165
326
176
150
16
1
module FP15.Parsing where import FP15.Parsing.Types() import FP15.Parsing.Lexer()
Ming-Tang/FP15
src/FP15/Parsing.hs
mit
83
0
4
8
24
16
8
3
0
{- shooter.hs - This game has simple character movement with the arrow keys, - as well as shooting simple missiles with the SpaceBar. -} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BlockArguments #-} {-# LANGUAGE Flex...
asivitz/Hickory
Example/Shooter/shooter.hs
mit
6,765
0
20
1,397
1,809
974
835
-1
-1
{- Copyright (c) 2015 Nils 'bash0r' Jonsson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
project-horizon/framework
src/lib/Language/Transformation/Semantics/SemanticResult.hs
mit
2,284
0
9
482
342
178
164
28
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLMenuElement (js_setCompact, setCompact, js_getCompact, getCompact, HTMLMenuElement, castToHTMLMenuElement, gTypeHTMLMenuElement) where import Prelude ((.), (==), (>>=), return, IO, Int, F...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLMenuElement.hs
mit
1,723
14
8
205
438
271
167
26
1
import Data.Char {------------------------------------------------------------------------------------------------- 1. Nos exercícios a seguir, escreva primeiramente uma função recursiva. Em seguida, reescreva essa função utilizando função de ordem superior. Você pode usar as funções nativas map, filter e foldr. ...
hugonasciutti/Exercises
Haskell/Exercises/pratica8.hs
mit
3,679
0
10
669
788
418
370
45
1
{- | module: $Header$ description: Higher order logic type variables license: MIT maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module HOL.TypeVar where import qualified Data.Foldable as Foldable import Data.Set (Set) import qualified Data.Set as Set import HOL.Name imp...
gilith/hol
src/HOL/TypeVar.hs
mit
1,878
0
8
289
500
261
239
38
1
{-# LANGUAGE BangPatterns , FlexibleContexts , TypeFamilies , MultiParamTypeClasses , FunctionalDependencies , TypeSynonymInstances , FlexibleInstances #-} module RobotVision.ImageRep.Class ( Expandable (..) , Shrinkable (..) , GreyImage ...
eklinkhammer/haskell-vision
RobotVision/ImageRep/Class.hs
mit
4,637
0
14
1,220
1,219
674
545
118
2
----------------------------------------------------------------------------- -- | -- Module : Postgis.Simple -- Copyright : (c) igor720 -- License : MIT -- -- Maintainer : igor720@gmail.com -- Stability : experimental -- Portability : portable -- -- Reexports "Postgis.Simple.Internal" and "Postgis...
igor720/postgis-simple
src/Postgis/Simple.hs
mit
3,308
0
5
694
126
115
11
5
0
module C.Parser (parseExpr) where import C.Expr import Text.Parsec import Text.Parsec.Expr import Text.Parsec.String (Parser) import Text.Parsec.Language (javaStyle) import qualified Text.Parsec.Token as Token import Control.Monad import Control.Applicative ((<$>), (<*>)) import System.Environment import Numeric --...
unknownloner/calccomp
C/Parser.hs
mit
3,627
0
12
939
1,199
596
603
128
4
module Sudoku.Types (Cell, House, Value, Options, cells, fromInt, diff, isExpandable, isAssigned, isEmpty, expand) where import Data.List ((\\)) type Cell = Int type House = [Cell] -- I use this to map/iterate over a Board without the need to use a for/while loop c...
oforero/sudoku
haskell/src/Sudoku/Types.hs
mit
2,054
0
11
521
665
369
296
43
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} import Control.Monad.Trans.Resource (runResourceT) import Control.Monad.Logger (runStderrLoggingT) import Database.Persist.Sqlite import Network.HTTP.Client.Conduit (newManager) import Test.Hspec (hspec) ...
paul-rouse/yesod-auth-hashdb
test/integration.hs
mit
949
0
15
229
184
100
84
19
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} import Prelude (Num(..), Show(..), Int, Char, String, undefined) -- Some basic types to illustrate constructors data Void data Unit = MkUnit data Bool = False | True deriving Show data Weight = MkWeight Int -- Canonical ADTs data Pair a b = Pair a b ...
spyked/slides
ht-revisited/examples/ref-examples.hs
cc0-1.0
1,833
0
10
461
731
389
342
-1
-1
module Settings where import Prelude import Text.Shakespeare.Text (st) import Language.Haskell.TH.Syntax import Database.Persist.MySQL (MySQLConf) import Yesod.Default.Config import Yesod.Default.Util import Data.Text (Text) import Data.Yaml import Control.Applicative import Settings.Development import Data.Default (d...
marcellussiegburg/autotool
yesod/Settings.hs
gpl-2.0
2,067
0
10
377
293
181
112
-1
-1
{-# LANGUAGE CPP, ScopedTypeVariables #-} {- Copyright (C) 2014 Matthew Pickering <matthewtpickering@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 2 of the License, or (at...
beni55/texmath
src/Text/TeXMath/Shared.hs
gpl-2.0
12,387
0
14
3,273
3,406
1,958
1,448
253
4
{-# LANGUAGE TemplateHaskell #-} module HEphem.NGCParser where import Data.FileEmbed import Data.Maybe import Data.String import HEphem.Data import HEphem.ParserUtil import Text.ParserCombinators.ReadP import Text.Read (readMaybe...
slspeek/hephem
src/HEphem/NGCParser.hs
gpl-3.0
1,358
0
12
369
465
245
220
40
2
module MaxN (MaxN(), empty, toList, insert) where data MaxN a = MaxN { mMaxSize :: Int , mSize :: Int , mFull :: Bool , mElems :: [a] } deriving (Show) empty :: Int -> MaxN a empty maxSize | maxSize < 0 = error "MaxN.empty: maxSize < 0" | otherwise = MaxN maxSize 0 (maxSize ...
ktvoelker/Picker
src/MaxN.hs
gpl-3.0
914
0
14
267
431
229
202
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} module Hive.Server.Types where import Control.Concurrent.STM import Control.Monad.Reader (ask, asks, ReaderT, runReaderT, lift) import Control.Monad.Trans import Control.Monad.Trans.Except import Data.Aeson import Data.Aeson.TH import Data.H...
nathanic/hive-hs
src/Hive/Server/Types.hs
gpl-3.0
4,502
0
12
1,178
1,268
689
579
92
1
module QFeldspar.Expression.Conversions.Evaluation.ADTUntypedNamed () where import QFeldspar.MyPrelude import QFeldspar.Expression.ADTUntypedNamed import qualified QFeldspar.Expression.ADTValue as FAV import QFeldspar.Environment.Map import QFeldspar.Conversion instance (Show x , Eq x) => Cnv (Exp x , (Env x FAV.Exp...
shayan-najd/QFeldspar
QFeldspar/Expression/Conversions/Evaluation/ADTUntypedNamed.hs
gpl-3.0
862
0
20
265
294
167
127
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Vision -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Publi...
rueshyna/gogol
gogol-vision/gen/Network/Google/Vision.hs
mpl-2.0
5,464
0
5
1,444
597
427
170
155
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Liens/Delete.hs
mpl-2.0
4,708
0
15
1,065
703
413
290
99
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/Versions/Load.hs
mpl-2.0
6,224
0
16
1,329
784
459
325
123
1
{-# language TypeFamilies #-} class C a where type family F a instance C Int where type F Int = IO Int -- x
lspitzner/brittany
data/Test216.hs
agpl-3.0
112
0
6
28
37
20
17
5
0
module LSystem.Utils ( (/.), maybeHead, parseInt, toMaybeCond, readToBlankLine, splitNonEmpty, parse, degToRad, round2, filterNonEmpty ) where import Data.List import Data.Function ------------------------------------------------------------------------------------------------...
NightElfik/L-systems-in-Haskell
src/LSystem/Utils.hs
unlicense
1,749
0
13
403
545
302
243
41
2
module Git.Command.CountObjects (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/CountObjects.hs
unlicense
90
0
7
15
42
23
19
3
1
----------------------------------------------------------------------------- -- | -- Module : Types -- author : cdannapp & tmielcza -- -- Types returned by parsing and used for Resolution -- ----------------------------------------------------------------------------- module Types ( Expr(Xor, Or, And, Fac...
tmielcza/demiurge
src/Types.hs
apache-2.0
2,692
0
10
620
945
510
435
60
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} module Handler.Posts where import Import import Yesod.Auth (requireAuthId) import Helpers.Post import Helpers.Shorten getPostsR :: Handler Html getPostsR = do (map entityVal -> posts...
dtekcth/DtekPortalen
src/Handler/Posts.hs
bsd-2-clause
1,661
0
15
368
455
216
239
48
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QNetworkProxy.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine generated - do...
keera-studios/hsQt
Qtc/Enums/Network/QNetworkProxy.hs
bsd-2-clause
2,503
0
18
543
629
323
306
58
1
-- | Global configuration for output -- (This should be deprecated in the future as Recipes evolve) module Language.Drasil.Config(numberedSections,hyperSettings,fontSize,bibFname, verboseDDDescription,StyleGuide(..),bibStyleH,bibStyleT,colAwidth,colBwidth, numberedDDEquations,numberedTMEquations) where -- | TeX fo...
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Config.hs
bsd-2-clause
2,212
0
9
355
263
168
95
37
1
curr f a b = f (a,b) uncurr f (a,b) = f a b
abhinav-mehta/CipherSolver
src/other/Curr.hs
bsd-3-clause
44
0
6
14
43
22
21
2
1
module Abstract.Queue.Enq ( module Abstract.Interfaces.Queue.Enq, mkQueue'Enq ) where import Abstract.Queue import Abstract.Interfaces.Queue import Abstract.Interfaces.Queue.Enq mkQueue'Enq url pack unpack = do c <- mkQueue url pack unpack return $ queueToEnq c
adarqui/Abstract
src/Abstract/Queue/Enq.hs
bsd-3-clause
269
0
8
37
74
42
32
9
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE...
Soostone/snaplet-persistent
src/Snap/Snaplet/Auth/Backends/Persistent/Types.hs
bsd-3-clause
1,174
0
8
301
89
59
30
22
0
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-| Module : Game.GoreAndAsh.Network Description : Module that contains network low-level API for Gore&Ash Copyright : (c) Anton Gushcha, 2015-2016 License : BSD3 Maintainer : ncrashed@gmail.com Stability : experimental Portability : POSIX The core module cont...
Teaspot-Studio/gore-and-ash-network
src/Game/GoreAndAsh/Network.hs
bsd-3-clause
1,663
0
5
289
204
148
56
40
0
{-# OPTIONS -XScopedTypeVariables -XRecordWildCards -XMagicHash -XUnboxedTuples -XBangPatterns #-} module PackToMem where import GHC.IO ( IO(..) ) import GHC.Prim ( ByteArray#, sizeofByteArray#, serialize#, deserialize# ) import GHC.Exts ( Int(..), Word ) import Data.Array.Base ( UArray(..), elems, listArray...
jberthold/rts-serialisation
PackToMemIFL10.hs
bsd-3-clause
7,088
0
20
2,328
1,821
968
853
-1
-1
{-# OPTIONS_GHC -Wall #-} {-| The Abstract Syntax Tree (AST) for expressions comes in a couple formats. The first is the fully general version and is labeled with a prime (Expr'). The others are specialized versions of the AST that represent specific phases of the compilation process. I expect there to be more phases ...
JoeyEremondi/utrecht-apa-p1
src/AST/Expression/General.hs
bsd-3-clause
7,116
0
17
2,116
2,498
1,250
1,248
141
8
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-#...
ryantrinkle/reflex
src/Reflex/Profiled.hs
bsd-3-clause
12,394
0
20
2,157
3,931
2,001
1,930
-1
-1
import System.Environment (getArgs) parent :: Int -> Int parent 3 = 8 parent 8 = 30 parent 10 = 20 parent 20 = 8 parent 29 = 20 parent 52 = 30 parent _ = 0 lca :: Int -> [Int] -> Int lca w xs | x == y = x | w == 0 = lca y [x, y] | y == 0 = lca w [parent x, w] | otherwise =...
nikai3d/ce-challenges
moderate/lca.hs
bsd-3-clause
550
0
14
203
282
138
144
21
1
{-# LANGUAGE OverloadedStrings #-} module Y2018.Day06 (answer1, answer2) where import qualified Data.Text as Tx import qualified Data.Text.IO as Tx.IO import Text.Megaparsec import Text.Megaparsec.Char import Text.Megaparsec.Char.Lexer import qualified Utils.Parser as Utils import qualified Data.Array as Arr impor...
geekingfrog/advent-of-code
src/Y2018/Day06.hs
bsd-3-clause
2,534
0
20
660
1,047
565
482
80
3
import Data.List import Text.Parsec import Text.Parsec.Char import Text.Parsec.Combinator presentFile = do result <- many line eof return result line = do length <- many1 digit char 'x' width <- many1 digit char 'x' height <- many1 digit char '\n...
sorindumitru/adventofcode
day2/Main.hs
bsd-3-clause
1,405
2
13
313
517
263
254
34
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE NoRebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Ti...
facebookincubator/duckling
Duckling/Time/ZH/CN/Rules.hs
bsd-3-clause
674
0
9
129
108
70
38
18
1
-- | Debug.Tasks data-type, to avoid Config dependency on debug code {-# LANGUAGE TemplateHaskell, DerivingVia #-} module Lamdu.Debug.Tasks ( Tasks(..), inference, sugaring, layout, database, naming ) where import qualified Control.Lens as Lens import qualified Data.Aeson.TH.Extended as JsonTH import ...
lamdu/lamdu
src/Lamdu/Debug/Tasks.hs
gpl-3.0
649
0
8
133
161
97
64
-1
-1