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 DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-route53/gen/Network/AWS/Route53/GetHealthCheckLastFailureReason.hs | mpl-2.0 | 5,114 | 0 | 10 | 909 | 514 | 310 | 204 | 66 | 1 |
{-# language ScopedTypeVariables #-}
module Top.Initialisation where
import Prelude hiding (catch)
import Safe
import qualified Data.Indexable as I
import Data.Indexable (Indexable)
import Data.Indexable.Range (Range, calculateRange)
import Data.Initial
import Data.SelectTree
import Data.Maybe
import Data.List
imp... | changlinli/nikki | src/Top/Initialisation.hs | lgpl-3.0 | 7,198 | 0 | 21 | 1,474 | 1,978 | 1,046 | 932 | -1 | -1 |
{-# LANGUAGE RecordWildCards, BangPatterns, TypeFamilies, StandaloneDeriving, FlexibleContexts, FlexibleInstances, UndecidableInstances, TypeSynonymInstances #-}
-- | This module declares (low-level) data types for Java .class files
-- structures, and Binary instances to read/write them.
module JVM.ClassFile
(-- * Ab... | ledyba/hs-java | JVM/ClassFile.hs | lgpl-3.0 | 19,963 | 0 | 18 | 5,141 | 5,788 | 2,949 | 2,839 | 505 | 15 |
{- |
Module : $Header$
Description : Parser for CspCASL specifications
Copyright : (c) Uni Bremen 2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : a.m.gimblett@swan.ac.uk
Stability : experimental
Portability : portable
Parser for CSP-CASL specifications.
-}
module CspCASL.Parse_CspCA... | mariefarrell/Hets | CspCASL/Parse_CspCASL.hs | gpl-2.0 | 1,276 | 0 | 16 | 269 | 309 | 153 | 156 | 33 | 3 |
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- for de... | lukexi/ghc-7.8-arm64 | compiler/nativeGen/SPARC/CodeGen/Expand.hs | bsd-3-clause | 4,236 | 108 | 15 | 1,015 | 1,041 | 557 | 484 | 77 | 3 |
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- for de... | lukexi/ghc-7.8-arm64 | compiler/nativeGen/SPARC/CodeGen/Sanity.hs | bsd-3-clause | 1,830 | 31 | 10 | 378 | 303 | 165 | 138 | 33 | 1 |
module Main where
import Data.Foldable
import Data.List
main = do
x <- getContents
let f s = if isInfixOf ">>" s then 1 else (-1)
g n (s:ss) = let n' = n + f s in (min n' n, s) : g n' ss
g _ [] = []
traverse_ (\(n, s) -> putStrLn (replicate n ' ' ++ s)) . g 0 $ lines x
| alexander-at-github/eta | utils/trace/Filter.hs | bsd-3-clause | 290 | 0 | 15 | 87 | 174 | 88 | 86 | 9 | 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="el-GR">
<title>Retire.js Add-on</title>
<maps>
<homeID>retire</homeID>
<mapref location... | kingthorin/zap-extensions | addOns/retire/src/main/javahelp/org/zaproxy/addon/retire/resources/help_el_GR/helpset_el_GR.hs | apache-2.0 | 964 | 86 | 29 | 156 | 392 | 212 | 180 | -1 | -1 |
{-
This module handles generation of position independent code and
dynamic-linking related issues for the native code generator.
This depends both the architecture and OS, so we define it here
instead of in one of the architecture specific modules.
Things outside this module which are related to this:
+ ... | tjakway/ghcjvm | compiler/nativeGen/PIC.hs | bsd-3-clause | 34,688 | 0 | 20 | 10,560 | 4,972 | 2,531 | 2,441 | 437 | 9 |
module PPC.Cond (
Cond(..),
condNegate,
condUnsigned,
condToSigned,
condToUnsigned,
)
where
import GhcPrelude
import Panic
data Cond
= ALWAYS
| EQQ
| GE
| GEU
| GTT
| GU
| LE
| LEU
| LTT
| LU
... | shlevy/ghc | compiler/nativeGen/PPC/Cond.hs | bsd-3-clause | 1,135 | 0 | 5 | 372 | 322 | 175 | 147 | 51 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2014 Edward Kmett
-- Li... | urbanslug/ghc | testsuite/tests/patsyn/should_compile/T9857.hs | bsd-3-clause | 4,934 | 2 | 11 | 1,014 | 1,282 | 692 | 590 | 108 | 1 |
-- demonstrates a bug in mulIntMayOflo in GHC 6.5 on 64-bit arches
-- (trac #867).
-- It thought it could represent 3049800625 * 3049800625 in an I#.
i :: Integer
i = 3049800625
main :: IO ()
main = print (i * i)
| hferreiro/replay | testsuite/tests/numeric/should_run/arith019.hs | bsd-3-clause | 216 | 1 | 7 | 46 | 48 | 23 | 25 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Clingo
import Control.Monad.Except
import Data.List.NonEmpty (NonEmpty)
import Data.Text (Text)
type SymbolInjectionM
= Location -> Text -> [PureSymbol] -> ExceptT Text IO [PureSymbol]
groundCallback :: SymbolInjectionM
groundCallback _ "empty" _ = pu... | tsahyt/clingo-haskell | examples/GroundCallback.hs | mit | 1,002 | 0 | 14 | 251 | 312 | 158 | 154 | 29 | 1 |
module Main where -- Cabal won't allow Spec module, it needs Main to start tests
import Data.List
import Data.Char
import Test.Hspec
import Test.QuickCheck
import Preprocessing (preprocessEmail, vectorizeMail, commonWords)
createMail :: [Char] -> [Char]
createMail s = "Subject: " ++ s ++ " Thanks."
allDifferent :: ... | apisarek/malus | test/Spec.hs | mit | 4,431 | 0 | 19 | 1,501 | 1,158 | 600 | 558 | 87 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- InfRuleShare.hs ---
--
-- Filename: InfRuleShare.hs
-- Description:
-- Author: Manuel Schneckenreither
-- Maintainer:
-- Created: Sun Sep 14 17:35:09 2014 (+0200)
-- Version:
-- Package-Requires: ()
-- Last-Updated: Mon Oct 9 16:16:08 2017 (+0200)
-- By: Manuel Schneck... | ComputationWithBoundedResources/ara-inference | src/Data/Rewriting/ARA/ByInferenceRules/InferenceRules/InfRuleShare.hs | mit | 8,713 | 0 | 16 | 3,367 | 2,031 | 1,176 | 855 | 114 | 10 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wall #-}
module Exercises where
import Data.Char
import Optics.Core
import Optics.TH
{-
Here are some example data types from the slides, and some test data to
experiment with.
-}
data Person = MkPerson
{ _personName :: String
,... | Javran/misc | optics-zurihac-2021/exercises/Exercises.hs | mit | 7,086 | 0 | 11 | 1,577 | 945 | 524 | 421 | 89 | 1 |
{-# htermination elemIndex :: Int -> [Int] -> Maybe Int #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_elemIndex_5.hs | mit | 72 | 0 | 3 | 13 | 5 | 3 | 2 | 1 | 0 |
module Composition where
import Data.Vect
import Utils
ruleOfThirds :: Vec2 -> Vec2 -> [Vec2]
ruleOfThirds min max = [ Vec2 x y | x <- xs, y <- ys]
where xs = map (\x -> lerp (_1 min) (_1 max) x) [0, 1/3, 2/3, 3/3]
ys = map (\y -> lerp (_2 min) (_2 max) y) [0, 1/3, 2/3, 3/3]
toPolar :: (RealFloat a, Fl... | Vetii/Haskell-Art | Composition.hs | mit | 669 | 0 | 12 | 211 | 390 | 213 | 177 | 19 | 1 |
module Main where
import Lib
main :: IO ()
main = do
let q = "qdq-gi.q-a ziatmxxitmdqibtqi-ustbi ri.qmoqrcxi.qbubu zir -ibtqi-qp-qaai ripmymsqkir -ibtqi-qy dmxi ri.cnxuoi rruoumxakir -ibtqiqzmobyqzbkii-q.qmxi -imyqzpyqzbi rixmeaki -puzmzoqai -i-qscxmbu zaimzpir -i btq-iymbbq-a;iz -iatmxximzgi.q-a zinqiuzimzgiemgipu... | pogin503/vbautil | language/haskell/caesar/app/Main.hs | mit | 408 | 0 | 9 | 52 | 47 | 24 | 23 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson
import Data.String
import Data.Time (getCurrentTime)
import System.Directory
import System.Environment
import System.Exit
import System.IO
import System.IO.Error
import System.Process
import Pond.Data
import qualified Data.ByteString.Lazy.Char8 a... | tyler-sommer/stormy-pond | app/Main.hs | mit | 6,463 | 0 | 22 | 1,493 | 2,081 | 1,053 | 1,028 | 164 | 12 |
{-# LANGUAGE OverloadedStrings #-}
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Network.API.Dozens
user :: Auth
user = def
{ authUser = "Your User Name"
, authKey = "Your API Key"
}
main :: IO ()
main = withManager tlsManagerSettings $ withDozens user $ do
run getZone >>= print
... | philopon/dozens-hs | examples/implicit.hs | mit | 863 | 1 | 15 | 271 | 263 | 135 | 128 | 25 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Database.Persist.Types.Base where
import qualified Data.Aeson as A
import Control.Exception (Exception)
import Web.PathPieces (PathPiece (..))
import Control.Monad.Trans.Error (Error (..))
import Data.Typeable (Typeable)... | nakaji-dayo/persistent | persistent/Database/Persist/Types/Base.hs | mit | 17,508 | 0 | 18 | 4,670 | 3,848 | 2,096 | 1,752 | 352 | 4 |
import Data.List
import qualified Data.Map as Map
data Link = Link {from :: String, to :: String, cost :: Int}
orderedTuple a b = if a > b then (a, b) else (b, a)
parseFile :: String -> [Link]
parseFile = map parseLine . lines
parseLine :: String -> Link
parseLine str = Link from to (read cost)
where [from, _, ... | bruno-cadorette/AdventOfCode | Day 9/Day9.hs | mit | 1,087 | 0 | 10 | 258 | 454 | 240 | 214 | 25 | 2 |
-- |
-- HJS Haskell Javascript Interpreter
-- (c) Mark Wassell 2007
-- See LICENSE file for license details
module Main(main,parseProgram,parseTest,parseFile) where
import Data.ByteString.Char8(split,pack,unpack,intercalate,readInt)
import Data.List
import qualified Data.Map as M
import Data.Ord
import... | nbrunt/JSHOP | res/hjs-0.2.1/src/Main.hs | mit | 4,371 | 15 | 17 | 1,428 | 1,320 | 683 | 637 | 86 | 4 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Lambda.Derive.Instance where
import Lambda.Type
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Type = Make
{ from :: Lambda
, to :: Lambda
-- | wenn @Just x@, dann genau @x@ Schritte, sonst egal
... | Erdwolf/autotool-bonn | src/Lambda/Derive/Instance.hs | gpl-2.0 | 743 | 0 | 9 | 240 | 179 | 105 | 74 | 22 | 1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances,
FunctionalDependencies, GeneralizedNewtypeDeriving,
MultiParamTypeClasses, TypeSynonymInstances #-}
module Yi.Scion where
import Yi.Prelude
import Yi.Core (msgEditor)
import Prelude (lines)
import Bag
import Data.Maybe
import GHC
import ... | codemac/yi-editor | src/Yi/Scion.hs | gpl-2.0 | 4,208 | 0 | 26 | 1,088 | 1,181 | 594 | 587 | 97 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module JSON (tests) where
import Control.Applicative
import Control.Lens hiding ((.=))
import Data.Aeson
import Data.Monoid (mempty)
import MusicBrainz
import MusicBrainz.Data
import MusicBrainz.Data.ArtistCredit
import MusicBrainz.Data.Edit
import MusicBrainz.Data.Editor
import Test... | metabrainz/musicbrainz-data-service | test/suite/JSON.hs | gpl-2.0 | 5,716 | 0 | 21 | 2,448 | 1,066 | 584 | 482 | 115 | 1 |
{-# OPTIONS_HADDOCK ignore-exports #-}
module Main (setup, main) where
import Control.Monad
import Graphics.UI.Threepenny.Core
import qualified Graphics.UI.Threepenny.Elements as E
import qualified EXReactive as R
import EXData
main :: IO()
main = startGUI defaultConfig setup
-- We start a server by using the startG... | lepoticka/ExcellingCabbage | excell.hs | gpl-2.0 | 2,067 | 0 | 20 | 430 | 500 | 269 | 231 | 30 | 1 |
{-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Hoodle.Coroutine.Mode
-- Copyright : (c) 2011-2013 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
-- Portability : GHC
--
... | wavewave/hoodle-core | src/Hoodle/Coroutine/Mode.hs | gpl-3.0 | 7,201 | 0 | 19 | 2,625 | 1,619 | 825 | 794 | 124 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Types where
import Data.Text (Text)
data Config = Config
{ useHaskellName :: Bool
, colors :: [Color]
, title :: Text
, size :: Int
}
data Color = Color { unColor :: Text }
defaultColors :: [Color]
defaultColors = [
Color "#1abc9c"
, Color "#2... | fgaray/persist2er | src/Types.hs | gpl-3.0 | 621 | 0 | 9 | 187 | 166 | 97 | 69 | 25 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs | mpl-2.0 | 11,111 | 0 | 29 | 2,920 | 1,771 | 1,020 | 751 | 229 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.AnalyticsReporting.Types.Sum
-- Copyright : (c) 2015-2... | brendanhay/gogol | gogol-analyticsreporting/gen/Network/Google/AnalyticsReporting/Types/Sum.hs | mpl-2.0 | 34,676 | 0 | 11 | 8,217 | 4,543 | 2,457 | 2,086 | 548 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Operations/Get.hs | mpl-2.0 | 4,930 | 0 | 15 | 1,137 | 716 | 421 | 295 | 104 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Language.Ty... | rueshyna/gogol | gogol-language/gen/Network/Google/Language/Types/Product.hs | mpl-2.0 | 44,866 | 0 | 22 | 11,014 | 8,272 | 4,772 | 3,500 | 901 | 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/SecuritySettings/Patch.hs | mpl-2.0 | 6,552 | 0 | 17 | 1,436 | 861 | 502 | 359 | 134 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-youtube-reporting/gen/Network/Google/Resource/YouTubeReporting/Jobs/Get.hs | mpl-2.0 | 4,730 | 0 | 17 | 1,131 | 782 | 455 | 327 | 110 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/DomainMAppings/Get.hs | mpl-2.0 | 5,512 | 0 | 18 | 1,232 | 785 | 458 | 327 | 119 | 1 |
module System.CloudyFS.Weather where
import Data.Convertible (convert)
import Data.Maybe (fromJust)
import Data.Time.LocalTime
import Data.ByteString.Char8 hiding (length)
import System.CloudyFS.Expiring
import System.Posix.Types
import Network.HTTP
import Text.HTML.TagSoup
import Data.DateTime (DateTime, addMinutes... | bhickey/cloudyfs | System/CloudyFS/Weather.hs | agpl-3.0 | 1,607 | 0 | 11 | 287 | 517 | 274 | 243 | 39 | 2 |
module J2s.Scanner.Show where
import J2s.Scanner.Token
-- Result Structure
instance Show Token where
show (Token j2s str pos) = show j2s ++ " " ++ show str ++ "\t" ++ show pos ++ "\n"
-- Name of Result Structure
instance Show J2sSc where
show Identifier = "Identifier : "
... | andreagenso/java2scala | src/J2s/Scanner/Show.hs | apache-2.0 | 1,480 | 0 | 11 | 670 | 207 | 106 | 101 | 21 | 0 |
module DoubleOrIncrement.A304027Spec (main, spec) where
import Test.Hspec
import DoubleOrIncrement.A304027 (a304027)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A304027" $
it "correctly computes the first 20 elements" $
map a304027 [0..19] `shouldBe` expectedValue where
expectedValue... | peterokagey/haskellOEIS | test/DoubleOrIncrement/A304027Spec.hs | apache-2.0 | 366 | 0 | 8 | 61 | 154 | 92 | 62 | 10 | 1 |
module LayoutRender ( drawPlay, drawOver ) where
import Util
import Text.Tabular
import Text.Tabular.AsciiArt ( render )
import Data.List.Split ( chunksOf )
import Data.Set ( Set )
import Data.Set as Set ( member )
-- | Put constructor Header on each element in sourceList.
rangeHeader :: I... | ljishen/Minesweeper | src/LayoutRender.hs | apache-2.0 | 1,945 | 0 | 16 | 600 | 490 | 261 | 229 | 30 | 1 |
{-|
Module : Pulsar.Label
Description : DCPU16 assembly labels.
Copyright : (c) Jesse Haber-Kucharsky, 2014
License : Apache-2.0
Labels are named identifiers for a specific location into a program.
Pulsar supports two kind of labels:
- Global labels, which can be referenced anywhere unambiguously.
- Local ... | hakuch/Pulsar | src/Pulsar/Label.hs | apache-2.0 | 3,837 | 0 | 14 | 1,007 | 952 | 512 | 440 | 76 | 3 |
module Day1 where
import Data.List (foldl')
move :: Char -> Integer -> Integer
move '(' = succ
move ')' = pred
move x = error $ "unknown move type" ++ [x]
floor :: String -> Integer
floor = foldl' (flip move) 0
basement :: String -> Integer
basement = fst . foldl' nextMove (-1, 0) . zip [1..]
nextMove :: (Intege... | taylor1791/adventofcode | 2015/src/Day1.hs | bsd-2-clause | 473 | 0 | 9 | 98 | 216 | 118 | 98 | 14 | 1 |
-- 329468
import Euler(digitUsage)
-- fibonacci calculation is too slow
-- only inspect lower digits with modulous
genLowerFib0 n a b = (n,c) : genLowerFib0 (n+1) b c
where c = (a + b) `mod` (10^9)
genLowerFib = (0,0):(1,1):(2,1):genLowerFib0 3 1 1
-- extract upper digits directly
-- as per MathWorld, FibN = phi ... | higgsd/euler | hs/104.hs | bsd-2-clause | 1,002 | 0 | 11 | 261 | 364 | 197 | 167 | 16 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Text.Lazy
-- Copyright : (c) Kazu Yamamoto 2010
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Portability : portable
--... | kazu-yamamoto/parsec3 | Text/Parsec/Text/Lazy.hs | bsd-2-clause | 1,085 | 0 | 10 | 181 | 198 | 118 | 80 | 16 | 1 |
module Demo.Links ( parseInput
, getRect
, findScale
, scaleMap
, nmap
, mismatches
, mkLayout ) where
import Text.Read (readMaybe)
import System.Random
import Demo.Types
import qualified Data.Map as M (Map, em... | RoboNickBot/linked-list-web-demo | src/Demo/Links.hs | bsd-2-clause | 5,196 | 0 | 14 | 1,791 | 1,854 | 1,030 | 824 | 107 | 4 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
{-
Interesting example as subtyping of bounds is instantiated
with function types!
-}
zipWith :: (b -> Char -> a)
-> b -> b -> a
zipWith f = (bar . f)
bar :: (Char -> c) -> a -> c
bar = undefined
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/bounds1.hs | bsd-3-clause | 264 | 0 | 8 | 68 | 74 | 41 | 33 | 7 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
----------------------------------------------------------------------
-- |
-- Module : Proof.Monad
--
-- Monad for checking proofs in propositional logic.
----------------------------------------------------------------------
module Proof.Monad(
Proof, LatexProof,
... | ulrikrasmussen/Proof | src/Proof/Monad.hs | bsd-3-clause | 9,217 | 0 | 18 | 2,503 | 3,481 | 1,770 | 1,711 | 209 | 3 |
ignore "use camelCase"
| DNNX/hyphenation | HLint.hs | bsd-3-clause | 23 | 0 | 5 | 3 | 7 | 2 | 5 | -1 | -1 |
{-# OPTIONS -fasm #-}
module SetBench (main) where
import Criterion.Main
import Data.Set
import qualified Data.Map as M
import qualified Data.Foldable as F
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import Control.Monad.Primitive
import Control.Monad
import Control.Monad.Trans
import... | lowasser/TrieMap | SetBench.hs | bsd-3-clause | 3,194 | 5 | 15 | 567 | 1,331 | 697 | 634 | -1 | -1 |
-- |
-- Module : Simulation.Aivika.Branch
-- Copyright : Copyright (c) 2016-2017, David Sorokin <david.sorokin@gmail.com>
-- License : BSD3
-- Maintainer : David Sorokin <david.sorokin@gmail.com>
-- Stability : experimental
-- Tested with: GHC 7.10.3
--
-- This module re-exports the library functionality rela... | dsorokin/aivika-branches | Simulation/Aivika/Branch.hs | bsd-3-clause | 863 | 0 | 5 | 130 | 97 | 74 | 23 | 12 | 0 |
{-# language
DuplicateRecordFields
, GeneralizedNewtypeDeriving
, TypeApplications
#-}
module Zoid where
import Clash.Prelude hiding (read)
import Config
import Instructions
import Types
class Arithmetic n where
add :: BitVector n -> BitVector n -> Processor (BitVector n)
-- class Logic a where
-- a ==... | jkopanski/zoid | src/Zoid.hs | bsd-3-clause | 763 | 0 | 11 | 185 | 113 | 68 | 45 | -1 | -1 |
{-# LANGUAGE RecursiveDo #-}
module Main where
import qualified Control.Monad.RevState as Rev
import System.Exit (exitFailure)
import System.Timeout (timeout)
-- An example usage of reverse state
-- http://stackoverflow.com/questions/34030388/retrocausality-in-haskell-from-tardis-to-revstate/34287498
lastOccurrence... | DanBurton/rev-state | test/Main.hs | bsd-3-clause | 909 | 0 | 11 | 140 | 296 | 164 | 132 | 22 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Basics.TOut
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Test the basic timeout mechanism
----------------------------------... | josefs/sbv | SBVTestSuite/TestSuite/Basics/TOut.hs | bsd-3-clause | 630 | 0 | 10 | 95 | 72 | 46 | 26 | 7 | 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 OverloadedStrings #-}
module Duckling.Numeral.ES.PE.Corpus (allExamples) where
import Data.String
i... | facebookincubator/duckling | Duckling/Numeral/ES/PE/Corpus.hs | bsd-3-clause | 1,019 | 0 | 11 | 186 | 258 | 149 | 109 | 21 | 1 |
-- Copyright (c) 2014, Dmitry Zuikov
-- 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... | voidlizard/emufat | src/Encode.hs | bsd-3-clause | 5,081 | 0 | 16 | 1,364 | 1,742 | 889 | 853 | 82 | 6 |
-- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Sound.OpenAL.AL.String
-- Copyright : (c) Sven Panne 2005
-- License : BSD-style (see the file libraries/OpenAL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : provisional
-- Po... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenAL/Sound/OpenAL/AL/String.hs | bsd-3-clause | 1,005 | 0 | 9 | 144 | 145 | 88 | 57 | 9 | 1 |
module Input
( initInput
) where
import Control.Monad (when)
import Data.IORef (IORef, modifyIORef)
import qualified Graphics.LWGL as GL
import Graphics.UI.GLFW (Key (..), KeyState (..), ModifierKeys,
Window)
import qualified Graphics... | psandahl/outdoor-terrain | src/Input.hs | bsd-3-clause | 2,651 | 0 | 15 | 827 | 782 | 408 | 374 | 53 | 1 |
module Y2015.Day20 (answer1, answer2) where
import Data.List (nub, sort)
import Data.Numbers.Primes
answer1 :: IO ()
answer1 =
let presents = map numberOfPresents [1 ..]
pairs = zip [1 ..] presents
in print $ fst . head $ dropWhile ((>=) targetPresent . snd) pairs
answer2 :: IO ()
answer2 =
l... | geekingfrog/advent-of-code | src/Y2015/Day20.hs | bsd-3-clause | 960 | 0 | 11 | 224 | 377 | 202 | 175 | 24 | 1 |
-- #hide
module Text.XHtml.Extras where
import Text.XHtml.Internals
import Text.XHtml.Strict.Elements
import Text.XHtml.Strict.Attributes
--
-- * Converting strings to HTML
--
-- | Convert a 'String' to 'Html', converting
-- characters that need to be escaped to HTML entities.
stringToHtml :: String -> Html
strin... | FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Extras.hs | bsd-3-clause | 3,187 | 0 | 12 | 803 | 998 | 544 | 454 | 70 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
( app
) where
import Control.Co... | WraithM/peertrader-backend | src/Site.hs | bsd-3-clause | 8,647 | 0 | 15 | 2,580 | 1,815 | 964 | 851 | 170 | 2 |
{-# LANGUAGE CPP #-}
module Bead.Persistence.Persist (
Persist
, Config(..)
, defaultConfig
, configToPersistConfig
, Interpreter
, createPersistInit
, createPersistInterpreter
, runPersist
, saveUser
, personalInfo
, filterUsers
, loadUser
, updateUser
, doesUserExist
, userDescription... | pgj/bead | src/Bead/Persistence/Persist.hs | bsd-3-clause | 23,919 | 0 | 9 | 3,348 | 3,520 | 2,021 | 1,499 | 389 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- |
-- Module : Simulation.Aivika.Experiment.Chart.TimeSeriesView
-- Copyright : Copyright (c) 2012-2017, David Sorokin <david.sorokin@gmail.com>
-- License : BSD3
-- Maintainer : David Sorokin <david.sorokin@gmail.com>
-- Stability : experimental
-- Tested with: GHC 8... | dsorokin/aivika-experiment-chart | Simulation/Aivika/Experiment/Chart/TimeSeriesView.hs | bsd-3-clause | 14,833 | 0 | 28 | 5,672 | 2,566 | 1,349 | 1,217 | 242 | 6 |
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, ScopedTypeVariables, TypeSynonymInstances, FlexibleContexts, FlexibleInstances, TemplateHaskell, PatternGuards #-}
-- | useful types and simple accessor functions
module Web.MangoPay.Types where
import Control.Applicative
import Control.Exception.Lifted (Exception, ... | prowdsponsor/mangopay | mangopay/src/Web/MangoPay/Types.hs | bsd-3-clause | 15,821 | 0 | 20 | 3,279 | 4,332 | 2,300 | 2,032 | 292 | 6 |
module Aws.S3.Commands.Multipart
where
import Aws.Aws
import Aws.Core
import Aws.S3.Core
import Control.Applicative
import Control.Arrow (second)
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import Crypto... | romanb/aws | Aws/S3/Commands/Multipart.hs | bsd-3-clause | 17,779 | 1 | 19 | 5,141 | 4,026 | 2,147 | 1,879 | -1 | -1 |
-- | This is a template pakej.hs file, provided with
-- the intention to be customized by Pakej users
{-# LANGUAGE OverloadedStrings #-} -- This extension is not required, but users will probably need it
module Main (main) where
-- All Pakej functionality is exported by this single module
import Pakej
-- We need (Cate... | supki/pakej | data/pakej.hs | bsd-3-clause | 555 | 0 | 6 | 94 | 51 | 34 | 17 | 6 | 1 |
module Core.Syntax where
import Core.Value
import Core.Variable
data Expression
= Sequence Expression Value Expression
| Case Variable [(Value, Expression)]
| Application Variable [Value]
| Unit Value
| Store Value
| Fetch Variable (Maybe Offset)
| Update Variable Value
data Declaration
= Declaration... | farre/grin | Core/Syntax.hs | bsd-3-clause | 348 | 0 | 8 | 64 | 101 | 59 | 42 | 13 | 0 |
-- Copyright (c) 2014-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file. An additional grant of patent rights can
-- be found in the PATENTS file.
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Constrain... | xich/Haxl-1 | Haxl/Core/Monad.hs | bsd-3-clause | 27,669 | 0 | 27 | 6,592 | 6,197 | 3,148 | 3,049 | 404 | 5 |
module Week4 where
import Data.List
fun1' :: [Integer] -> Integer
--fun1' xs = foldr (*) 1 $ map((-)2) $ filter (even) xs
fun1' = product . map (subtract 2) .filter even
fun2' :: Integer -> Integer
fun2' = sum
.filter (even)
.takeWhile(/= 1)
.iterate(\n-> if even n then n `div` 2 else 3 * n + ... | zach007/cis194 | src/Week4.hs | bsd-3-clause | 1,852 | 4 | 16 | 510 | 799 | 422 | 377 | 42 | 4 |
-- |
-- Module : Data.Git.Storage.PackIndex
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unix
--
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
module Data.Git.Storage.PackIndex
( PackIndexHeader(..)
, PackIndex(..)... | NicolasDP/hit | Data/Git/Storage/PackIndex.hs | bsd-3-clause | 7,735 | 0 | 18 | 2,246 | 1,788 | 937 | 851 | 129 | 3 |
-- |
-- Support for source code annotation feature of GHC. That is the ANN pragma.
--
-- (c) The University of Glasgow 2006
-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
--
{-# LANGUAGE DeriveFunctor #-}
module Annotations (
-- * Main Annotation data types
Annotation(..), AnnPayload,
... | sdiehl/ghc | compiler/main/Annotations.hs | bsd-3-clause | 5,459 | 0 | 12 | 1,316 | 1,096 | 591 | 505 | 91 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Dampf.Nginx.Types
( Server(..)
, ServerDecl(..)
, pShowServer
, pShowFakeServer
) where
import Data.Text (Text)
import qualified Data.Text as T
import Text.PrettyPrint
newtype Server = Server [ServerDecl]
addDecl :: ServerDecl -> Serv... | filopodia/open | dampf/lib/Dampf/Nginx/Types.hs | mit | 1,957 | 0 | 15 | 504 | 653 | 338 | 315 | 55 | 1 |
{-# LANGUAGE TypeApplications, DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-... | yesodweb/persistent | persistent/test/Database/Persist/TH/SharedPrimaryKeySpec.hs | mit | 4,478 | 0 | 20 | 1,628 | 921 | 443 | 478 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/CreateRealtimeEndpoint.hs | mpl-2.0 | 4,587 | 0 | 11 | 900 | 527 | 318 | 209 | 64 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
--------------------------------------------------------------------
-- |
-- Module : System.Cron.Parser
-- Description : Attoparsec parser for cron formatted intervals
-- Copyright : (c) Michael Xavier 2012
-- License : MIT
--
--... | proger/cron | src/System/Cron/Parser.hs | bsd-2-clause | 5,876 | 0 | 14 | 1,886 | 1,048 | 569 | 479 | 103 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Ef.Type.Set where
import Ef.Type.Bool
import GHC.TypeLits
type family xs ∪ ys where
... | grumply/mop | src/Ef/Type/Set.hs | bsd-3-clause | 934 | 0 | 9 | 244 | 458 | 262 | 196 | 29 | 0 |
-- |
--
-- Functions in this module return well-formed 'Encoding''.
-- Polymorphic variants, which return @'Encoding' a@, return a textual JSON
-- value, so it can be used as both @'Encoding'' 'Text'@ and @'Encoding' = 'Encoding'' 'Value'@.
module Data.Aeson.Encoding
(
-- * Encoding
Encoding
, Encodin... | tolysz/prepare-ghcjs | spec-lts8/aeson/Data/Aeson/Encoding.hs | bsd-3-clause | 1,165 | 0 | 4 | 318 | 190 | 131 | 59 | 34 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.PkgconfigName
( PkgconfigName, unPkgconfigName, mkPkgconfigName
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Utils.ShortText
import qualified... | themoritz/cabal | Cabal/Distribution/Types/PkgconfigName.hs | bsd-3-clause | 1,651 | 0 | 12 | 257 | 260 | 156 | 104 | 26 | 1 |
module PackageTests.BuildDeps.TargetSpecificDeps3.Check where
import Test.HUnit
import PackageTests.PackageTester
import System.FilePath
import Data.List
suite :: Test
suite = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "TargetSpecificDeps3") []
result <- cabal_build spec
ass... | IreneKnapp/Faction | libfaction/tests/PackageTests/BuildDeps/TargetSpecificDeps3/Check.hs | bsd-3-clause | 675 | 0 | 14 | 118 | 147 | 75 | 72 | 14 | 1 |
-- | Windows 7 Taskbar Progress plugin: <http://nsis.sourceforge.net/TaskbarProgress_plug-in>
module Development.NSIS.Plugins.Taskbar(taskbar) where
import Development.NSIS
-- | Enable Windows 7 taskbar plugin, called anywhere.
taskbar :: Action ()
taskbar = onPageShow InstFiles $ plugin "w7tbp" "Start" []
| ndmitchell/nsis | src/Development/NSIS/Plugins/Taskbar.hs | bsd-3-clause | 312 | 0 | 7 | 38 | 51 | 29 | 22 | 4 | 1 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Network/Wai/Handler/Warp/HTTP2.hs" #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Network.Wai.Handler.Warp.HTTP2 (isHTTP2, http2) where
import Control.Concurrent (forkIO, killThread)
import qualified Control.Exception as E
import Control.Monad (wh... | phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.hs | bsd-3-clause | 2,816 | 0 | 13 | 634 | 598 | 326 | 272 | 51 | 3 |
module Feature.QuerySpec where
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Network.Wai.Test (SResponse(simpleHeaders))
import SpecHelper
spec :: Spec
spec =
beforeAll (clearTable "items" >> createItems 15)
. beforeAll (clearTable "nullable_integer" >> createNullInteger)
. before... | acrispin/postgrest | test/Feature/QuerySpec.hs | mit | 5,403 | 0 | 20 | 1,423 | 930 | 494 | 436 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import qualified ListOps as L
import Control.Exception (Exception, throw, evaluate, try)
import Data.Typeable (Typeable)
data FoldlIsStrictException = FoldlIsStrictExce... | pminten/xhaskell | list-ops/list-ops_test.hs | mit | 3,183 | 0 | 14 | 763 | 1,342 | 729 | 613 | 73 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[PrelNames]{Definitions of prelude modules and names}
Nota Bene: all Names defined in here should come from the base package
- ModuleNames for prelude modules,
e.g. pREL_BASE_Name :: ModuleName
- Modules for prelude modules
e... | olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | 102,324 | 0 | 10 | 22,929 | 15,582 | 8,890 | 6,692 | 1,558 | 2 |
-- | List of lightsoff levels. Each level is a list of pairs of positions. Some
-- are defined giving all the positions, others by constraining the list with
-- all board positions.
module Levels where
import LightsOff
levels :: [LightsOffLevel]
levels =
[ [(x,y) | x <- [c1-1..c1+1], y <- [c2-1..c2+1], x == c1 || ... | keera-studios/gtk-helpers | gtk3/examples/lights-off/Levels.hs | bsd-3-clause | 841 | 0 | 13 | 182 | 406 | 240 | 166 | 16 | 1 |
{-# LANGUAGE Safe, FlexibleContexts, CPP #-}
module Cryptol.Utils.Misc where
import MonadLib
import Data.Maybe(fromMaybe)
#if __GLASGOW_HASKELL__ < 710
import Data.Traversable (Traversable, traverse)
#endif
-- | Apply a function to all elements of a container.
-- Returns `Nothing` if nothing changed, and @Just cont... | ntc2/cryptol | src/Cryptol/Utils/Misc.hs | bsd-3-clause | 953 | 0 | 11 | 226 | 311 | 165 | 146 | 16 | 3 |
module A4 where
import B4
import C4
import D4
main :: Tree Int ->Bool
main t = isSame (sumSquares (fringe t))
(sumSquares (B4.myFringe t)+sumSquares (C4.myFringe t))
| kmate/HaRe | old/testing/renaming/A4.hs | bsd-3-clause | 186 | 0 | 11 | 46 | 79 | 41 | 38 | 7 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bits
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICE... | lukexi/ghc | libraries/base/Data/Bits.hs | bsd-3-clause | 15,678 | 0 | 13 | 4,688 | 2,594 | 1,465 | 1,129 | 197 | 2 |
{-# LANGUAGE Unsafe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Typeable.Internal
-- Copyright : (c) The University of Glasgow, CWI 2001--2011
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- The representations of the types T... | mightymoose/liquidhaskell | benchmarks/base-4.5.1.0/Data/Typeable/Internal.hs | bsd-3-clause | 18,347 | 5 | 15 | 3,704 | 3,526 | 1,978 | 1,548 | -1 | -1 |
{- |
Module : Data.KMeans
Copyright : (c) Keegan Carruthers-Smith, 2009
License : BSD 3 Clause
Maintainer : gershomb@gmail.com
Stability : experimental
A simple implementation of the standard k-means clustering algorithm: <http://en.wikipedia.org/wiki/K-means_clustering>. K-means clustering partitio... | mightymoose/liquidhaskell | benchmarks/kmeans-0.1.2/Data/KMeans0.hs | bsd-3-clause | 3,397 | 0 | 11 | 700 | 731 | 398 | 333 | 34 | 1 |
module T9230 where
test :: Monad m => m ()
test = do
return ()
| sdiehl/ghc | testsuite/tests/warnings/should_compile/T9230.hs | bsd-3-clause | 65 | 0 | 8 | 17 | 34 | 17 | 17 | 4 | 1 |
{-# LANGUAGE Trustworthy #-}
module CheckB_Aux (
trace
) where
import qualified Debug.Trace as D
import qualified Data.ByteString.Lazy.Char8 as BS
-- | Allowed declasification
trace :: String -> a -> a
trace s = D.trace $ s ++ show a3
a3 :: BS.ByteString
a3 = BS.take 3 $ BS.repeat 'a'
| urbanslug/ghc | testsuite/tests/safeHaskell/check/CheckB_Aux.hs | bsd-3-clause | 302 | 0 | 7 | 66 | 89 | 52 | 37 | 9 | 1 |
import Anthill (World, step, initial_state)
import Draw (draw_world)
import Graphics.Gloss.Interface.Pure.Simulate
-- kinda settings
speed = 10 -- steps/second
display = InWindow "anthill" (1200, 800) (50, 50)
-- end kinda settings
main = simulate display black speed initial_state draw_world (\_ _ m -> step m)
| AnotherKamila/anthill | main.hs | isc | 316 | 0 | 8 | 48 | 96 | 57 | 39 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Tests.Math.Hclaws.ConservationLaws (
tests
) where
import Test.Tasty (TestTree, testGroup)
import qualified Test.Tasty.QuickCheck as QC
import Test.Tasty.TH (testGroupGenerator)
import qualified Math.Hclaws.ConservationLaws as CL
import qualified Math.Hclaws.Systems.Burger... | mikebenfield/hclaws | test/Tests/Math/Hclaws/ConservationLaws.hs | isc | 376 | 0 | 6 | 46 | 80 | 55 | 25 | 10 | 1 |
{-|
This module contains types that describe SQL statement to be executed by
DBMS.
-}
module Database.Toy.Internal.Language.Command where
import Database.Toy.Internal.Prelude
type TableName = String
type ColumnName = String
type IndexName = String
type Alias = String
data Command = CreateTable TableN... | dancingrobot84/toydb | src/Database/Toy/Internal/Language/Command.hs | mit | 1,962 | 0 | 8 | 638 | 437 | 250 | 187 | 51 | 0 |
main = do
print [1..3]
print $[1..3] ++ [4, 5]
| shigemk2/haskell_abc | renketsu.hs | mit | 51 | 0 | 9 | 14 | 39 | 20 | 19 | 3 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Base.Object
( ObjectType(..)
, Object
, object
, obj
, objMatrl
) where
import Math.Sphere
import Base.Material
import Base.Intersection
import Control.Lens
import Control.Applicative ((<$>))
data Object' a = Object { _obj :: a
, _objMatrl :: Mate... | burz/Rayzer | Base/Object.hs | mit | 801 | 0 | 10 | 234 | 236 | 133 | 103 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module System.Directory.Watchman.Clockspec
( Clockspec
, ClockId(..)
, renderClockspec
, mkNamedCursor
) where
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BC8
import System.Directory.Watchman.BSER
newtype NamedCursor = NamedCur... | bitc/hs-watchman | src/System/Directory/Watchman/Clockspec.hs | mit | 1,017 | 0 | 9 | 177 | 252 | 140 | 112 | 26 | 1 |
{-# LANGUAGE Arrows #-}
module Main where
import Control.Monad.Loops
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Data.IORef
import Data.Maybe
import Data.Serialize
import Data.Time
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import Network.Socket h... | Mattiemus/LaneWars | Server.hs | mit | 5,873 | 1 | 18 | 1,409 | 1,398 | 745 | 653 | 102 | 3 |
module Import (module Export, fromJSONEither) where
import Protolude as Export
import Data.Aeson as Export
import Data.HashMap.Strict as Export (HashMap)
import Data.List.NonEmpty as Export (NonEmpty)
import Data.Vector as Export (Vector)
import Test.QuickC... | seagreen/hjsonschema | src/Import.hs | mit | 617 | 0 | 11 | 202 | 163 | 98 | 65 | 14 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.