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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- https://www.hackerrank.com/challenges/grading/problem
-- Constants
threshold = 3
lowerLimit = 38
toInt :: String -> Int
toInt string = read string :: Int
calculateNextMultipleOfFive :: Int -> Int
calculateNextMultipleOfFive grade = grade + 5 - (grade `mod` 5)
gradeStudent :: Int -> Int
gradeStudent grade
| gr... | julianespinel/training | hackerrank/Grading.hs | mit | 667 | 0 | 10 | 122 | 199 | 106 | 93 | 17 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Server (
server, authServerContext, AuthMap
) where
import Servant
import API
import Config
import Server.Main
import Server.Login
import Server.Swagger
import Server.Static
server :: AuthMap -> Config -> Server API
server m cfg = convertServer cfg (mainServer :<|> loginSer... | lierdakil/markco | server/src/Server.hs | mit | 378 | 0 | 10 | 64 | 97 | 54 | 43 | 14 | 1 |
module FRP.Jalapeno.Sample where
-------------
-- Imports --
import Control.Concurrent
import Data.Time.Clock
import FRP.Jalapeno.Behavior
----------
-- Code --
{--- | Sampling a @'Behavior'@ in real time at a maximum number of times per-}
{--- second.-}
{-intermittentSample :: (Monad m, Show a) => Behavior m a -... | crockeo/jalapeno | src/lib/FRP/Jalapeno/Sample.hs | mit | 1,219 | 0 | 4 | 338 | 48 | 40 | 8 | 4 | 0 |
module U.Codebase.Sqlite.Branch.Format where
import Data.Vector (Vector)
import U.Codebase.Sqlite.Branch.Diff (LocalDiff)
import U.Codebase.Sqlite.Branch.Full (LocalBranch)
import U.Codebase.Sqlite.DbId (CausalHashId, BranchObjectId, ObjectId, PatchObjectId, TextId)
import Data.ByteString (ByteString)
-- |you can use... | unisonweb/platform | codebase2/codebase-sqlite/U/Codebase/Sqlite/Branch/Format.hs | mit | 872 | 0 | 10 | 117 | 177 | 109 | 68 | 19 | 0 |
module Problem0012 where
import Data.List
--http://www.mathsisfun.com/algebra/triangular-numbers.html
nthTriangleNumber nth =
round
$(nth * ( nth + 1)) / 2
infiniteListOfTriangleNumbers = [nthTriangleNumber x | x <- [1..]]
--http://rosettacode.org/wiki/Factors_of_an_integer#Haskell
factors n = l... | Sobieck00/practice | pe/nonvisualstudio/haskell/OldWork/Implementation/Problem0012.hs | mit | 570 | 0 | 12 | 104 | 174 | 92 | 82 | 10 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Data.List (sort)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Prelude hiding (null)
import CustomSet
( delete
, difference
, fromList
, insert
, isDisjointFrom
... | exercism/xhaskell | exercises/practice/custom-set/test/Tests.hs | mit | 7,179 | 0 | 23 | 2,113 | 2,269 | 1,215 | 1,054 | 130 | 1 |
main = do cs <- getContents
putStr $ numbering cs
numbering :: String -> String
numbering cs = unlines $ map format $ zipLineNumber $ lines cs
zipLineNumber :: [String] -> [(String, String)]
zipLineNumber xs = zip (map show [1..]) xs
format (s1, s2) = s1++" "++s2
| kazuya030/haskell-test | old/catn.hs | mit | 280 | 0 | 8 | 63 | 125 | 64 | 61 | 7 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLHeadingElement
(js_setAlign, setAlign, js_getAlign, getAlign, HTMLHeadingElement,
castToHTMLHeadingElement, gTypeHTMLHeadingElement)
where
import Prelude ((.), (==), (>>=), return, IO, In... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLHeadingElement.hs | mit | 1,809 | 14 | 10 | 226 | 463 | 284 | 179 | 28 | 1 |
module GHCJS.DOM.OESStandardDerivatives (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/OESStandardDerivatives.hs | mit | 52 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies, FlexibleContexts, ConstraintKinds #-}
module Database.Persist.Class.PersistUnique
(PersistUniqueRead(..)
,PersistUniqueWrite(..)
,getByValue
,insertBy
,insertUniqueEntity
,replaceUnique
,checkUnique
,onlyUnique)
where
import Database.Persist.Types
impo... | psibi/persistent | persistent/Database/Persist/Class/PersistUnique.hs | mit | 9,836 | 0 | 13 | 2,317 | 1,820 | 962 | 858 | 157 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
module Config (
asks
, ConfigHandler(..)
, Config(..)
, readConfigFromEnv
, convertServer
) where
import System.Environment
import qualified Data.Map as M
import Data.Maybe
import Control.Monad.R... | lierdakil/markco | server/src/Config.hs | mit | 1,820 | 0 | 14 | 351 | 472 | 257 | 215 | 58 | 1 |
module Graphics.Urho3D.UI.Internal.Menu(
Menu
, menuCntx
, sharedMenuPtrCntx
, SharedMenu
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import Graphics.Urho3D.Container.Ptr
import qualified Data.Map as Map
data Menu
... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Internal/Menu.hs | mit | 471 | 0 | 11 | 88 | 120 | 80 | 40 | -1 | -1 |
{-# Language BangPatterns #-}
module Main where
import System.IO
import System.Environment
import System.Console.Haskeline
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Error
import Control.Monad.State
import Cont... | mhlakhani/hlisp | src/Main.hs | mit | 2,229 | 0 | 17 | 528 | 772 | 373 | 399 | 71 | 4 |
module Hasql.Postgres.Session.Execution where
import Hasql.Postgres.Prelude
import qualified Data.HashTable.IO as Hashtables
import qualified Database.PostgreSQL.LibPQ as PQ
import qualified Hasql.Postgres.Statement as Statement
import qualified Hasql.Postgres.TemplateConverter as TemplateConverter
import qualified Ha... | begriffs/hasql-postgres | library/Hasql/Postgres/Session/Execution.hs | mit | 3,467 | 0 | 21 | 717 | 1,134 | 591 | 543 | -1 | -1 |
module PureScript.Ide.Watcher where
import Control.Concurrent (threadDelay)
import Control.Concurrent.STM
import Control.Monad (forever, when)
import qualified Data.Map as M
import Data.Maybe (isJust)
import PureScript.Ide.Externs... | nwolverson/psc-ide | src/PureScript/Ide/Watcher.hs | mit | 1,218 | 0 | 16 | 344 | 371 | 190 | 181 | 28 | 2 |
import qualified Problem01 as P01
import qualified Problem02 as P02
import qualified Problem03 as P03
import qualified Problem04 as P04
import qualified Problem05 as P05
import qualified Problem06 as P06
import qualified Problem07 as P07
import qualified Problem08 as P08
import qualified Problem14 as P14
cine = False ... | edwardwas/adventOfCodeTwo | src/Main.hs | mit | 1,278 | 0 | 5 | 335 | 118 | 102 | 16 | 11 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------------... | cocreature/leksah | src/IDE/BufferMode.hs | gpl-2.0 | 12,571 | 0 | 17 | 3,533 | 3,475 | 1,785 | 1,690 | 266 | 3 |
{- Chapter 15 :: Lazy evaluation -}
inc :: Int -> Int
inc n = n + 1
mult :: (Int,Int) -> Int
mult (x,y) = x * y
{-
> mult(1+2,2+3)
15
-}
mult' :: Int -> Int -> Int
mult' x = \y -> x * y
{-
> mult' (1+2) (2+3)
15
-}
inf :: Int
inf = 1 + inf
{-
> fst (0, inf)
0
-}
square :: Int -> Int
square n = n * n
on... | rad1al/hutton_exercises | notes_ch15.hs | gpl-2.0 | 1,823 | 0 | 10 | 459 | 460 | 253 | 207 | 27 | 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/GUI/Widget/MaxWidget.hs | gpl-3.0 | 3,114 | 0 | 14 | 733 | 775 | 405 | 370 | 55 | 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/Output/Fancy/State.hs | gpl-3.0 | 1,636 | 0 | 18 | 396 | 257 | 146 | 111 | 22 | 1 |
{- This file is part of "settleDyn" software.
Copyright (C) 2009, 2010, 2011
Helmholtz Centre Potsdam, GFZ German Research Centre for Geosciences.
(C) 2011, 2012
Dmitrij Yu. Naumov
"settleDyn" is free software: you can redistribute it and/or modify it under
the terms of the GNU General ... | endJunction/settleDyn | src/Config.hs | gpl-3.0 | 3,997 | 0 | 9 | 776 | 602 | 355 | 247 | 87 | 1 |
{-
ñïîëüçóß unfoldr, ðåàëèçóéòå ôóíêöèþ, êîòîðàß âîçâðàùàåò â îáðàòíîì àëôàâèòíîì ïîðßäêå ñïèñîê ñèìâîëîâ, ïîïàäàþùèõ â çàäàííûé ïàðîé äèàïàçîí. îïàäàíèå ñèìâîëà x â äèàïàçîí ïàðû (a,b) îçíà÷àåò, ÷òî x >= a è x <= b.
revRange :: (Char,Char) -> [Char]
revRange = unfoldr g
where g = undefined
GHCi> revRange ('a... | devtype-blogspot-com/Haskell-Examples | RevRange/Demo.hs | gpl-3.0 | 556 | 0 | 12 | 104 | 107 | 62 | 45 | 5 | 3 |
{-# LANGUAGE DeriveFunctor, GADTs, KindSignatures, ScopedTypeVariables #-}
module Chamber.Data.Boolean where
import qualified Data.Map as M
import Debug.Trace
import Data.Maybe
import Data.Monoid
import Data.List hiding (concat, foldr)
import Prelude hiding (concat, foldr)
import Data.Foldable
import Control.Monad.St... | sjindel/Chamber | Chamber/Data/Boolean.hs | gpl-3.0 | 7,152 | 1 | 17 | 2,144 | 3,064 | 1,572 | 1,492 | 142 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Network.URI.Text
-- Copyrigh... | Zigazou/deadlink | src/Network/URI/Text.hs | gpl-3.0 | 37,321 | 0 | 14 | 10,379 | 7,550 | 4,029 | 3,521 | 586 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Insert.hs | mpl-2.0 | 4,773 | 0 | 19 | 1,188 | 786 | 457 | 329 | 114 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/AuthInfo.hs | mpl-2.0 | 4,271 | 0 | 17 | 1,020 | 630 | 368 | 262 | 94 | 1 |
module ProjectM36.TypeConstructorDef where
import ProjectM36.Base
name :: TypeConstructorDef -> TypeConstructorName
name (ADTypeConstructorDef nam _) = nam
name (PrimitiveTypeConstructorDef nam _) = nam
typeVars :: TypeConstructorDef -> [TypeVarName]
typeVars (PrimitiveTypeConstructorDef _ _) = [] ... | agentm/project-m36 | src/lib/ProjectM36/TypeConstructorDef.hs | unlicense | 372 | 0 | 7 | 66 | 98 | 52 | 46 | 8 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Brainfuck.Cell
( Cell
, Math (..)
, stepCell
) where
import ClassyPrelude
import Data.Monoid (Sum)
type Cell = Sum Word8
data Math = Inc | Dec
deriving Show
stepCell :: Math -> (Cell -> Cell)
stepCell Inc =... | expede/brainfucker | src/Brainfuck/Cell.hs | apache-2.0 | 412 | 0 | 9 | 126 | 134 | 76 | 58 | 18 | 3 |
cnt' n ('O':'I':xs) = cnt' (n+1) xs
cnt' n x = n
cnt [] = []
cnt ('I':xs) =
let n = cnt' 0 xs
r = drop (2*n) xs
in
n:(cnt r)
cnt ('O':xs) = cnt xs
ans ("0":_) = []
ans (n:_:s:xs) =
let n' = read n :: Int
r = cnt s
a = sum $ map (\x -> if x >= n' then (x-n'+1) else 0) r
in
a:(ans ... | a143753/AOJ | 0538.hs | apache-2.0 | 405 | 0 | 16 | 147 | 292 | 147 | 145 | 19 | 2 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Messages.Type (Type(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prel... | JDrit/MemDB | client.hs/src/Messages/Type.hs | apache-2.0 | 2,139 | 0 | 11 | 378 | 650 | 352 | 298 | 52 | 1 |
module Tables.A268057Spec (main, spec) where
import Test.Hspec
import Tables.A268057 (a268057)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A268057" $
it "correctly computes the first 20 elements" $
take 20 (map a268057 [1..]) `shouldBe` expectedValue where
expectedValue = [1,1,1,1,2,1,1,... | peterokagey/haskellOEIS | test/Tables/A268057Spec.hs | apache-2.0 | 347 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QResizeEvent.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine generated - do ... | keera-studios/hsQt | Qtc/Gui/QResizeEvent.hs | bsd-2-clause | 4,324 | 0 | 15 | 717 | 1,262 | 655 | 607 | -1 | -1 |
{-| Implementation of the Ganeti Query2 export queries.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above c... | apyrgio/snf-ganeti | src/Ganeti/Query/Export.hs | bsd-2-clause | 3,309 | 0 | 11 | 558 | 450 | 255 | 195 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- | A module collecting the toy grammars used for testing and
-- unit test examples themselves.
module NLP.TAG.Vanilla.Tests
( Test (..)
, TestRes (..)
, mkGram1
, gram1Tests
, mkGram2
, gram2Tests
, mkGram3
, gram3T... | kawu/tag-vanilla | src/NLP/TAG/Vanilla/Tests.hs | bsd-2-clause | 18,182 | 0 | 18 | 6,194 | 4,979 | 2,658 | 2,321 | 459 | 9 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
module NLP.Albemarle.Cooccur
( -- * Sliding Window
geometricSkips,
harmonicSkips,
packIDs,
unpackIDs,
cooccurify,
wordSlice,
frequency,
wordFreque... | SeanTater/albemarle | src/NLP/Albemarle/Cooccur.hs | bsd-3-clause | 3,483 | 0 | 16 | 738 | 943 | 531 | 412 | 72 | 2 |
module TriangleKata.Day1 (triangle, TriangleType(..)) where
data TriangleType = Illegal | Equilateral | Isosceles | Scalene
deriving (Show, Eq)
type Triangle = (Int, Int, Int)
triangle :: Triangle -> TriangleType
triangle (0, 0, 0) = Illegal
triangle (a, b, c)
| a + b < c
... | Alex-Diez/haskell-tdd-kata | old-katas/src/TriangleKata/Day1.hs | bsd-3-clause | 552 | 0 | 15 | 234 | 200 | 109 | 91 | 16 | 1 |
module Config
( scPre
) where
import Data.Monoid
import Common
genDefaultNav galNav = N { navTitle = "Home"
, navPath = Just ""
, subs =
[ galNav
, N { navTitle = "Webdesign"
... | maximilianhuber/maximilian-huber.de | src/Config.hs | bsd-3-clause | 1,929 | 0 | 13 | 1,186 | 305 | 188 | 117 | 37 | 1 |
#!/usr/bin/env runhaskell
import Distribution.Simple (defaultMainWithHooks, simpleUserHooks,
UserHooks(..), Args)
{-
-- The test-related options have been disabled due to incompitibilities
-- in various Cabal release versions. In particular, the type expected for
-- runTests has changed, ... | kfish/hogg | Setup.hs | bsd-3-clause | 1,463 | 0 | 6 | 281 | 50 | 31 | 19 | 4 | 1 |
-- Copyright (c) 2011, Mark Wright. All rights reserved.
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
module Main (main) where
import Control.Exception as E
import qualified Data.List as L
import Data.Char (toLower)
import Distribution.Compiler
import Distribution.ModuleName (components, ModuleName)
impor... | markwright/cquery | Main.hs | bsd-3-clause | 10,420 | 7 | 22 | 4,532 | 2,114 | 1,111 | 1,003 | 215 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Language.Brainfuck.Internals.CCodeGen where
import Data.Int
import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as TIO
import qualified Data.Text.Lazy.Builder as TB
import Data.Text.Format
import Control.Monad.State
import Language.Brainfuck.Internals.Inst... | remusao/Hodor | src/Language/Brainfuck/Internals/CCodeGen.hs | bsd-3-clause | 2,368 | 0 | 14 | 527 | 810 | 421 | 389 | 58 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, TypeSynonymInstances
, FlexibleContexts
, FlexibleInstances
, StandaloneDeriving
#-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Tw... | fryguybob/diagrams-spiro | src/Diagrams/TwoD/Spiro.hs | bsd-3-clause | 2,294 | 0 | 12 | 482 | 542 | 304 | 238 | 42 | 1 |
-- SG library
-- Copyright (c) 2009, Neil Brown.
-- 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 ... | eigengrau/haskell-sg | Data/SG/Vector/Basic.hs | bsd-3-clause | 6,065 | 0 | 12 | 1,283 | 1,863 | 1,063 | 800 | 107 | 0 |
-- To run, package aivika-experiment-cairo must be installed.
import Simulation.Aivika.Experiment
import Simulation.Aivika.Experiment.Chart
import Simulation.Aivika.Experiment.Chart.Backend.Cairo
import Graphics.Rendering.Chart.Backend.Cairo
import Model
import Experiment
main = do
-- run the ordinary simulat... | dsorokin/aivika-experiment-chart | examples/Financial/MainUsingCairo.hs | bsd-3-clause | 774 | 0 | 13 | 105 | 127 | 68 | 59 | 16 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, BangPatterns #-}
module Valkyria.Type where
import Air.Data.Default
import Air.TH
import Air.Env
import Prelude ()
import Air.Data.Record.SimpleLabel
import Control.Concurrent.STM
import Data.ByteString.Char8 (ByteString)
import Data.Map (Map)
import Data.StateVar
im... | nfjinjing/source-code-server | src/Valkyria/Type.hs | bsd-3-clause | 4,315 | 0 | 13 | 916 | 1,128 | 633 | 495 | 174 | 0 |
-- | Refreshes the shared simulation state. The new state will be calculated:
--
-- * Regularly, according to the speed selected by the user
--
-- * Every time there's a change in the status (running, paused, stopped, etc).
module Controller.Conditions.ShowState
( installHandlers )
where
-- External imports
impor... | ivanperez-keera/SoOSiM-ui | src/Controller/Conditions/ShowState.hs | bsd-3-clause | 1,289 | 0 | 16 | 240 | 265 | 139 | 126 | 25 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Spec.ExecuteF where
import Spec.Decode
import Spec.Machine
import Utility.Utility
import Spec.VirtualMemory
import qualified Spec.CSRField as Field
import Data.Bits
import Data.Word
import Data.Int
import SoftFloat
import Prelude hiding (isNaN)
canonicalNaN = 0x7fc00000 :: I... | mit-plv/riscv-semantics | src/Spec/ExecuteF.hs | bsd-3-clause | 8,803 | 3 | 18 | 2,073 | 3,407 | 1,555 | 1,852 | 235 | 3 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1996-1998
TcTyClsDecls: Typecheck type and class declarations
-}
{-# LANGUAGE TupleSections #-}
module ETA.TypeCheck.TcTyClsDecls (
tcTyAndClassDecls, tcAddImplicits,
-- Functions used by TcInstDcls to check
-- ... | alexander-at-github/eta | compiler/ETA/TypeCheck/TcTyClsDecls.hs | bsd-3-clause | 100,819 | 879 | 25 | 29,639 | 17,793 | 9,820 | 7,973 | 1,173 | 9 |
{-
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Kubernetes API version: v1.9.12
Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
-}
{-|
Module : Kubernetes.OpenAPI.API.Storage... | denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/API/Storage.hs | bsd-3-clause | 2,717 | 0 | 8 | 331 | 484 | 333 | 151 | -1 | -1 |
module ScrapYourImports where
data Exports = Exports
{ greet :: IO ()
}
makeExports :: String -> Exports
makeExports str = Exports
{ greet = putStrLn str
}
| sleexyz/haskell-fun | ScrapYourImports.hs | bsd-3-clause | 168 | 0 | 10 | 40 | 52 | 29 | 23 | 6 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Text.Syntax.Parser.Attoparsec.Text (
runAsAttoparsec', runAsAttoparsec,
runAsIAttoparsec'
) where
import Data.Attoparsec.Types (Parser)
import Text.Syntax... | schernichkin/haskell-invertible-syntax-attoparsec | Text/Syntax/Parser/Attoparsec/Text.hs | bsd-3-clause | 1,550 | 0 | 9 | 475 | 388 | 228 | 160 | 30 | 2 |
{- Data/Singletons/Syntax.hs
(c) Richard Eisenberg 2014
eir@cis.upenn.edu
Converts a list of DLetDecs into a LetDecEnv for easier processing,
and contains various other AST definitions.
-}
{-# LANGUAGE DataKinds, TypeFamilies, PolyKinds, DeriveDataTypeable,
StandaloneDeriving, FlexibleInstances #-}
mod... | int-index/singletons | src/Data/Singletons/Syntax.hs | bsd-3-clause | 5,063 | 0 | 12 | 1,388 | 1,102 | 624 | 478 | 88 | 6 |
module Arion.Utilities (
associate,
dependencies,
findHaskellFiles
) where
import Arion.Types
import Control.Applicative ((<*>))
import Data.List (nub, sort, union, isInfixOf)
import Data.Map (Map, fromList)
import System.FilePath.Find (always, ex... | saturday06/arion | src/Arion/Utilities.hs | mit | 2,916 | 0 | 19 | 1,063 | 635 | 344 | 291 | 37 | 2 |
--main = do
-- contents <- getContents
-- putStr (shortLinesOnly contents)
main = interact shortLinesOnly
shortLinesOnly :: String -> String
shortLinesOnly input =
let allLines = lines input
shortLines = filter (\line -> length line < 10) allLines
result = unlines shortLines
in result
... | leichunfeng/learnyouahaskell | shortlinesonly.hs | mit | 382 | 0 | 13 | 90 | 77 | 40 | 37 | 7 | 1 |
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
{-
Copyright (C) 2006-2015 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, ... | csrhodes/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | 45,144 | 0 | 29 | 11,883 | 15,632 | 8,039 | 7,593 | 1,148 | 4 |
-- Body of the HTML page for a package
{-# LANGUAGE PatternGuards, RecordWildCards #-}
module Distribution.Server.Pages.Package (
packagePage,
renderDependencies,
renderVersion,
renderFields,
renderDownloads
) where
import Distribution.Server.Features.PreferredVersions
import Distribution.Server... | haskell-infra/hackage-server | Distribution/Server/Pages/Package.hs | bsd-3-clause | 17,668 | 0 | 23 | 5,762 | 4,659 | 2,440 | 2,219 | 329 | 19 |
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Reddit
( handler
) where
--------------------------------------------------------------------------------
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Control.Monad.Trans (liftI... | itkovian/number-six | src/NumberSix/Handlers/Reddit.hs | bsd-3-clause | 2,660 | 0 | 18 | 627 | 614 | 338 | 276 | 44 | 6 |
-- Copyright (c) 1998 Chris Okasaki.
-- See COPYRIGHT file for terms and conditions.
module CollectionUtils
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
where
import Prelude hiding (map,null,foldr,foldl,foldr1,foldl1,lookup,filter)
import Collection
map :: (Coll cin a, CollX cout b) =... | alekar/hugs | fptools/hslibs/data/edison/Coll/CollectionUtils.hs | bsd-3-clause | 959 | 3 | 11 | 275 | 397 | 208 | 189 | 15 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Std_msgs.UInt16 where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinar... | acowley/roshask | msgs/Std_msgs/Ros/Std_msgs/UInt16.hs | bsd-3-clause | 1,237 | 1 | 10 | 197 | 356 | 209 | 147 | 34 | 0 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/Attoparsec/Text.hs" #-}
{-# LANGUAGE BangPatterns, CPP, FlexibleInstances, TypeSynonymInstances #-}
{-# LANGUAGE Trustworthy #-} -- Imports internal modules
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
... | phischu/fragnix | tests/packages/scotty/Data.Attoparsec.Text.hs | bsd-3-clause | 16,149 | 0 | 16 | 3,639 | 2,192 | 1,302 | 890 | 220 | 2 |
module Turing.Laufzeit.Type where
-- $Id$
import Turing.Type (TM)
import Informed
import ToDoc
import Reader
data Laufzeit =
Laufzeit { fun :: Int -> Int -- laufzeit-funktion (kein Read)
, fun_info :: Doc -- funktions-name/-erklärung
, args :: [ Int ] -- argumente zum testen
... | florianpilz/autotool | src/Turing/Laufzeit/Type.hs | gpl-2.0 | 642 | 2 | 9 | 161 | 144 | 83 | 61 | 19 | 0 |
{-# LANGUAGE PolyKinds #-}
module T16326_Fail7 where
import Data.Kind
-- Make sure that this doesn't parse as something goofy like
-- forall (forall :: Type -> Type) (k :: Type). forall k -> k -> Type
data Foo :: forall k -> k -> Type
| sdiehl/ghc | testsuite/tests/dependent/should_fail/T16326_Fail7.hs | bsd-3-clause | 238 | 0 | 6 | 48 | 27 | 18 | 9 | -1 | -1 |
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
#include "containers.h"
-----------------------------------------------------------------------------
-- |
-- Module : Data.Map.Strict
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy ... | shockkolate/containers | Data/Map/Strict.hs | bsd-3-clause | 45,518 | 0 | 17 | 11,392 | 8,305 | 4,539 | 3,766 | -1 | -1 |
-- Stacks: using restricted type synonyms
module Stack where
type Stack a = [a] in emptyStack, push, pop, topOf, isEmpty
emptyStack :: Stack a
emptyStack = []
push :: a -> Stack a -> Stack a
push = (:)
pop :: Stack a -> Stack a
pop [] = error "pop: empty stack"
pop (_:xs) = xs
topOf ... | FranklinChen/Hugs | demos/Stack.hs | bsd-3-clause | 1,249 | 8 | 11 | 410 | 475 | 241 | 234 | -1 | -1 |
{-# LANGUAGE LambdaCase, MultiWayIf #-}
module Unification
( Equality
, Bindings
, Unifiable
, unifyLiberally
, applyBinding
, applyBinding'
, applyBindingM
, UnificationResult(..)
) where
import qualified Data.Map as M
import Control.Monad
import Control.Applicative
import Control.... | psibi/incredible | logic/Unification.hs | mit | 10,729 | 5 | 24 | 3,422 | 3,643 | 1,920 | 1,723 | 176 | 8 |
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE PolyKinds, DataKinds, RankNTypes, TypeFamilies,
TypeApplications, TypeOperators, GADTs #-}
module SAKS_030 where
import Data.Kind
import Data.Type.Equality
type T1 :: forall k (a :: k). Bool
type T2 :: k -> Bool
type family T1 where
T1 @Bool @Tru... | sdiehl/ghc | testsuite/tests/saks/should_compile/saks030.hs | bsd-3-clause | 619 | 11 | 8 | 135 | 173 | 100 | 73 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ar-SA">
<title>دليل البدء</title>
<maps>
<homeID>top</homeID>
<mapref location="map.jhm... | thc202/zap-extensions | addOns/gettingStarted/src/main/javahelp/org/zaproxy/zap/extension/gettingStarted/resources/help_ar_SA/helpset_ar_SA.hs | apache-2.0 | 978 | 87 | 61 | 156 | 394 | 200 | 194 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ur-PK">
<title>Passive Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<... | thc202/zap-extensions | addOns/pscanrules/src/main/javahelp/org/zaproxy/zap/extension/pscanrules/resources/help_ur_PK/helpset_ur_PK.hs | apache-2.0 | 979 | 78 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
{-# LANGUAGE RankNTypes, NamedWildCards #-}
-- See #11098
module NamedWildcardExplicitForall where
foo :: forall _a . _a -> _a -- _a is a type variable
foo = not
bar :: _a -> _a -- _a is a named wildcard
bar = not
baz :: forall _a . _a -> _b -> (_a, _b) -- _a is a varia... | sdiehl/ghc | testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs | bsd-3-clause | 521 | 0 | 9 | 173 | 143 | 80 | 63 | 10 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Ros.Internal.Log where
import qualified Prelude as P
import Prelude ((.))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import Ros.Internal.Msg.HeaderSupport
import qualified Data... | bitemyapp/roshask | src/Ros/Internal/Log.hs | bsd-3-clause | 1,547 | 0 | 15 | 389 | 494 | 279 | 215 | 42 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Provide ability to upload tarballs to Hackage.
module Stack.Upload
( -- * Upload
nopUploader
, mkUploader
, Uploader
, upload
, uploadBytes
, UploadSettings
, defaultUplo... | phadej/stack | src/Stack/Upload.hs | bsd-3-clause | 11,305 | 0 | 24 | 3,876 | 2,108 | 1,148 | 960 | 221 | 5 |
-- | a module for caching a monadic action based on its return type
--
-- The cache is a HashMap where the key uses the TypeReP from Typeable.
-- The value stored is toDyn from Dynamic to support arbitrary value types in the same Map.
--
-- un-exported newtype wrappers should be used to maintain unique keys in the cach... | ygale/yesod | yesod-core/Yesod/Core/TypeCache.hs | mit | 3,896 | 0 | 13 | 1,009 | 639 | 346 | 293 | 43 | 2 |
{-# LANGUAGE OverloadedLists, TypeFamilies #-}
import qualified Data.Set as S
import GHC.Exts
main = do print ([] :: (S.Set Int))
print (['a','b','c'] :: (S.Set Char))
print (['a','c'..'g'] :: (S.Set Char))
instance Ord a => IsList (S.Set a) where
type (Item (S.Set a)) = a
fromList = ... | lukexi/ghc-7.8-arm64 | testsuite/tests/overloadedlists/should_run/overloadedlistsrun02.hs | bsd-3-clause | 350 | 0 | 11 | 86 | 157 | 85 | 72 | 10 | 1 |
{-# LANGUAGE TemplateHaskell #-}
-- Test for sane reporting on TH code giving up.
module ShouldCompile where
$( fail "Code not written yet..." )
| urbanslug/ghc | testsuite/tests/th/TH_fail.hs | bsd-3-clause | 148 | 0 | 7 | 27 | 16 | 9 | 7 | 3 | 0 |
area r = pi * r ^ 2 | fredmorcos/attic | snippets/haskell/varfun.hs | isc | 19 | 0 | 6 | 7 | 17 | 8 | 9 | 1 | 1 |
{-# LANGUAGE DeriveGeneric, RecordWildCards, TypeSynonymInstances, FlexibleInstances #-}
module Game.World(
World(..)
, WorldId(..)
, worldInfoMsg
, WorldFindPlayer(..)
) where
import Control.DeepSeq
import Data.Hashable
import Data.HashMap.Strict (HashMap)
import Data.Text (Text)
import Game.Player
impor... | NCrashed/sinister | src/shared/Game/World.hs | mit | 1,296 | 0 | 11 | 207 | 323 | 186 | 137 | 40 | 1 |
{-# LANGUAGE TemplateHaskell #-}
import TemplateHaskell
data MyData = MyData
{ foo :: String
, bar :: Int
}
listFields ''MyData
main = print $ MyData { foo = "what", bar = 1 }
| limdauto/learning-haskell | snippets/TemplateHaskellTests.hs | mit | 192 | 0 | 8 | 50 | 57 | 33 | 24 | 7 | 1 |
module System.AtomicWrite.Writer.ByteStringSpec (spec) where
import Test.Hspec (it, describe, shouldBe, Spec)
import System.AtomicWrite.Writer.ByteString (atomicWriteFile)
import System.IO.Temp (withSystemTempDirectory)
import System.FilePath.Posix (joinPath)
import Data.ByteString.Char8 (pack)
spec :: Spec
spec =... | bitemyapp/atomic-write | spec/System/AtomicWrite/Writer/ByteStringSpec.hs | mit | 625 | 0 | 13 | 103 | 163 | 91 | 72 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Parser for what seems to be DCPU16 assembly.
--
-- There is some ambiguity between sources: the specification uses uppercase a
-- lot (which I'd rather put in as an option later, with the strict
-- implementation being default).
--
-- A screenshot also shows indirect mode being d... | amtal/soyuz | DCPU16/Assembly/Parser.hs | mit | 5,788 | 0 | 16 | 1,496 | 1,728 | 904 | 824 | 116 | 2 |
{-# OPTIONS_GHC -Wall #-}
module Todo.Predicates ( minDate
, maxDate
, minPriority
, maxPriority
, isComplete
) where
import Todo.Data
minDate :: Date -> Task -> Bool
minDate d = maybe False (d >=) . may... | nadirs/todohs | src/lib/Todo/Predicates.hs | mit | 669 | 0 | 8 | 232 | 204 | 110 | 94 | 19 | 2 |
-- https://projecteuler.net/problem=29
-- Consider all integer combinations of a^b for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
-- 22=4, 23=8, 24=16, 25=32
-- 32=9, 33=27, 34=81, 35=243
-- 42=16, 43=64, 44=256, 45=1024
-- 52=25, 53=125, 54=625, 55=3125
-- If they are then placed in numerical order, with any repeats removed, we get th... | kirhgoff/haskell-sandbox | euler29/countPowers.hs | mit | 774 | 0 | 11 | 150 | 146 | 82 | 64 | 6 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module HsPredictor.LoadCSV where
-- standard
import Control.Exception (bracket, catch, throwIO)
import Control.Monad (when)
import Control.Monad.Error (liftIO)
impor... | Taketrung/HsPredictor | library/HsPredictor/LoadCSV.hs | mit | 4,364 | 0 | 15 | 1,305 | 1,274 | 662 | 612 | 98 | 4 |
module ECL.ClassicChecker where
import ECL.DataTypes
-- | Type Synonyms for pattern
-- * representation
-- *
-- * Basic representations of cases
type Case = [Binder]
type Cases = [Case]
-- * Result
type Result = Cases
-- * Pattern Matching definition
type DefPm = Cases
-- | unmatched: returns the list
... | nicodelpiano/stlcnat-exhaustivity-checker | src/ECL/ClassicChecker.hs | mit | 2,949 | 0 | 14 | 643 | 899 | 490 | 409 | 59 | 2 |
module Routes.TH
( module Routes.TH.Types
-- * Functions
, module Routes.TH.RenderRoute
, module Routes.TH.ParseRoute
, module Routes.TH.RouteAttrs
-- ** Dispatch
, module Routes.TH.Dispatch
) where
import Routes.TH.Types
import Routes.TH.RenderRoute
import Routes.TH.ParseRoute
impo... | ajnsit/wai-routes | src/Routes/TH.hs | mit | 370 | 0 | 5 | 72 | 75 | 52 | 23 | 11 | 0 |
{-# LANGUAGE RecordWildCards #-}
module Main where
--import Data.ByteString.Char8 (ByteString)
import HlAdif
import HlLog
import HlOptions
import Options.Applicative
import qualified Data.ByteString.Char8 as B
import Data.Semigroup ((<>))
import System.IO
import Text.Regex.TDFA.ByteString
data Options = Options
{ f... | netom/hamloghs | app/hl-filter.hs | mit | 2,313 | 0 | 20 | 782 | 637 | 326 | 311 | 54 | 11 |
-- Problems/Problem063Spec.hs
module Problems.Problem063Spec (main, spec) where
import Test.Hspec
import Problems.Problem063
main :: IO()
main = hspec spec
spec :: Spec
spec = describe "Problem 63" $
it "Should evaluate to 49" $
p63 `shouldBe` 49
| Sgoettschkes/learning | haskell/ProjectEuler/tests/Problems/Problem063Spec.hs | mit | 262 | 0 | 8 | 51 | 73 | 41 | 32 | 9 | 1 |
data Quantum =
Yes
| No
| Both deriving (Eq, Show)
convert :: Quantum -> Bool
convert Yes = False
convert No = False
convert Both = False
convert2 Yes = False
convert2 No = False
convert2 Both = True
convert3 Yes = False
convert3 No = True
convert3 Both = True
convert4 Yes = True
convert4 No = True
conver... | JustinUnger/haskell-book | ch11/exp.hs | mit | 946 | 0 | 6 | 250 | 255 | 138 | 117 | 34 | 1 |
{- |
- Implementation of the IDA* search algorithm
-}
{-# LANGUAGE ScopedTypeVariables, MultiParamTypeClasses,
FunctionalDependencies, FlexibleInstances, UndecidableInstances #-}
module Rubik.IDA where
import qualified Data.Set as S
-- | Type of outgoing edges, labelled and weighted.
data Succ label le... | Lysxia/twentyseven | src/Rubik/IDA.hs | mit | 2,548 | 0 | 13 | 713 | 847 | 450 | 397 | 63 | 3 |
import Control.Monad.Writer
import Control.Monad ((<=<), (>=>))
deeldoorTwee :: (Integral a, Show a) => a -> Maybe String
deeldoorTwee x = if even x
then Just (show x++" is deelbaar door 2." )
else Just (show x++" is niet deelbaar door 2!" )
half :: (Integral a) => a -> Maybe a
h... | iambernie/tryhaskell | useful.hs | mit | 1,399 | 0 | 10 | 445 | 608 | 317 | 291 | 50 | 2 |
module Assembler(assemble) where
import Datatypes
import Opcodes
import Text.Printf
assemble :: [IR] -> [String]
assemble instructions =
map (printf "0x%08x") hex
where hex = map assembleInstruction instructions
assembleInstruction :: IR -> Int
assembleInstruction LoadIR = (hexOpcode Lw)
assembleInstruction S... | aleksanb/hdc | src/Assembler.hs | mit | 1,524 | 0 | 11 | 429 | 592 | 303 | 289 | 35 | 11 |
module Import
( module Import
) where
import Foundation as Import
import Import.NoFoundation as Import
-- vim:set expandtab:
| tmcl/katalogo | backend/sqlite/Import.hs | gpl-3.0 | 147 | 0 | 4 | 40 | 23 | 17 | 6 | 4 | 0 |
module Data.XDR.PPUtils
( ppConstExpr
) where
import Data.XDR.AST
import Text.PrettyPrint.Leijen as PP hiding (braces, indent)
ppConstExpr :: ConstExpr -> Doc
ppConstExpr (ConstLit n) = text . show $ n
ppConstExpr (ConstRef (ConstantDef n _)) = text n
ppConstExpr (ConstBinExpr op c1 c2) = ppBinOp op (p... | jthornber/xdrgen | Data/XDR/PPUtils.hs | gpl-3.0 | 891 | 0 | 9 | 267 | 328 | 168 | 160 | 22 | 10 |
module Support where
import Data.List
import Data.Char
import Network.Curl
import Control.Monad
import qualified Utilities as T
type App = String
support :: App -> App -> IO Float
support lhs rhs = do
lhs `T.shouldHaveType` T.app
rhs `T.shouldHaveType` T.app
let lhs' = map toLower . T.remove $ lhs
let rhs' ... | bogwonch/SecPAL | functions/Support.hs | gpl-3.0 | 575 | 0 | 13 | 133 | 204 | 107 | 97 | 20 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.RemoteBuildExecution
-- Copyright : (c) 2015-2016 Brendan Hay
-- License :... | brendanhay/gogol | gogol-remotebuildexecution/gen/Network/Google/RemoteBuildExecution.hs | mpl-2.0 | 27,892 | 0 | 12 | 4,206 | 1,884 | 1,322 | 562 | 523 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountSummaries/List.hs | mpl-2.0 | 4,082 | 0 | 14 | 875 | 436 | 258 | 178 | 68 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Common.Database (userDatabaseName)
import Common.Onedrive (getOnedriveClientSecret)
import Common.OnedriveInfo (onedriveInfoId, defaultOnedriveInfo, token, refreshToken)
import Common.ServerEnvironmentInfo (ServerEnvi... | asvyazin/my-books.purs | server/my-books/Web/Main.hs | mpl-2.0 | 8,427 | 0 | 29 | 2,929 | 1,991 | 1,055 | 936 | 181 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module View.VolumeAccess
( volumeAccessTitle
, volumeAccessPresetTitle
-- , htmlVolumeAccessForm
) where
import qualified Data.ByteString.Char8 as BSC
import Data.Monoid ((<>))
import qualified Data.Text as T
import qualified Store.Config as C
import Service.Messages
-- impo... | databrary/databrary | src/View/VolumeAccess.hs | agpl-3.0 | 1,414 | 0 | 13 | 211 | 188 | 113 | 75 | 14 | 1 |
-- ch 3.8, Building Functions, exercise 5
module ReturnThird where
main :: IO()
main = do
putStrLn rvrs
rvrs :: String
rvrs =
let
string = "Curry is awesome"
in
drop 9 string ++ drop 5 (take 9 string ) ++ take 5 string
| thewoolleyman/haskellbook | 03/08/chad/Rvrs.hs | unlicense | 235 | 0 | 11 | 60 | 78 | 39 | 39 | 9 | 1 |
module AlecSequences.A280172Spec (main, spec) where
import Test.Hspec
import AlecSequences.A280172 (a280172)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A280172" $
it "correctly computes the first 20 elements" $
take 20 (map a280172 [1..]) `shouldBe` expectedValue where
expectedValue = [... | peterokagey/haskellOEIS | test/AlecSequences/A280172Spec.hs | apache-2.0 | 361 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{- |
Module : Data.Time.Zones.Internal
Copyright : (C) 2014 Mihaly Barasz
License : Apache-2.0, see LICENSE
Maintainer : Mihaly Barasz <klao@nilcons.com>
Stability : experimental
-}
{-# LANGUAGE CPP #-}
#ifdef TZ_TH
{-# LANGUAGE TemplateHaskell #-}
#endif
module Data.Time.Zones.Internal (
-- * Time co... | nilcons/haskell-tz | Data/Time/Zones/Internal.hs | apache-2.0 | 3,989 | 0 | 12 | 638 | 789 | 438 | 351 | 68 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Spark.Core.Internal.DatasetStructures where
import Data.Vector(Vector)
import qualified Data.Vector as V
import qualified Data.Text as T
imp... | tjhunter/karps | haskell/src/Spark/Core/Internal/DatasetStructures.hs | apache-2.0 | 8,561 | 0 | 13 | 1,591 | 906 | 538 | 368 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.