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 DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/ServiceLevelObjectives/List.hs | mpl-2.0 | 7,816 | 0 | 20 | 1,746 | 1,053 | 610 | 443 | 155 | 1 |
module Problem10 where
main =
print $ encode "aaaabccaadeeee"
encode [] = []
encode (a:as) = encode' as 1 a
where encode' [] n c = [(n, c)]
encode' (a:as) n c
| a == c = encode' as (n + 1) c
| otherwise = (n, c) : encode' as 1 a
| vasily-kartashov/playground | 99-problems/problem-10.hs | apache-2.0 | 267 | 0 | 10 | 91 | 144 | 74 | 70 | 9 | 2 |
--
-- Copyright (c) 2013, Carl Joachim Svenn
-- 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... | karamellpelle/MEnv | source/GUI/Widget/LayoutWidget/StaticLayout.hs | bsd-2-clause | 23,504 | 0 | 15 | 5,657 | 5,474 | 2,770 | 2,704 | 455 | 3 |
-- http://www.codewars.com/kata/5259acb16021e9d8a60010af
module LeastCommonMultiple where
import Prelude hiding (lcm)
import Data.List
lcm :: Integral a => [a] -> a
lcm xs = if any (==0) xs then 0 else foldl1' (\x -> \y -> x*y`div`gcd x y) xs | Bodigrim/katas | src/haskell/5-Least-Common-Multiple.hs | bsd-2-clause | 244 | 0 | 11 | 39 | 96 | 55 | 41 | 5 | 2 |
{-# LANGUAGE OverloadedStrings,
RecordWildCards #-}
module YQL.Y
( decompress
, deflate
, inflate
, rest ) where
import qualified Codec.Compression.GZip as GZip
import qualified Codec.Compression.Zlib as Zlib
import Control.Lens
import Data.ByteString.Lazy
import qualified D... | fabianbergmark/YQL | src/YQL/Y.hs | bsd-2-clause | 1,057 | 0 | 10 | 210 | 296 | 165 | 131 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
-- | A Shakespearean module for Roy, introducing type-safe,
-- compile-time variable and url interpolation. It is exactly the same as
-- "Text... | piyush-kurur/shakespeare | shakespeare-js/Text/Roy.hs | bsd-2-clause | 2,783 | 1 | 15 | 526 | 288 | 176 | 112 | 35 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Hoodle.Parse.Zlib
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
-- Portability : GHC
--
----------------------... | wavewave/hoodle-parser | src/Text/Hoodle/Parse/Zlib.hs | bsd-2-clause | 728 | 0 | 14 | 136 | 119 | 70 | 49 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent (ThreadId, forkIO)
import Control.Concurrent.STM (STM, TChan, TVar, atomically,
modifyTVar, newTChan, newTVarIO,
readTChan, readTVar, rea... | KirillTim/raft-haskell | app/Node.hs | bsd-3-clause | 6,577 | 0 | 27 | 2,381 | 1,697 | 837 | 860 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
module Storage.Db where
import Control... | showpoint/refs | src/Storage/Db.hs | bsd-3-clause | 1,062 | 0 | 10 | 189 | 314 | 173 | 141 | 28 | 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.
module Duckling.Duration.NB.Tests
( tests
) where
import Prelude
import Data.String
import Test.Tasty
impor... | facebookincubator/duckling | tests/Duckling/Duration/NB/Tests.hs | bsd-3-clause | 509 | 0 | 9 | 80 | 79 | 50 | 29 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Handler.UserMainPage where
import Import
import Data.Text as T
internalConcatText :: Text -> Text -> Text
internalConcatText a b = T.concat [a, "/", b]
getUserMainPageR :: Text -> Handler Html
getUserMainPageR login = do
extra <- getExtra
let projDir = extraProjectsD... | NicolasDP/hitweb | Handler/UserMainPage.hs | bsd-3-clause | 647 | 0 | 13 | 132 | 176 | 88 | 88 | 17 | 1 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, PatternGuards #-}
----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.BorderResize
-- Copyright : (c) Jan Vornberger 2009
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : jan.vornber... | csstaub/xmonad-contrib | XMonad/Layout/BorderResize.hs | bsd-3-clause | 10,008 | 2 | 22 | 2,795 | 2,704 | 1,422 | 1,282 | 156 | 4 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module OnPing.DataServer.Language.Docs (
SyntaxDoc (..)
, allCommands
, commandName
, commandDoc
) where
import OnPing.DataServer.Language
-- TH
import qualified Language.Haskell.TH as TH
import OnPing.DataServer.Language.TH
-- base
import Data.Char (to... | plow-technologies/onping-data-language | OnPing/DataServer/Language/Docs.hs | bsd-3-clause | 2,921 | 0 | 26 | 689 | 948 | 490 | 458 | 66 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
{-# OPTIONS_GHC -Wall -fno-warn-missing-signatures #-}
module GoodData.REST.MD.Query where
import GoodData.Session
import GoodData.REST.Types.MD.Query
query ∷ String → String → GoodDataAction Query
query project typ = fmap responseBody $ jsonGetCall $... | liskin/gooddata-haskell | GoodData/REST/MD/Query.hs | bsd-3-clause | 369 | 0 | 10 | 47 | 73 | 42 | 31 | 8 | 1 |
module Types (
Show1 (..)
, MusicSource (..)
, PlayMode (..)
, isLocal
, requireLogin
, defaultPlayMode
, runCache, runSession, runPlayer
, Cache
, IsSession, SomeSession (..)
, Player, PlayerState (..), isStopped
) where
import FM.FM
class Show1 a where
show1 :: a -> String
data MusicSource = NetEaseFM
... | foreverbell/fm-client | exe/Types.hs | bsd-3-clause | 1,302 | 0 | 8 | 267 | 334 | 188 | 146 | 42 | 1 |
{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
module Foreign.JavaScript.Server (
httpComm
) where
-- import general libraries
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM as STM
import qualified Control.Exception as E
i... | duplode/threepenny-gui | src/Foreign/JavaScript/Server.hs | bsd-3-clause | 5,070 | 0 | 21 | 1,408 | 1,126 | 588 | 538 | -1 | -1 |
import System.Random
main = do
gen <- getStdGen
putStrLn $ take 20 (randomRs ('a','z') gen)
gen' <- newStdGen
putStr $ take 20 (randomRs ('a','z') gen') | randallalexander/LYAH | src/Ch9/random_string.hs | bsd-3-clause | 169 | 0 | 11 | 41 | 77 | 38 | 39 | 6 | 1 |
{-
Copyright (c) 2014, Simon Norberg
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... | Norberg/moves | tools/CreateAccessToken.hs | bsd-3-clause | 1,575 | 0 | 4 | 286 | 12 | 7 | 5 | 2 | 1 |
module Data.Graph.AStar (aStar,aStarM) where
import qualified Data.HashSet as Set
import Data.HashSet (HashSet)
import Data.Hashable (Hashable(..))
import qualified Data.HashMap.Strict as Map
import Data.HashMap.Strict (HashMap, (!))
import qualified Data.OrdPSQ as PSQ
import Data.OrdPSQ (OrdPSQ, minView)
import Data.... | weissi/astar | src/Data/Graph/AStar.hs | bsd-3-clause | 7,319 | 0 | 22 | 3,022 | 2,139 | 1,143 | 996 | 131 | 5 |
{-# OPTIONS_HADDOCK show-extensions #-}
{-|
Module : Crypto.Enigma.Display
Description : Display of Enigma machine state and encoding
Copyright : (c) 2014-2021 Roy Levien
License : BSD3
Maintainer : royl@aldaron.com
Stability : provisional
Portability : POSIX
A module for rich display of the state of and... | orome/crypto-enigma-hs | Crypto/Enigma/Display.hs | bsd-3-clause | 27,599 | 1 | 22 | 7,647 | 2,263 | 1,229 | 1,034 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Provers.MathSAT
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- The connection to the MathSAT SMT solver
-----------------------... | TomMD/cryptol | sbv/Data/SBV/Provers/MathSAT.hs | bsd-3-clause | 5,301 | 0 | 20 | 2,021 | 1,040 | 578 | 462 | 62 | 11 |
module Bustle.Data.Post where
import Control.Concurrent.Async
import Control.Exception
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import qualified Data.Aeson as JSON
import qualified Data.ByteString as B
import Data.... | jqyu/bustle-chi | src/Bustle/Data/Post.hs | bsd-3-clause | 9,056 | 0 | 17 | 2,607 | 2,709 | 1,385 | 1,324 | -1 | -1 |
module Lib where
import Addition
import Chipher
import HttpStuff
import Ini
import Morse
import Parsers
import Playground
import SemigroupsAndMonoids
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| vasily-kirichenko/haskell-book | src/Lib.hs | bsd-3-clause | 281 | 0 | 6 | 109 | 46 | 28 | 18 | 11 | 1 |
-- Copyright © 2015 Bart Massey
-- [This program is licensed under the "3-clause ('new') BSD License"]
-- Please see the file COPYING in the source
-- distribution of this software for license terms.
-- Simulation of nontransitive dice
import Control.Monad.Random
import System.Environment (getArgs)
import Text.Printf... | BartMassey/nontransitive-dice | dice.hs | bsd-3-clause | 2,482 | 0 | 19 | 642 | 571 | 296 | 275 | 39 | 4 |
{-# LANGUAGE JavaScriptFFI #-}
-- | Saving/loading to JS storeage, mimicking operations on files.
module Game.LambdaHack.Common.JSFile
(
#ifdef USE_JSFILE
-- to molify doctest, but don't break stylish-haskell parsing
encodeEOF, strictDecodeEOF
, tryCreateDir, doesFileExist, tryWriteFile, readFile, renameFile
#e... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/JSFile.hs | bsd-3-clause | 4,076 | 10 | 15 | 823 | 969 | 494 | 475 | 3 | 0 |
module Abstract.Queue.Deq (
module Abstract.Interfaces.Queue.Deq,
mkQueue'Deq
) where
import Abstract.Queue
import Abstract.Interfaces.Queue
import Abstract.Interfaces.Queue.Deq
mkQueue'Deq url pack unpack = do
c <- mkQueue url pack unpack
return $ queueToDeq c
| adarqui/Abstract | src/Abstract/Queue/Deq.hs | bsd-3-clause | 269 | 0 | 8 | 37 | 74 | 42 | 32 | 9 | 1 |
module Main where
import qualified Data.Geohash as Gh
import Criterion.Main
import Text.Printf
import Data.Array
hashes = array (0, 2) [(0, "9q8yyk9pqd"), (1, "9q8yyk9p"), (2, "9q8yyk")]
-- geohash encoder helper
ghe precision howmany n =
map (Gh.encode (precision+n-n)) latlons
where
latlons = zip (range (-... | mariusae/geohash | benchmark.hs | bsd-3-clause | 837 | 0 | 17 | 205 | 412 | 229 | 183 | 18 | 1 |
module Obsidian.MonadObsidian
(module Obsidian.MonadObsidian.Exp,
module Obsidian.MonadObsidian.PureAPI,
module Obsidian.MonadObsidian.API,
module Obsidian.MonadObsidian.IC,
module Obsidian.MonadObsidian.Printing,
module Obsidian.MonadObsidian.GenCuda,
module Obsi... | svenssonjoel/MonadObsidian | Obsidian/MonadObsidian.hs | bsd-3-clause | 884 | 0 | 5 | 131 | 139 | 96 | 43 | 21 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
-- | The core Futhark AST is parameterised by a @rep@ type parameter,
-- which is then used to invoke the type families defined here.
module Futhark.IR.Rep
( RepTypes (..),
module Futhark.IR.RetType,
)
where
import qualified Data.Kind
import Futh... | HIPERFIT/futhark | src/Futhark/IR/Rep.hs | isc | 2,161 | 0 | 8 | 513 | 595 | 335 | 260 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import BasicPrelude
import qualified Control.Arrow as Arrow(right)
import Filesystem.CanonicalPath
import Filesystem.CanonicalPath.Directory
import Te... | bitemyapp/CanonicalPath | tests/CanonicalPathTests.hs | mit | 3,022 | 0 | 11 | 641 | 912 | 433 | 479 | 82 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[SimplCore]{Driver for simplifying @Core@ programs}
-}
{-# LANGUAGE CPP #-}
module SimplCore ( core2core, simplifyExpr ) where
#include "HsVersions.h"
import DynFlags
import CoreSyn
import HscTypes
import CSE ( cseProgram )
import Ru... | mcschroeder/ghc | compiler/simplCore/SimplCore.hs | bsd-3-clause | 40,508 | 2 | 22 | 13,699 | 5,377 | 2,890 | 2,487 | 443 | 7 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeOperators #-} -- For ':*:' instance and others.
-- These warnings can be inaccurate, because of conditional compilation.
#if MIN_VERSION_GLASGOW_HASKELL(8,0,0,0)
{-# OPTIONS_GH... | jbracker/supermonad-plugin | src/Control/Super/Monad/MonadPlus.hs | bsd-3-clause | 7,268 | 0 | 10 | 1,190 | 1,818 | 995 | 823 | 55 | 0 |
{-
Copyright (C) 2008-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 ... | sol/pandoc | src/Text/Pandoc/Writers/ODT.hs | gpl-2.0 | 4,980 | 0 | 22 | 1,326 | 1,010 | 527 | 483 | 80 | 5 |
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Safe #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.IntSet
-- Copyright : (c) Daan Leijen 2002
-- (c) Joachim Breitner 2011
-- License : BSD-... | jwiegley/ghc-release | libraries/containers/Data/IntSet.hs | gpl-3.0 | 4,130 | 0 | 5 | 1,457 | 258 | 198 | 60 | 52 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module Control.Search.Combinator.And (andN,(<&>)) where
import Data.Maybe (fromMaybe, catMaybes, fromJust)
import Control.Search.Language
import Control.Search.GeneratorInfo
import Control.Search.Memo
import Control.Search.MemoReader
import Control.Search.Generator
import Control.S... | neothemachine/monadiccp | src/Control/Search/Combinator/And.hs | bsd-3-clause | 9,898 | 38 | 35 | 4,646 | 3,141 | 1,648 | 1,493 | 119 | 9 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators, KindSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-... | mb21/qua-kit | services/examples-hs/src/Lib/ExtraTypes.hs | mit | 5,242 | 0 | 12 | 1,293 | 2,146 | 1,092 | 1,054 | 127 | 1 |
import Control.Concurrent.MVar (readMVar)
import System.Environment (getArgs)
import System.Exit (ExitCode (ExitFailure), exitFailure)
import System.IO (hClose, hGetLine, hPutStrLn)
import System.Posix.Process (exitImmediately, getProcessID)
import System.Posix.Signals (Handle... | sdiehl/ghc | testsuite/tests/runghc/T-signals-child.hs | bsd-3-clause | 4,204 | 0 | 13 | 1,347 | 683 | 369 | 314 | 67 | 3 |
<?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="da-DK">
<title>Import/Export</title>
<maps>
<homeID>exim</homeID>
<mapref location="map... | thc202/zap-extensions | addOns/exim/src/main/javahelp/help_da_DK/helpset_da_DK.hs | apache-2.0 | 959 | 77 | 67 | 155 | 408 | 207 | 201 | -1 | -1 |
{-# LANGUAGE CPP #-}
-- | Yo dawg we heard you like Haste, so we let yo Haste programs compile yo
-- Haste programs!
--
-- Currently, this API calls the hastec binary. In the future it should
-- probably be the other way around.
module Haste.Compiler (
module Haste.Compiler.Flags,
CompileResult (..), Hast... | beni55/haste-compiler | libraries/haste-lib/src/Haste/Compiler.hs | bsd-3-clause | 2,989 | 0 | 8 | 784 | 169 | 106 | 63 | 62 | 9 |
module PatternIn1 where
f x = let g = 42
in case g of
42 -> 9
_ -> x
f_1 x
= let g = 42
in case g of
42 -> return 0
_ -> return 1
| kmate/HaRe | old/testing/simplifyExpr/PatternIn1AST.hs | bsd-3-clause | 217 | 0 | 10 | 126 | 80 | 39 | 41 | 10 | 2 |
module C2 where
import D2 hiding (anotherFun)
anotherFun ((x : xs)) = (sq x) + (anotherFun xs)
anotherFun [] = 0
| kmate/HaRe | old/testing/duplication/C2_AstOut.hs | bsd-3-clause | 114 | 0 | 8 | 22 | 57 | 32 | 25 | 4 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module T12069 where
foo (_ :: p a) = [] :: [a]
| ezyang/ghc | testsuite/tests/typecheck/should_compile/T12069.hs | bsd-3-clause | 85 | 0 | 8 | 17 | 31 | 18 | 13 | 3 | 1 |
-- !!! check that unqualified imports don't bring qualified names into scope
module ShouldFail ( Data.List.map ) where
import Data.List ()
| wxwxwwxxx/ghc | testsuite/tests/rename/should_fail/rnfail030.hs | bsd-3-clause | 139 | 0 | 5 | 21 | 21 | 14 | 7 | 2 | 0 |
{-# LANGUAGE UnboxedTuples #-}
module Main where
-- Tests unboxed tuple slow calls
{-# NOINLINE g #-}
g :: Int -> (# Int, Int #) -> Int -> (# Int, (# Int #) #) -> (# #) -> Int
g a (# b, c #) d (# e, (# f #) #) (# #) = a + b + c + d + e + f
{-# NOINLINE h #-}
h :: (Int -> (# Int, Int #) -> Int -> (# Int, (# Int #) #... | hferreiro/replay | testsuite/tests/typecheck/should_run/tcrun051.hs | bsd-3-clause | 688 | 0 | 12 | 217 | 277 | 155 | 122 | 15 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, UndecidableInstances, TypeSynonymInstances, FlexibleInstances #-}
module FreshName where
import Control.Monad.State
import Control.Monad.Identity
import Data.List((\\))
type Name = String
class Monad m => MonadNameGen m where
fresh :: m Name
newtype NameGenT m a = NameGen... | authchir/mini-ml | src/FreshName.hs | isc | 921 | 0 | 12 | 172 | 356 | 190 | 166 | 24 | 1 |
-- Problems/Problem009Spec.hs
module Problems.Problem009Spec (main, spec) where
import Test.Hspec
import Problems.Problem009
main :: IO()
main = hspec spec
spec :: Spec
spec = describe "Problem 9" $
it "Should evaluate to 31875000" $
p9 `shouldBe` 31875000
| Sgoettschkes/learning | haskell/ProjectEuler/tests/Problems/Problem009Spec.hs | mit | 272 | 0 | 8 | 51 | 73 | 41 | 32 | 9 | 1 |
module Language.Imperia.Compiler.Store
( Address
, Store (..)
, emptyStore
, shiftRegisterOffset
, shiftMemoryOffset
, findAddress
, chooseAddress
, createReference
, updateReference
, destroyReference
, createUniqueReference
)
where
import Data.List
import Data.Maybe
type Address = Int
type R... | thomasbrus/imperia | src/Language/Imperia/Compiler/Store.hs | mit | 2,095 | 0 | 11 | 377 | 601 | 326 | 275 | 53 | 2 |
{-# LANGUAGE InstanceSigs #-}
module Ch10 where
import Control.Applicative
import Data.Char
-- A parser for a value of type a is a function which takes a String
-- represnting the input to be parsed, and succeeds or fails; if it
-- succeeds, it returns the parsed value along with the remainder of
... | isaiah/cis194 | src/Ch10.hs | mit | 3,039 | 0 | 16 | 843 | 773 | 413 | 360 | 53 | 2 |
{-# LANGUAGE OverloadedStrings, TupleSections #-}
{-# LANGUAGE QuasiQuotes #-}
module FacilitiesImport where
import Control.Applicative ((<$>),(<*>))
import Control.Monad (void)
import Control.Concurrent.Async (mapConcurrently)
import Control.Monad.Reader (runReaderT)
import Data.Csv (FromNamedRecord,parseNamedRecord... | bfpg/brisparks.info | import/FacilitiesImport.hs | mit | 2,463 | 0 | 30 | 452 | 640 | 333 | 307 | 58 | 1 |
module BrickUi (main) where
import Game.H2048.UI.Brick
| Javran/h2048 | exe/BrickUi.hs | mit | 56 | 0 | 4 | 7 | 16 | 11 | 5 | 2 | 0 |
module Hopsu.Handler where
import Data.List()
-- tell the uptime
uptime :: Net String
uptime = do
now <- liftIO getClockTime
zero <- asks starttime
return . pretty $ diffClockTimes now zero
-- say hello to the guy who just joined the channel
greet :: String -> Net ()
greet x =
privmsg $ "Eyh " ++ guy... | anobi/hopsu | src/Hopsu/Handler.hs | mit | 1,544 | 0 | 12 | 413 | 584 | 282 | 302 | 44 | 2 |
module Scores
( wrapScore
, scoreAdjoint
, scoreEigensystem
, scoreFlux
, scoreChainLength
) where
import Data.List.Ordered (sort, nub)
import Data.Matrix (nrows, identity)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import Control.Monad (forM_, when)
import Control.Monad.ST (runST)
i... | arekfu/markov-chains | src/Scores.hs | mit | 2,268 | 0 | 22 | 604 | 790 | 387 | 403 | 65 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Network.Monitoring.Riemann.Client where
import qualified Network.Monitoring.Riemann.Proto.Event as Event
{-|
A Client is able to send 'Network.Monitoring.Riemann.Proto.Event.Event's to Riemann
-}
class Client m a where
sendEvent :: a -> Event.Event -> m ()
close ... | shmish111/hriemann | src/Network/Monitoring/Riemann/Client.hs | mit | 333 | 0 | 10 | 53 | 66 | 39 | 27 | 6 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
-- | Text areas.
--
-- User can write and edit text areas. These text areas are rich; you can add
--... | Noeda/userinterface | src/Graphics/UI/TextEdit.hs | mit | 2,571 | 0 | 12 | 555 | 559 | 292 | 267 | 52 | 2 |
module Ast where
import Types
import qualified Typeinf as T
import qualified Data.List as List hiding (and)
import Debug.Trace
-- useful definitions in terms of lambda calculus
intToChurch :: Int -> Term
intToChurch n =
(Abs "f" (Abs "x" (appN n)))
where
appN n = iterate (\x -> App (Ident "f") x) (Ident "x")... | zoep/jebus | src/Ast.hs | mit | 8,837 | 0 | 20 | 2,376 | 4,335 | 2,190 | 2,145 | 240 | 3 |
module ProC.Parser
( parseProC
) where
import ProC.Language
import ProC.Parser.ProC
import ProC.Parser.Statement
import Text.Parsec (ParseError)
parseProC :: String -> IO (Either ParseError ProCProgram)
parseProC = parse statements
| ianagbip1oti/ProC | src/ProC/Parser.hs | mit | 289 | 0 | 8 | 84 | 66 | 38 | 28 | 8 | 1 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
{-# LANGUAGE QuasiQuotes, OverloadedStrings, RecordWildCards #-}
module Language.Bond.Codegen.Cpp.Grpc_h (grpc_h) where
import System.FilePath
import Data.Maybe (isNo... | jdubrule/bond | compiler/src/Language/Bond/Codegen/Cpp/Grpc_h.hs | mit | 9,618 | 0 | 14 | 1,953 | 852 | 512 | 340 | 63 | 12 |
module K.ConstFold (constFold) where
import Control.Applicative
import Control.Monad.State
import Data.List
import Data.Maybe
import Data.Map (Map)
import qualified Data.Map as M
import Data.Bifunctor
import Frontend.AST
import Frontend.Types
import Frontend.Values
import Frontend.Primitives
import K.AST
import Inte... | alpicola/mel | src/K/ConstFold.hs | mit | 4,471 | 0 | 20 | 1,111 | 2,099 | 1,024 | 1,075 | 130 | 10 |
{-# htermination delete :: Float -> [Float] -> [Float] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_delete_8.hs | mit | 71 | 0 | 3 | 12 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE Arrows, FlexibleContexts, NoMonomorphismRestriction, RankNTypes, TypeOperators #-}
{- The Muddy Children puzzle in circuits.
- Copyright : (C)opyright 2009-2011 peteg42 at gmail dot com
- License : GPL (see COPYING for details)
-
- ghc -O -main-is Main.main -rtsopts -prof -auto-all -caf-all -pa... | peteg/ADHOC | Apps/MuddyChildren/MuddyChildren_spr.hs | gpl-2.0 | 3,854 | 5 | 18 | 721 | 673 | 368 | 305 | -1 | -1 |
module Data.Glome.Scene (
Camera(Camera),
camera,
module Data.Glome.Clr,
module Data.Glome.Vec,
module Data.Glome.Solid,
module Data.Glome.Sphere,
module Data.Glome.Triangle,
module Data.Glome.Bih,
module Data.Glome.Csg,
module Data.Glome.Plane,
module Data.Glome.Box,
mod... | jimsnow/glome | GlomeTrace/Data/Glome/Scene.hs | gpl-2.0 | 1,683 | 0 | 13 | 409 | 408 | 248 | 160 | 46 | 1 |
module Database.Design.Ampersand.Graphic.Graphics
(makePicture, writePicture, Picture(..), PictureReq(..),imagePath
)where
import Data.GraphViz
import Database.Design.Ampersand.ADL1
import Database.Design.Ampersand.FSpec.FSpec
import Database.Design.Ampersand.Classes
import Database.Design.Ampersand.FSpe... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Graphic/Graphics.hs | gpl-3.0 | 27,822 | 1 | 25 | 12,094 | 5,877 | 3,149 | 2,728 | 418 | 29 |
module Main where
import Criterion.IO
import Criterion.Main (defaultMain, defaultMainWith)
import System.Environment
main = putStrLn "hello!"
| ocramz/sparse-linear-algebra | accelerate/bench/Bench.hs | gpl-3.0 | 149 | 0 | 5 | 22 | 35 | 21 | 14 | 5 | 1 |
{-# language
TemplateHaskell
, ExistentialQuantification
, RankNTypes
, OverloadedStrings
#-}
module Rasa.Ext.Views.Internal.Widgets
( Widgets
, HasWidgets(..)
, addTopBar
, addBottomBar
, addLeftBar
, addRightBar
, topBar
, bottomBar
, leftBar
, rightBar
) where
import Rasa.Ext
import ... | ChrisPenner/rasa | rasa-ext-views/src/Rasa/Ext/Views/Internal/Widgets.hs | gpl-3.0 | 2,839 | 0 | 13 | 561 | 723 | 381 | 342 | 67 | 1 |
module Global
where
import System.Directory
import Control.Exception (throwIO)
import System.IO.Error (mkIOError, userErrorType, doesNotExistErrorType)
import Prelude hiding (catch)
import System.FilePath
import Utils
appName = "nix"
globalconfigfile :: IO String
globalconfigfile = do
let globalconfigfilebase = "... | anttisalonen/nix | src/Global.hs | gpl-3.0 | 1,147 | 0 | 13 | 266 | 281 | 141 | 140 | 34 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Util.Hmac.Type where
import Prelude
import Control.Arrow (first)
import Data.String (IsString)
import Data.Text (Text)
import qualified Data.Text as T
import Database.Persist.Sql (PersistFieldSql)
import Yesod
import Text.Blaze (ToMarkup)
-- | HMACs are unique iden... | RaphaelJ/getwebb.org | Util/Hmac/Type.hs | gpl-3.0 | 994 | 0 | 10 | 188 | 291 | 159 | 132 | 24 | 0 |
-- TransformCloneList module.
-- By Gregory W. Schwartz
--
-- Collection of functions that transform a clone entry in some way
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
module TransformCloneList ( onlyMutations
, frequentMutations
) where
-- Built-in
import ... | GregorySchwartz/modify-fasta | src/TransformCloneList.hs | gpl-3.0 | 5,498 | 0 | 16 | 2,027 | 1,346 | 708 | 638 | 107 | 6 |
module Main where
import Data.Either (either)
import Control.Monad.State
import Parser
import Expr
import Eval
import CompileAST
import ASTErrors
import CompilerErrors
import AST
import State
main = getLine >>= testrun
testrun code = runEvalMonad (runAST newState ((testparse expression) "" code)) >>= either print p... | Jem777/deepthought | src/Interpreter.hs | gpl-3.0 | 723 | 0 | 12 | 111 | 215 | 115 | 100 | -1 | -1 |
module Monitoring.Shinken.Configuration where
import Data.Map.Strict
type Configuration = [Object]
data Object = Arbiter Attributes
| Broker Attributes
| Command Attributes
| Contact Attributes
| ContactGroup Attributes
| DiscoveryRule Attributes
... | Taeradan/shinken-config-graph | src/Monitoring/Shinken/Configuration.hs | gpl-3.0 | 2,348 | 0 | 7 | 678 | 514 | 264 | 250 | 44 | 1 |
{-# 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/TagKeys/List.hs | mpl-2.0 | 5,540 | 0 | 18 | 1,325 | 888 | 514 | 374 | 123 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Docs.Types
-- Copyright : (c) 2015-2016 Brendan Hay
--... | brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types.hs | mpl-2.0 | 34,587 | 0 | 7 | 7,959 | 3,492 | 2,403 | 1,089 | 1,025 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Model.Audit.TypesTest where
import Data.Time as Time
import Database.PostgreSQL.Typed.Inet (PGInet(..))
import Model.Audit.Types
import Model.Id.Types
-- import Model.TypeOrphans ()
auditIdentity1 :: AuditIdentity
auditIdentity1 =
AuditIdentity {
... | databrary/databrary | test/Model/Audit/TypesTest.hs | agpl-3.0 | 606 | 0 | 10 | 138 | 133 | 81 | 52 | 17 | 1 |
module GCrypt (
withGCrypt,
) where
import GCrypt.Base
import Foreign.Ptr
import Foreign.C.String
withGCrypt :: IO a -> IO a
withGCrypt a = do
checkVersion "1.4.4"
a
checkVersion :: String -> IO (Maybe String)
checkVersion s = do
r <- withCString s $ \s' -> gcry_check_version s'
case r == nullPtr... | sw17ch/hsgcrypt | src/GCrypt.hs | lgpl-3.0 | 405 | 0 | 12 | 103 | 143 | 71 | 72 | 15 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
module LibSpec where
import Test.Hspec
------------------------------------------------------------------------------
import Lib
spec :: Spec
spec = do
t01
t02
t03
t04
| haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/existentials/2017-05-jonathan-fischoff-existential-quantification-patterns-and-antipatterns/test/LibSpec.hs | unlicense | 235 | 0 | 6 | 54 | 36 | 20 | 16 | 10 | 1 |
-- A Pythagorean triplet is a set of three natural numbers:
-- a < b < c, for which a^2 + b^2 = c^2
-- For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2.
--There exists exactly one Pythagorean triplet for which a + b + c = 1000.
--Find the product abc.
isPythagorean (a,b,c)
| ((a < b) && ( b < c) && ((a^2) + (b^2) == (c... | nmarshall23/Programming-Challenges | project-euler/009/09.hs | unlicense | 1,626 | 6 | 14 | 400 | 829 | 441 | 388 | 32 | 1 |
module Helpers.F3Matrix where
import Data.Matrix (mapRow, Matrix, getRow, nrows, getElem, switchRows, ncols)
import Data.Vector (Vector, zipWith, map, (!))
import Data.List (find, delete)
import Data.Maybe (fromMaybe)
-- Really this should be Matrix Z/3
-- but for now a specially crafted Matrix Int will do.
rref :: M... | peterokagey/haskellOEIS | src/Helpers/F3Matrix.hs | apache-2.0 | 2,413 | 0 | 13 | 671 | 772 | 406 | 366 | 42 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Hircine.Core.Parser (
parseMessage
) where
import Prelude hiding (takeWhile)
import Control.Applicative
import Control.Monad
import Data.Attoparsec.ByteString.Char8
import Data.ByteString (ByteString)
import qualified Data.ByteS... | lfairy/hircine | Hircine/Core/Parser.hs | apache-2.0 | 1,738 | 0 | 14 | 390 | 496 | 265 | 231 | 46 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-- | Very simple scheduler and node monitor
module Main where
import System.Environment (getArgs)
import Control.A... | SKA-ScienceDataProcessor/RC | MS1/distributed-dot-product/dot-product.hs | apache-2.0 | 7,670 | 0 | 18 | 1,738 | 2,146 | 1,079 | 1,067 | 136 | 3 |
{-# LANGUAGE BangPatterns, FlexibleContexts, UndecidableInstances, StandaloneDeriving #-}
-- |
-- Module : Graphics.Rendering.Hieroglyph.Primitives
-- Copyright : (c) Renaissance Computing Institute 2009
-- License : BSD3
--
-- This is Hieroglyph, a 2D scenegraph library similar in functionality to a... | JeffHeard/Hieroglyph | Graphics/Rendering/Hieroglyph/Primitives.hs | bsd-2-clause | 18,838 | 2 | 13 | 5,719 | 4,881 | 2,695 | 2,186 | 338 | 6 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Data.CRF.Chain2.Generic.FeatMap.Map
( FeatMap (..)
) where
import Data.Binary (Binary)
import qualified Data.Map as M
import Data.CRF.Chain2.Generic.Internal
import qualified Data.CRF.Chain2.G... | kawu/crf-chain2-generic | Data/CRF/Chain2/Generic/FeatMap/Map.hs | bsd-2-clause | 563 | 0 | 8 | 89 | 152 | 93 | 59 | 14 | 0 |
{-# LANGUAGE ViewPatterns #-}
module Window where
import Control.Monad
import SDL
import Control.Monad.Trans
import Control.Exception
import Linear
import Linear.Affine
import Data.Text (Text)
import Control.Lens
createGLWindow :: MonadIO m => Text -> m (Window, GLContext)
createGLWindow windowName = do
initiali... | lukexi/halive | demo/Window.hs | bsd-2-clause | 2,454 | 0 | 16 | 786 | 667 | 343 | 324 | 56 | 1 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
-- | File functions using System.Event instead of GHC's I/O manager.
module EventFile
(
read
) where
import Data.ByteString (ByteString)
import Data.ByteString.Internal (createAndTrim)
import Data.Word (Word8)
import qualified Data.ByteString as B
import Fo... | tibbe/event | benchmarks/EventFile.hs | bsd-2-clause | 1,716 | 2 | 13 | 422 | 410 | 223 | 187 | 37 | 3 |
module TestModify
(testModify)
where
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import ArbitraryLambda
import MTable
import ModificationTags (applyModify,Modify(..))
import qualified ModificationTags as M (LamTerm())
import qualified ModificationTags
import qualified Modify
import qu... | kwibus/myLang | tests/TestModify.hs | bsd-3-clause | 7,390 | 0 | 16 | 1,964 | 2,913 | 1,517 | 1,396 | 142 | 1 |
module LobbyTypes where
import qualified Control.Concurrent as CC
import Haste.App
type Name = String
type Player = (SessionID, Name)
type PlayerList = CC.MVar [Player]
type LobbyGame = (String, [Player])
type GamesList = CC.MVar [LobbyGame] | DATx02-16-14/ChineseCheckers | src/LobbyTypes.hs | bsd-3-clause | 243 | 0 | 6 | 35 | 78 | 50 | 28 | 8 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Fog
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : provisional
-- P... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Fog.hs | bsd-3-clause | 6,269 | 0 | 13 | 1,013 | 1,355 | 727 | 628 | 140 | 8 |
{-# LANGUAGE MagicHash, UnboxedTuples, BangPatterns #-}
module Data.Vector.Build where
import Control.Monad.Primitive
import Data.Vector.Generic (Vector, create)
import Data.Vector.Generic.Mutable
import Data.Foldable
import Prelude hiding (foldr)
import GHC.Exts
{-# INLINE toMVectorMapN #-}
toMVectorMapN :: (Folda... | lowasser/TrieMap | Data/Vector/Build.hs | bsd-3-clause | 723 | 0 | 13 | 139 | 300 | 155 | 145 | 19 | 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 OverloadedStrings #-}
module Duckling.TimeGrain.DA.Rules
( rules ) where
... | facebookincubator/duckling | Duckling/TimeGrain/DA/Rules.hs | bsd-3-clause | 1,148 | 0 | 11 | 259 | 271 | 172 | 99 | 25 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Safe #-}
modul... | TomMD/cryptol | src/Cryptol/Eval/Value.hs | bsd-3-clause | 11,884 | 0 | 16 | 3,173 | 3,800 | 1,941 | 1,859 | 231 | 11 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Trustworthy #-}
{-# OPTIONS_HADDOCK hide #-}
-- we hide this module from haddock to enforc... | ezyang/ghc | libraries/base/GHC/Stack/Types.hs | bsd-3-clause | 7,334 | 0 | 9 | 1,303 | 561 | 386 | 175 | -1 | -1 |
{-# LANGUAGE CPP, DeriveDataTypeable, UndecidableInstances, Rank2Types, BangPatterns, FunctionalDependencies, MultiParamTypeClasses, MagicHash, ScopedTypeVariables, GADTs, FlexibleContexts, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-}
module Control.Monad.Incremental.Internal.Adapton.Memo (
memoNonRecU,m... | cornell-pl/HsAdapton | src/Control/Monad/Incremental/Internal/Adapton/Memo.hs | bsd-3-clause | 6,128 | 20 | 25 | 1,011 | 2,113 | 1,106 | 1,007 | 100 | 3 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE FlexibleContexts #-}
module Elm.Utils
( (|>), (<|)
, getAsset
, run, unwrappedRun
, CommandError(..)
, isDeclaration
) where
import Control.Monad.Except (MonadError, MonadIO, liftIO, throwError)
import qualified Data.List as List
import System.Directory (d... | pairyo/elm-compiler | src/Elm/Utils.hs | bsd-3-clause | 4,654 | 0 | 16 | 1,154 | 1,008 | 547 | 461 | 102 | 3 |
{-# OPTIONS_GHC -fbang-patterns #-}
module HMQ.Example.GeneratedEntities.Employees where
import Data.List
import Data.Maybe
import System.Time
import Database.HDBC
import HMQ.Metadata.TableMetadata
import HMQ.Query hiding(tableIdentifier)
import HMQ.ForeignKeyLink
import HMQ.MappedQuery
import HMQ.RowValueExtractors... | scharris/hmq | Example/GeneratedEntities/Employees.hs | bsd-3-clause | 3,979 | 0 | 21 | 886 | 1,002 | 596 | 406 | -1 | -1 |
module TypeName where
import Data.Empty
import Data.Proxy
import Data.Word
class TypeName a where
typeName :: Proxy a -> String
instance TypeName None where
typeName _ = "None"
instance TypeName () where
typeName _ = "()"
instance TypeName Bool where
typeName _ = "Bool"
instance TypeName Word8 whe... | AshleyYakeley/countable | test/TypeName.hs | bsd-3-clause | 770 | 0 | 11 | 170 | 295 | 152 | 143 | 22 | 0 |
{-# LANGUAGE OverloadedLists #-}
module SpecHelpers
( module Test.Hspec
, module Database.Seakale.Tests.Request
, module SpecHelpers
) where
import GHC.Generics
import Control.Monad
import Data.Either
import Test.Hspec hiding (after)
import Database.Seakale.FromRow
import Database.Seakale.PostgreSQL ( def... | thoferon/seakale | tests/SpecHelpers.hs | bsd-3-clause | 6,021 | 0 | 11 | 1,155 | 1,931 | 1,033 | 898 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GADTs #-}
module Main where
import Text.Blaze.Html (toHtml)
import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
import ClassyPrelude
import Data.Aeson
import Data.Yaml
import Text.Hamlet.Run... | joelelmercarlson/html | slides/src/Main.hs | mit | 2,704 | 0 | 20 | 742 | 704 | 364 | 340 | 90 | 3 |
{-# LANGUAGE QuasiQuotes #-}
-- | Definitions found in Haskell's "Data.Function".
--
-- This module should be imported qualified to avoid clashes with standard
-- Haskell definitions.
module Stg.Prelude.Function (
seq,
id,
const,
compose,
fix,
) where
import Prelude ()
import Stg.Language ... | quchen/stg | src/Stg/Prelude/Function.hs | bsd-3-clause | 1,450 | 0 | 5 | 365 | 147 | 119 | 28 | 16 | 1 |
{-# LANGUAGE CPP, OverloadedStrings #-}
module Haste.PrimOps (genOp) where
import Prelude hiding (LT, GT)
import PrimOp
import Data.JSTarget
import Haste.Config
-- | Dummy State# RealWorld value for where one is needed.
defState :: Exp
defState = litN 0
-- | Generate primops.
-- Many of these ops return lifted Bool... | beni55/haste-compiler | src/Haste/PrimOps.hs | bsd-3-clause | 15,105 | 0 | 16 | 4,268 | 4,328 | 2,080 | 2,248 | 294 | 253 |
module Blah where
import DocTest
import System.FilePath.Glob (glob)
main = glob "src/**/*.hs" >>= docTest
| positiondev/larceny | test/DocTest.hs | isc | 128 | 0 | 6 | 36 | 30 | 18 | 12 | 4 | 1 |
-- | This module contains in-memory implementation of Kademlia P2P-discovery.
module Network.Discovery.Transport.InMemory
( InMemoryDiscoveryErrorCode
, inMemoryDiscovery
) where
import qualified Control.Concurrent.STM as STM
import qualified Control.Concurrent.STM.TVar as TVar
import C... | input-output-hk/pos-haskell-prototype | networking/src/Network/Discovery/Transport/InMemory.hs | mit | 2,299 | 0 | 21 | 575 | 491 | 263 | 228 | 43 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-}
import Yesod.Core
import Yesod.Form
import Yesod.Form.MassInput
import Control.Applicative
import Data.Text (Text, pack)
import Network.Wai.Handler.Warp (run)
import Data.Time (utctDay, getCurrentTime)
... | cirquit/quizlearner | resources/streams/readFiles.hs | mit | 1,041 | 0 | 9 | 184 | 222 | 127 | 95 | 25 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.