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 DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module BLeague.Models.User where
import MyPrelude hiding (get, getAll)
import Data.Aeson (FromJSON, ToJSON (..), Value (..),
toJSON)
import Data.HashMap.Stri... | ardfard/bleague | server/BLeague/Models/User.hs | bsd-3-clause | 2,460 | 0 | 12 | 729 | 724 | 393 | 331 | 62 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Cauterize.Dynamic.Unpack
( dynamicUnpack
, dynamicUnpack'
) where
import Cauterize.Dynamic.Types
import Cauterize.Dynamic.Common
import Control.Exception
import Control.Monad
import Data.Bits
import qualified Data.Map as M
import qualified Data.Text.Lazy as T
import qual... | reiddraper/cauterize | src/Cauterize/Dynamic/Unpack.hs | bsd-3-clause | 4,820 | 0 | 14 | 996 | 1,749 | 896 | 853 | 97 | 13 |
{-# LANGUAGE OverloadedStrings #-}
module Gvty.Serialization where
import Control.Applicative
import Control.Monad.State
import Data.Aeson
import Data.Aeson.Types (Parser)
import Data.Vect.Float
import Data.Vector as V
import Gvty.World
instance FromJSON Vec2 where
parseJSON (Array x) = do
... | coffeecup-winner/gvty | Gvty/Serialization.hs | bsd-3-clause | 1,372 | 0 | 24 | 567 | 355 | 187 | 168 | 31 | 0 |
module Sols.Prob7 (
solution
) where
import Common.Primes (primes)
solution = print (primes !! 10000)
| authentik8/haskell-euler | src/Sols/Prob7.hs | bsd-3-clause | 110 | 0 | 7 | 23 | 36 | 21 | 15 | 4 | 1 |
-- | Module that uses "Process.MapReduce.Multicore" to implement
-- the standard Mapreduce wordcount algorithm.
module Parallel.MapReduce.WordCount (
mapReduce
) where
--import Parallel.MapReduce.Multicore
import Parallel.MapReduce (run,distribute,lift,(>>=))
import Prelude hiding (return,(>>=))
-- ... | Julianporter/Haskell-MapReduce | src/Parallel/MapReduce/WordCount.hs | bsd-3-clause | 976 | 0 | 11 | 250 | 267 | 153 | 114 | 16 | 1 |
module PostgREST.Parsers
-- ( parseGetRequest
-- )
where
import Control.Applicative hiding ((<$>))
import Data.Monoid
import Data.String.Conversions (cs)
import Data.Text (Text)
import Data.Tree
import PostgREST.Types
import ... | motiz88/postgrest | src/PostgREST/Parsers.hs | mit | 3,737 | 0 | 22 | 872 | 1,403 | 738 | 665 | 84 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Dampf.ConfigFile.Types
( -- * Configuration Types
DampfProfiles(..)
, HasDampfProfiles(..)
, DampfConfig(..)
, HasDampfConfig(..)
, PostgresConfig(..)
,... | diffusionkinetics/open | dampf/lib/Dampf/ConfigFile/Types.hs | mit | 1,673 | 0 | 15 | 475 | 414 | 239 | 175 | 46 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Yi.Process (runProgCommand, runShellCommand, shellFileName,
createSubprocess, readAvailable, SubprocessInfo(..), SubprocessId) where
import Control.Exc (orException)
import qualified Data.ListLike... | siddhanathan/yi | yi-core/src/Yi/Process.hs | gpl-2.0 | 4,282 | 0 | 14 | 1,051 | 778 | 437 | 341 | 64 | 2 |
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PackageImports #-}
{-
Copyright 2016 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain... | nomeata/codeworld | codeworld-base/src/Internal/Color.hs | apache-2.0 | 3,513 | 0 | 12 | 713 | 993 | 556 | 437 | 67 | 1 |
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2006
--
-- The purpose of this module is to transform an HsExpr into a CoreExpr which
-- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the
-- input HsExpr. We do this in the DsM monad... | pparkkin/eta | compiler/ETA/DeSugar/DsMeta.hs | bsd-3-clause | 128,511 | 0 | 3 | 35,123 | 2,508 | 2,506 | 2 | 1 | 0 |
{-# LANGUAGE TupleSections #-}
foo = do
liftIO $ atomicModifyIORef ciTokens ((,()) . f)
liftIO $ atomicModifyIORef ciTokens (((),) . f)
liftIO $ atomicModifyIORef ciTokens ((,) . f)
-- | Make bilateral dictionary from PoliMorf.
mkPoli :: [P.Entry] -> Poli
mkPoli = mkBila . map ((,,(),,()) <$> P.base <*> P.pos <... | mpickering/ghc-exactprint | tests/examples/ghc710/TupleSections.hs | bsd-3-clause | 759 | 3 | 12 | 131 | 350 | 207 | 143 | 15 | 1 |
module Graphics.Vty.Widgets.Vim
( VimBindings(..)
) where
import Graphics.Vty.Widgets.All
import Graphics.Vty.Widgets.HeaderList
import Graphics.Vty
class VimBindings a where
addVimBindings :: (Widget a) -> IO ()
instance VimBindings (HeaderList a b) where
addVimBindings list = do
list `onKeyPr... | hpdeifel/dbus-browser | src/Graphics/Vty/Widgets/Vim.hs | bsd-3-clause | 841 | 0 | 15 | 199 | 289 | 143 | 146 | 21 | 0 |
{-# LANGUAGE Haskell98, BangPatterns #-}
{-# LINE 1 "Data/ByteString/Search/DFA.hs" #-}
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : Data.ByteString.Search.DFA
-- Copyright : Daniel Fischer
-- Licence : BSD3
-- Maintainer : Daniel Fischer <daniel.is.fischer@googlemail.com>
-- Stability : ... | phischu/fragnix | tests/packages/scotty/Data.ByteString.Search.DFA.hs | bsd-3-clause | 12,753 | 0 | 26 | 3,987 | 1,972 | 1,056 | 916 | 154 | 4 |
{-# LANGUAGE ViewPatterns #-}
{-
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 your option... | peter-fogg/pardoc | src/Text/Pandoc/Readers/Txt2Tags.hs | gpl-2.0 | 17,827 | 0 | 19 | 4,061 | 5,642 | 2,863 | 2,779 | 409 | 3 |
module Main (main) where
import Parser (parse)
import System.IO (hPutStrLn, stderr)
main :: IO ()
main = do x <- getContents
case parse x of
Left e -> hPutStrLn stderr $ "Failed with: " ++ e
Right t -> print t
| PhilThomas/happy | examples/igloo/Foo.hs | bsd-2-clause | 252 | 0 | 12 | 83 | 94 | 48 | 46 | 8 | 2 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, FlexibleContexts #-}
import TensorQQ
main :: IO ()
main = do
let x = [1, 2, 3]
i = 1
print [tens|x_i|]
| tanakh/Peggy | example/Tensor.hs | bsd-3-clause | 157 | 0 | 10 | 37 | 53 | 30 | 23 | 7 | 1 |
module Main (main) where
import Data.List (genericLength)
import Data.Maybe (catMaybes)
import System.Directory (doesFileExist)
import System.Exit (exitFailure, exitSuccess)
import System.Process (readProcess)
import Text.Regex (matchRegex, mkRegex)
average :: (Fractional a, Real b) => [b] -> a
average xs = realToFra... | danplubell/tzworld-api | test-suite/HPC.hs | mit | 1,156 | 0 | 11 | 229 | 348 | 184 | 164 | 29 | 2 |
<?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="pt-BR">
<title>Directory List v1.0</title>
<maps>
<homeID>directorylistv1</homeID>
<map... | kingthorin/zap-extensions | addOns/directorylistv1/src/main/javahelp/help_pt_BR/helpset_pt_BR.hs | apache-2.0 | 976 | 78 | 66 | 157 | 412 | 209 | 203 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Get information on modules, expreesions, and identifiers
module GHCi.UI.Info
( ModInfo(..)
, SpanInfo(..)
, spanInfoFromRealSrcSpan
, collectInfo
... | snoyberg/ghc | ghc/GHCi/UI/Info.hs | bsd-3-clause | 13,983 | 1 | 21 | 4,162 | 3,407 | 1,739 | 1,668 | 265 | 5 |
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable #-}
#endif
-- | When you've caught all the exceptions that can be handled safely,
-- this is what you're left with.
--
-- > runEitherIO . fromIO ≡ id
--
-- It is intended that you use qualified imports with this library.
--
-- > import Un... | singpolyma/unexceptionalio | UnexceptionalIO.hs | isc | 10,799 | 134 | 28 | 2,074 | 2,458 | 1,304 | 1,154 | 43 | 1 |
module Text.Typeical.Gramma ( Gramma()
, fromList
, empty
, asMap
, getExpression
, extend
, symbols
... | kalhauge/typeical | src/Text/Typeical/Gramma.hs | mit | 2,047 | 0 | 8 | 925 | 418 | 249 | 169 | 44 | 1 |
{-# LANGUAGE CPP #-}
module Data.HTTPSEverywhere.Rules.Internal (
getRulesetsMatching,
havingRulesThatTrigger,
havingCookieRulesThatTrigger,
setSecureFlag,
#ifdef TEST
hasTargetMatching,
hasTriggeringRuleOn,
hasExclusionMatching
#endif
) where
import Prelude hiding (readFile, filter)
import Control.Appl... | fmap/https-everywhere-rules | src/Data/HTTPSEverywhere/Rules/Internal.hs | mit | 2,640 | 0 | 12 | 443 | 759 | 432 | 327 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module S where
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Data.Monoid
data S n a = S (n a) a
deriving (Eq, Ord, Show)
{-
nickager: I’m trying to understand this type: “data S n a = S (n a) a”
nickager: is (n a) applying function n to parameter a?
PiDelport: n... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter21/Exercises/src/S.hs | mit | 2,200 | 0 | 8 | 435 | 339 | 178 | 161 | 18 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
module Hpack.Convert where
import Data.Char
import Data.Monoid
import Prelude ()
import Prelude.Compat
import Data.List.Split ... | yamadapc/hpack-convert | src/Hpack/Convert.hs | mit | 13,953 | 0 | 17 | 3,912 | 3,153 | 1,669 | 1,484 | 216 | 4 |
{-|
Module : Language.GoLite.Lexer
Description : Lexer combinators for the GoLite language.
Copyright : (c) Jacob Errington and Frederic Lafrance, 2016
License : MIT
Maintainer : goto@mail.jerrington.me
Stability : experimental
-}
module Language.GoLite.Lexer
( module Language.GoLite.Lexer.Core
, module ... | djeik/goto | libgoto/Language/GoLite/Lexer.hs | mit | 654 | 0 | 5 | 76 | 85 | 62 | 23 | 11 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Lens
import Control.Monad
import Data.Char
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Time
import System.Environment
import Text.Printf
import SpaceWeather.Format
import SpaceWeather.TimeLine
impo... | nushio3/UFCORIN | exe-src/aia2timebin.hs | mit | 1,241 | 0 | 17 | 327 | 408 | 212 | 196 | 37 | 1 |
module Types.Commands where
import Data.Romefile
import Data.Carthage.TargetPlatform
data RomeCommand = Upload RomeUDCPayload
| Download RomeUDCPayload
| List RomeListPayload
| Utils RomeUtilsPayload
deriving (Show, Eq)
dat... | blender/Rome | src/Types/Commands.hs | mit | 2,882 | 0 | 9 | 1,442 | 408 | 249 | 159 | 45 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- | This module contains everything that you need to support
-- server-sent events in Yesod applications.
module Yesod.EventSource
( RepEventSource
, repEventSource
, ioToRepEventSource
, EventSourcePolyfill(..)
) where
import Blaze.ByteString.Builder (Builder)
import Cont... | piyush-kurur/yesod | yesod-eventsource/Yesod/EventSource.hs | mit | 3,886 | 0 | 20 | 830 | 690 | 377 | 313 | 57 | 4 |
-- |
-- The first HW assignment.
module HW1.CreditCard (toDigits, toDigitsRev, doubleEveryOther, sumDigits, validate) where
import Data.Char
-- |
-- Returns a list of digits.
--
-- >>> toDigits 1234
-- [1,2,3,4]
--
-- >>> toDigits 0
-- []
--
-- >>> toDigits (-17)
-- []
toDigits :: Integer -> [Integer]
-- |
-- Returns... | mulchy/practice | src/HW1/CreditCard.hs | mit | 1,966 | 0 | 13 | 374 | 523 | 303 | 220 | 29 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLTableColElement
(js_setAlign, setAlign, js_getAlign, getAlign, js_setCh, setCh,
js_getCh, getCh, js_setChOff, setChOff, js_getChOff, getChOff,
js_setSpan, setSpan, js_getSpan, getSpan, j... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/HTMLTableColElement.hs | mit | 6,314 | 84 | 11 | 949 | 1,404 | 770 | 634 | 99 | 1 |
module Raindrops (convert) where
convert :: Int -> String
convert input =
[result | (appliesTo, result) <- rules, appliesTo input]
`concatOrIfEmpty`
show input
concatOrIfEmpty :: [String] -> String -> String
concatOrIfEmpty [] defaultValue = defaultValue
concatOrIfEmpty list _ = concat list
rules :: [(Int -> B... | enolive/exercism | haskell/raindrops/src/Raindrops.hs | mit | 519 | 0 | 9 | 94 | 192 | 107 | 85 | 16 | 1 |
module TreeStuff ( Tree ()
, emptyTree
, insertChar
, insert
, insertStrings
, makeTree
, findChar
, findString
) where
--------------------
-- Global Imports --
import Control.Lens
i... | crockeo/treestuff | trie_in_hs/src/TreeStuff.hs | mit | 2,680 | 0 | 10 | 751 | 773 | 419 | 354 | 60 | 1 |
{-# LANGUAGE DataKinds #-}
-- | Finding files.
module Filesystem.Path.Find where
import Data.List
import Data.Maybe
import Filesystem
import Filesystem.Loc as FL
import Prelude hiding (FilePath)
-- | Find the location of a file matching the given predicate.
findFileUp :: Loc Absolute Dir -- ^ Start h... | fpco/stackage-view | server/Filesystem/Path/Find.hs | mit | 1,063 | 0 | 15 | 374 | 232 | 121 | 111 | 24 | 4 |
module Piece (Piece(..), Color(..), Shape(..),
Height(..), Top(..), haveCommonProperty,
printPiece, readPiece) where
import Data.Char
import Data.List
data Color = White | Black
deriving (Show, Eq)
data Shape = Circular | Square
deriving (Show, Eq)
data Height = Sho... | nablaa/hquarto | src/Piece.hs | gpl-2.0 | 2,913 | 0 | 13 | 648 | 1,102 | 598 | 504 | 63 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module Blaaargh.Internal.Exception
( BlaaarghException(..)
, blaaarghExceptionMsg )
where
import Control.Exception
import Data.Typeable
import Prelude hiding (catch)
-- | 'BlaaarghException' is the exception type thrown when Blaaargh encounters
-- a... | gregorycollins/blaaargh | src/Blaaargh/Internal/Exception.hs | gpl-2.0 | 603 | 0 | 7 | 104 | 92 | 55 | 37 | 12 | 1 |
module Factor where
-- Returns whether n is a factor of p
-- Time: O(1), Space: O(1)
isFactorOf :: Integer -> Integer -> Bool
isFactorOf n p = p `rem` n == 0
| NorfairKing/project-euler | lib/haskell/Factor.hs | gpl-2.0 | 159 | 0 | 6 | 34 | 39 | 23 | 16 | 3 | 1 |
sumOfSquare :: Int -> Int
sumOfSquare x = sum(map (^2) [1..x])
squareOfSum :: Int -> Int
squareOfSum x = (sum [1..x])^2
n = 100
main = print (squareOfSum n - sumOfSquare n)
| garykrige/project_euler | Haskell/euler/euler6.hs | gpl-2.0 | 175 | 0 | 8 | 34 | 96 | 50 | 46 | 6 | 1 |
module Crepuscolo.Recognizer.C
( recognizer
) where
import System.FilePath (takeExtension)
import Text.Regex.PCRE ((=~))
import qualified Crepuscolo.Recognize.DSL as DSL
data Recognizer = C deriving (Show)
instance DSL.Recognizer Recognizer where
recognize C path =
case takeExtension path of
... | meh/crepuscolo | src/Crepuscolo/Recognizer/C.hs | gpl-3.0 | 1,048 | 0 | 13 | 365 | 291 | 151 | 140 | 28 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Memory/MemoryWorld/OutputState.hs | gpl-3.0 | 1,143 | 0 | 5 | 180 | 71 | 60 | 11 | 2 | 0 |
-- tree construction from node string
data Tree a = Node a [Tree a] deriving Show
p70 :: String -> Tree Char
p70 (x:xs) = Node x (fst (p70' xs)) where
p70' (x:xs)
| x == '^' = ([], xs)
| otherwise = (Node x tree0 : trees1, rest1) where
(tree0, rest0) =... | yalpul/CENG242 | H99/70-73/p70.hs | gpl-3.0 | 383 | 0 | 10 | 153 | 158 | 82 | 76 | 8 | 1 |
{-
# This file is part of matrix-arbitrary. #
# #
# matrix-arbitrary is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by ... | weissi/matrix-arbitrary | src/Data/Matrix/Internal.hs | gpl-3.0 | 3,784 | 2 | 15 | 1,650 | 960 | 514 | 446 | 58 | 2 |
-- The account register screen, showing transactions in an account, like hledger-web's register.
{-# LANGUAGE OverloadedStrings, FlexibleContexts, RecordWildCards #-}
module Hledger.UI.RegisterScreen
(registerScreen
,rsHandle
,rsSetAccount
,rsCenterAndContinue
)
where
import Control.Monad
import Control.Monad.I... | ony/hledger | hledger-ui/Hledger/UI/RegisterScreen.hs | gpl-3.0 | 19,053 | 42 | 46 | 5,793 | 4,331 | 2,337 | 1,994 | 283 | 44 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-----------------------------------------------------------------
(c) 2008-2009 Markus Dittrich,
Pittsburgh Supercomputing Center &
Carnegie Mellon University
This program is free software; you can redistribute it
and/or modify it under the terms of th... | haskelladdict/simgi | src/ExtraFunctions.hs | gpl-3.0 | 6,288 | 0 | 15 | 1,777 | 1,229 | 674 | 555 | 83 | 3 |
module Hob.Command.FocusCommandEntry (
toggleFocusOnCommandEntryCommandHandler,
focusActiveEditorAndExitLastModeCommandHandler,
focusCommandEntryCommandHandler,
) where
import Control.Monad.Reader
import Graphics.UI.Gtk
import Hob.Context
import Hob.Context.UiContext
import Hob.Control
import Hob.Ui.E... | svalaskevicius/hob | src/lib/Hob/Command/FocusCommandEntry.hs | gpl-3.0 | 1,509 | 0 | 12 | 230 | 305 | 156 | 149 | 36 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Circuits (
-- wires
Wire, newWire, query, set,
-- gates
newAnd, newOr, newNot, newNand, newNor, newXor
) where
import Data.IORef (IORef, newIORef, readIORef, modifyIORef)
import Control.Monad (forM_)
{- Wire -}
-- consists of an IORef holding its current value and ... | jgraydus/circuits | src/Circuits.hs | gpl-3.0 | 2,720 | 0 | 13 | 696 | 1,090 | 557 | 533 | 82 | 1 |
module Emyrald.Eval (evalExpr{-, evalProg-}) where
import Emyrald.Error (Error (..))
import Emyrald.Expr (Expr (..), Env)
-- | The function 'evalExpr' evaluates an 'Expr'
-- within the global context of the provided
-- 'Env'.
evalExpr :: Env -> Expr -> Either Error Expr
-- self evaluating expressions
evalExpr _ ... | Kwarrtz/Emyrald | src/Emyrald/Eval.hs | gpl-3.0 | 1,198 | 0 | 12 | 277 | 551 | 280 | 271 | 17 | 1 |
module MirakelBot.Message.Send (send,sendText,send',answer) where
import Control.Lens
import Control.Monad.Reader
import qualified Data.ByteString.Char8 as BC
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import MirakelBot.Handlers
import ... | azapps/mirakelbot | src/MirakelBot/Message/Send.hs | gpl-3.0 | 1,468 | 0 | 11 | 367 | 515 | 263 | 252 | 40 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Schemas/TestIAMPermissions.hs | mpl-2.0 | 6,568 | 0 | 16 | 1,382 | 792 | 467 | 325 | 122 | 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.Games.Types... | brendanhay/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | 163,440 | 0 | 23 | 40,334 | 32,526 | 18,654 | 13,872 | 3,573 | 1 |
{-# 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/Delete.hs | mpl-2.0 | 5,343 | 0 | 15 | 1,109 | 700 | 410 | 290 | 107 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Insert.hs | mpl-2.0 | 3,445 | 0 | 15 | 782 | 395 | 238 | 157 | 64 | 1 |
#!/usr/bin/env runhaskell
import System (system, ExitCode)
import Distribution.Simple
import Distribution.PackageDescription
-- for the argument types of the `postInst' hook
import Distribution.Simple.LocalBuildInfo
main = defaultMain
| jelmer/tdb-hs | Setup.hs | lgpl-3.0 | 239 | 0 | 5 | 28 | 35 | 22 | 13 | 5 | 1 |
module Preferences where
import Character
import System.Random
data Color
= Red
| Blue
| Green
| Yellow
| Black
| Gray
| White
| Magenta
| Orange
| Purple
| Cyan
| Viridian
| Pink
| Beige
| Brown
deriving (Show, Eq, Enum)
genColor :: Int -> Color
genColor x = toEnum x
data Appreciati... | lboklin/CharacterGenerator | src/Preferences.hs | lgpl-3.0 | 3,263 | 0 | 11 | 996 | 982 | 565 | 417 | 123 | 1 |
import Data.List
replace :: String -> String -> String -> String
replace _ _ [] = []
replace patA patB str@(s:sx) =
if isPrefixOf patA str
then replace patA patB (patB ++ (drop (length patA) str))
else s:(replace patA patB sx)
ans :: [String] -> [String]
ans inputs =
map (replace "Hoshino" "Hoshina") inputs
... | a143753/AOJ | 0101.hs | apache-2.0 | 411 | 0 | 12 | 98 | 199 | 100 | 99 | 15 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Glider.NLP.IndexTest
Copyright : Copyright (C) 2013-2016 Krzysztof Langner
License : BSD3
Maintainer : Krzysztof Langner <klangner@gmail.com>
Stability : alpha
Portability : portable
-}
module Glider.NLP.StatisticsSpec (spec) where
import Test.Hspec
import Glider.NLP.... | klangner/glider-nlp | test-src/Glider/NLP/StatisticsSpec.hs | bsd-2-clause | 715 | 0 | 12 | 126 | 176 | 97 | 79 | 12 | 1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}
---------------------------------... | conal/shaped-types | src/ShapedTypes/Sized.hs | bsd-3-clause | 2,038 | 0 | 9 | 395 | 363 | 209 | 154 | 30 | 1 |
{-# LANGUAGE PackageImports #-}
module Control.Category (module M) where
import "base" Control.Category as M
| silkapp/base-noprelude | src/Control/Category.hs | bsd-3-clause | 114 | 0 | 4 | 18 | 21 | 15 | 6 | 3 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Description: Represent and operate on retcond documents.
--
-- A 'Document' is, essentially, a JSON 'Value' together with some metadata
-- describing its type, system of origin, etc.
module Retcon.Document (
Document(..),
documentEntity... | anchor/retcon | lib/Retcon/Document.hs | bsd-3-clause | 2,514 | 0 | 16 | 627 | 477 | 255 | 222 | 54 | 5 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Tem... | ezrosent/s-explore | src/Recur3.hs | bsd-3-clause | 5,322 | 0 | 24 | 1,564 | 1,807 | 957 | 850 | 81 | 4 |
{-# LANGUAGE CPP #-}
-- -----------------------------------------------------------------------------
--
-- Main.hs, part of Alex
--
-- (c) Chris Dornan 1995-2000, Simon Marlow 2003
--
-- ----------------------------------------------------------------------------}
module Main (main) where
import AbsSyn
import CharS... | Teino1978-Corp/Teino1978-Corp-alex | src/Main.hs | bsd-3-clause | 13,162 | 0 | 17 | 3,645 | 3,485 | 1,793 | 1,692 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.Maybe (fromMaybe)
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import Text.Megaparsec
import Text.Megaparsec.Text
import System.Environment (getArgs)
i... | ibabushkin/morgue | app/ICalImport.hs | bsd-3-clause | 2,511 | 0 | 19 | 610 | 817 | 389 | 428 | 83 | 2 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module Data.Strict.Drive where
import Lib
infixl 1 >>~, >~>
class (Functor f, Functor g) => Absorb f g where
(>>~) :: f a -> (a -> g b) -> g b
a >>~ f = abjoin $ fmap f a
{-# INLINE (>>~) #-}
abjoin :: f (g a) -> g a
abjoin a = a >>~ id
{-# INLIN... | effectfully/prefolds | src/Data/Strict/Drive.hs | bsd-3-clause | 6,921 | 0 | 11 | 1,567 | 2,559 | 1,294 | 1,265 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-- |
-- Module : Crypto.MAC.Siphash48
-- Copyright : (c) Austin Seipp 2013
-- License : BSD3
--
-- Maintainer : aseipp@pobox.com
-- Stability : experimental
-- Portability : portable
--
-- This module provides @siphash48@ ... | thoughtpolice/hs-nacl | src/Crypto/MAC/Siphash48.hs | bsd-3-clause | 4,610 | 0 | 16 | 1,122 | 563 | 337 | 226 | -1 | -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.Ordinal.NB.Corpus
( corpus ) where
import Prelude
import D... | facebookincubator/duckling | Duckling/Ordinal/NB/Corpus.hs | bsd-3-clause | 881 | 0 | 9 | 253 | 160 | 97 | 63 | 23 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module ParserSpecs
(tests
) where
import Test.Framework (testGroup, Test)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import qualified Parser as P
import qualified Lexer as L
import Arbitrary
tests :: Test
tests = testGroup "Parser tests" [
testProp... | batkot/haskell-bf | test/ParserSpecs.hs | bsd-3-clause | 3,080 | 0 | 12 | 569 | 848 | 447 | 401 | 62 | 3 |
module TwiceM where
{-@ LIQUID "--short-names" @-}
import RIO
{-@ appM :: forall <pre :: World -> Prop, post :: World -> b -> World -> Prop>.
(a -> RIO <pre, post> b) -> a -> RIO <pre, post> b @-}
appM :: (a -> RIO b) -> a -> RIO b
appM f x = f x
{-@
twiceM :: forall < pre :: World -> Prop
... | abakst/liquidhaskell | benchmarks/icfp15/pos/TwiceM.hs | bsd-3-clause | 1,146 | 0 | 18 | 352 | 212 | 111 | 101 | 10 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
-- This program must be called with GHC's libdir as the single command line
-- argument.
module Main where
-- import Data.Generics
import Data.Data hiding (Fixity)
import Data.List
import System.IO
import GHC
import B... | sdiehl/ghc | testsuite/tests/ghc-api/annotations/t11430.hs | bsd-3-clause | 3,875 | 1 | 20 | 1,264 | 1,168 | 632 | 536 | 85 | 6 |
{-# LANGUAGE DeriveGeneric #-}
module Data.SourceMap (
SourceMap(..)
) where
import Data.Aeson (ToJSON, FromJSON, encode, fromJSON, Result(..))
import GHC.Generics (Generic)
import Data.Attoparsec.Lazy (parse, Result(..), many1)
import Control.Monad (forM_)
import Data.Text (Text)
data SourceMap = SourceMap {
... | ghcjs/source-map | src/Data/SourceMap.hs | bsd-3-clause | 552 | 0 | 9 | 112 | 173 | 107 | 66 | 17 | 0 |
{-# OPTIONS_HADDOCK hide #-}
module ForSyDe.Atom.Skel.FastVector.Lib where
import ForSyDe.Atom
import Data.Maybe
import Control.Applicative
import Data.List.Split
import qualified Data.List as L
import Prelude hiding (take, drop, length, zip, unzip)
-- | In this library 'Vector' is just a wrapper around a list.
new... | forsyde/forsyde-atom | src/ForSyDe/Atom/Skel/FastVector/Lib.hs | bsd-3-clause | 6,049 | 0 | 11 | 1,367 | 1,362 | 732 | 630 | 66 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Network.Protocol.Snmp.AgentX.MIBTree.MIBTree
( initModule
, registerFullTree
, unregisterFullTree
, findOne
, findMany
, findNext
, findClosest
, findManyNext
, regWrapper
, askTree
, regByDiff
)
where
import Data.Maybe
import Control.Appl... | chemist/agentx | src/Network/Protocol/Snmp/AgentX/MIBTree/MIBTree.hs | bsd-3-clause | 9,617 | 0 | 20 | 2,891 | 3,458 | 1,748 | 1,710 | 202 | 7 |
{-# language CPP #-}
-- | = Name
--
-- VK_FUCHSIA_buffer_collection - device extension
--
-- == VK_FUCHSIA_buffer_collection
--
-- [__Name String__]
-- @VK_FUCHSIA_buffer_collection@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 367
--
-- [__Revision__]
-- 2
-... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_FUCHSIA_buffer_collection.hs | bsd-3-clause | 88,463 | 1 | 19 | 16,521 | 11,984 | 6,922 | 5,062 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
-- | Module for command-line utilites, parsers and convenient handlers.
module Pos.Client.CLI.Util
( attackTypeParser
, attackTargetParser
, defaultLoggerConfig
, readLoggerConfig
, stakeholderIdParser
) where
import Universum
impo... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Client/CLI/Util.hs | mit | 1,697 | 0 | 10 | 347 | 340 | 194 | 146 | 34 | 1 |
-- Currently this configuration has some problems!
import qualified Data.Map as M
-- XMonad
import XMonad
-- XMonad contrib
import qualified XMonad.StackSet as W
-- For cycling screens
import qualified XMonad.Actions.CycleWS as CWS
-- For grid selection
import XMonad.Actions.GridSelect
-- For launching xmobar
impo... | j-a-m-l/.dot | _legacy_/xmonad/xmonad.hs | mit | 5,399 | 21 | 15 | 1,241 | 1,081 | 635 | 446 | 67 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module State.App where
import Control.Exception
import Control.Monad.Trans.Class
import State.Error
import State.Machine
import State.Trans.Machine
import State.Output
import State.Tape
newtype App m a = App {
runApp :: MachineT m a
} deriving (Functor
, Appl... | BakerSmithA/Metal | src/State/App.hs | mit | 802 | 0 | 9 | 175 | 235 | 126 | 109 | 23 | 1 |
import System.Environment
import Text.Printf
import Data.List
main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
{-- snippet fold --}
mean :: [Double] -> Double
mean xs = s / fromIntegral n
where
(n, s) = foldl' k (0, 0) xs
k (n, s) x = n `seq` s `seq` (n+1, s+x)
{-- /snippet f... | binesiyu/ifl | examples/ch25/D.hs | mit | 328 | 0 | 10 | 83 | 157 | 87 | 70 | 10 | 1 |
{- DATX02-17-26, automated assessment of imperative programs.
- Copyright, 2017, see AUTHORS.md.
-
- 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... | DATX02-17-26/DATX02-17-26 | libsrc/Norm/IfElseEmpty.hs | gpl-2.0 | 3,101 | 0 | 13 | 497 | 307 | 173 | 134 | 29 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-directconnect/gen/Network/AWS/DirectConnect/DeleteInterconnect.hs | mpl-2.0 | 4,463 | 0 | 13 | 936 | 582 | 348 | 234 | 78 | 1 |
-- Repro for https://github.com/lambdacube3d/lambdacube-gl/issues/10
-- Usage:
-- ghc -threaded -eventlog -rtsopts -isrc --make LCstress.hs && ./LCstress +RTS -T -ls -N2
--
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs ... | deepfire/mood | tests/LCstress.hs | agpl-3.0 | 9,027 | 4 | 20 | 2,605 | 2,303 | 1,270 | 1,033 | -1 | -1 |
where
foo :: Monad m
=> Functor m
=> MonadIO m
-> Int
| ruchee/vimrc | vimfiles/bundle/vim-haskell/tests/indent/test016/test.hs | mit | 79 | 5 | 3 | 37 | 25 | 13 | 12 | -1 | -1 |
module Vectorise.Monad.Local
( readLEnv
, setLEnv
, updLEnv
, localV
, closedV
, getBindName
, inBind
, lookupTyVarPA
, defLocalTyVar
, defLocalTyVarWithPA
, localTyVars
)
where
import GhcPrelude
import Vectorise.Monad.Base
import Vectorise.Env
import CoreSyn
import Name
import VarEnv
import ... | ezyang/ghc | compiler/vectorise/Vectorise/Monad/Local.hs | bsd-3-clause | 2,558 | 0 | 13 | 563 | 680 | 365 | 315 | 60 | 1 |
<?xml version='1.0' encoding='ISO-8859-1'?>
<!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">
<title>msopentech-tools-help.2</title>
<maps>
<homeID></homeID>
<mapref l... | guiling/msopentech-tools-for-intellij | help/msopentech-tools-help/helpset.hs | apache-2.0 | 680 | 56 | 44 | 92 | 292 | 148 | 144 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
{-| Combines the construction of RPC server components and their Python stubs.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitte... | apyrgio/ganeti | src/Ganeti/THH/PyRPC.hs | bsd-2-clause | 7,733 | 0 | 16 | 2,033 | 1,426 | 732 | 694 | 110 | 7 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Yi
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.Ex.Commands.Help (parse) where
import ... | siddhanathan/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Help.hs | gpl-2.0 | 1,345 | 0 | 14 | 445 | 299 | 182 | 117 | 23 | 2 |
module CertCmd where
import PFE_Certs(CertType,QCertName(..))
import PrettyPrint(Printable(..),pp)
data CertCmd
= ValidateCert QCertName
| RemoveCert QCertName
| NewCert CertType QCertName String
| NewCertAll CertType String{-ModuleName-}
| TodoCert
deriving (Eq,Show)
instance Printable CertCmd wher... | forste/haReFork | tools/pfe/Browser/CertCmd.hs | bsd-3-clause | 942 | 0 | 9 | 155 | 346 | 183 | 163 | 23 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Bug where
import Language.Haskell.TH
main :: IO ()
main = putStrLn $(recover (stringE "reifyFixity failed")
(do foo <- newName "foo"
_ <- reifyFixity foo
stringE "reifyFixity successful"))
| sdiehl/ghc | testsuite/tests/th/T15481.hs | bsd-3-clause | 317 | 0 | 13 | 120 | 73 | 36 | 37 | 8 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS -Wall -Werror #-}
module InferAssert where
import AnnotatedExpr
import Control.Applicative ((<$>), Applicative(..))
import Control.Lens.Operators
import Control.Monad (void)
import Control.Monad.Trans.State (runStateT, runState)
import InferWrappers
import Lamdu.Data.Arbitrary (... | sinelaw/lamdu | test/InferAssert.hs | gpl-3.0 | 5,108 | 0 | 14 | 946 | 1,379 | 748 | 631 | -1 | -1 |
-- See Trac #1221
module ShouldFail where
a :: Num a => (Bool -> [a]) -> [a]
a x = x True ++ [1]
y :: b -> ()
y = const ()
-- Typechecks ok
b = a (const [2])
-- This one had an uninformative error message
c = a y
-- More informative
d = a ()
| siddhanathan/ghc | testsuite/tests/typecheck/should_fail/tcfail178.hs | bsd-3-clause | 249 | 0 | 9 | 67 | 111 | 61 | 50 | 8 | 1 |
-- !!! a very simple test of class and instance declarations
module ShouldSucceed where
class H a where
op1 :: a -> a -> a
instance H Bool where
op1 x y = y
f :: Bool -> Int -> Bool
f x y = op1 x x
| urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc041.hs | bsd-3-clause | 204 | 0 | 8 | 54 | 73 | 38 | 35 | 7 | 1 |
module Quote (agpl, agpl_f, aparse) where
import Parser
import CodeGen
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Agpl_syntax
import Debug.Trace
agpl :: QuasiQuoter
agpl = QuasiQuoter undefined undefined undefined aparse
aparse :: String -> Q [Dec]
aparse s = (makeAGPLDecs (parseGame s))
agpl_... | matthew-eads/agpl | Quote.hs | isc | 361 | 0 | 8 | 49 | 109 | 63 | 46 | 13 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Jot.Rope
( JotString
, null
, length
, newLines
, singleton
, toLazyByteString
, empty
, append
, concat
, replicate
, splitAt
, slice
, splice
, copy
... | tldrlol/jot | src/Jot/Rope.hs | isc | 4,396 | 0 | 20 | 1,146 | 1,597 | 873 | 724 | 128 | 4 |
{-# LANGUAGE TemplateHaskell #-}
import Memory
import Thought
import Control.Arrow
import Control.Category
import Control.Lens
import Data.Char
import Data.Maybe
import Prelude hiding ((.), id)
import System.Random
getLoop :: Thought IO String (Maybe String) -> IO ()
getLoop thought = do
(nextVal, newThought) <-... | edwardwas/memory | example/rockPaperScissors/Main.hs | mit | 1,789 | 0 | 12 | 474 | 661 | 336 | 325 | 55 | 3 |
module Coroutine where
import Prelude hiding (id, (.))
import Control.Applicative
import Control.Arrow
import Control.Category
newtype Coroutine i o = Coroutine { runC :: i -> (o, Coroutine i o) }
instance Functor (Coroutine i) where
fmap f co = Coroutine $ \i ->
let (o, co') = runC co i
... | sgrif/haskell-game | Coroutine.hs | mit | 1,120 | 0 | 12 | 386 | 525 | 278 | 247 | 30 | 1 |
module Rebase.Data.Biapplicative
(
module Data.Biapplicative
)
where
import Data.Biapplicative
| nikita-volkov/rebase | library/Rebase/Data/Biapplicative.hs | mit | 98 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Network.HTTP.Server.Logger
-- Copyright : (c) Galois, Inc. 2007, 2008
-- License : BSD3
--
-- Maintainer : diatchki@galois.com
-- Stability : provisional
-- Portability :
--
module Network.HTTP.Server.Logger... | GaloisInc/http-server | Network/HTTP/Server/Logger.hs | mit | 2,950 | 0 | 14 | 863 | 866 | 476 | 390 | 58 | 6 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.OverconstrainedErrorEvent
(newOverconstrainedErrorEvent, getError, getErrorUnsafe,
getErrorUnchecked, Ove... | ghcjs/jsaddle-dom | src/JSDOM/Generated/OverconstrainedErrorEvent.hs | mit | 2,761 | 0 | 12 | 471 | 562 | 336 | 226 | -1 | -1 |
module ETL (transform) where
import Data.Char (toLower)
import Data.Map (Map, empty, foldrWithKey, insert)
transform :: Map Int [String] -> Map String Int
transform = foldrWithKey f empty where
f score letters m = foldl g m (zip letters (repeat score))
g m (letter, score) = insert (map toLower letter) score m
| tfausak/exercism-solutions | haskell/etl/ETL.hs | mit | 317 | 0 | 11 | 57 | 136 | 73 | 63 | 7 | 1 |
{-# LANGUAGE GADTs, DataKinds, PolyKinds #-}
{-# LANGUAGE FlexibleContexts #-}
module TensorDAG where
import Data.Vinyl
import Data.Vinyl.Functor
import Data.Singletons
import Numeric.LinearAlgebra (Numeric)
import TensorHMatrix
import DAGIO
import VarArgs
makeGrad1 :: (a -> b -> a) -> HList '[a] -> Identity b -> H... | vladfi1/hs-misc | TensorDAG.hs | mit | 1,188 | 0 | 14 | 224 | 610 | 316 | 294 | 22 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instances for Word
-- this is a VM with simple Word values as machine values
-- and just simple integer arithmetic
--
-- no type checking, no security against illegal usage of
-- Int's as code or data pointers is detected
-- ----------------------------------------
module PP... | UweSchmidt/ppl2 | src/PPL2/VM/Machines/UntaggedInt.hs | mit | 1,322 | 0 | 11 | 271 | 273 | 161 | 112 | 27 | 1 |
--------------------------------------------------------------------
-- |
-- Module : My.Prelude
-- Copyright : 2009 (c) Dmitry Antonyuk
-- License : MIT
--
-- Maintainer: Dmitry Antonyuk <lomeo.nuke@gmail.com>
-- Stability : experimental
-- Portability: portable
--
-- This module just exports other modules i... | lomeo/my | src/My/Prelude.hs | mit | 837 | 0 | 5 | 116 | 116 | 85 | 31 | 15 | 0 |
-- |
-- Module : Data.Edison.Coll.Utils
-- Copyright : Copyright (c) 1998 Chris Okasaki
-- License : MIT; see COPYRIGHT file for terms and conditions
--
-- Maintainer : robdockins AT fastmail DOT fm
-- Stability : stable
-- Portability : GHC, Hugs (MPTC and FD)
--
-- This module provid... | robdockins/edison | edison-api/src/Data/Edison/Coll/Utils.hs | mit | 2,222 | 0 | 11 | 532 | 398 | 228 | 170 | 14 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.