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 CPP #-}
-- | = Name
--
-- VK_EXT_pipeline_creation_cache_control - device extension
--
-- == VK_EXT_pipeline_creation_cache_control
--
-- [__Name String__]
-- @VK_EXT_pipeline_creation_cache_control@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 298
-... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_EXT_pipeline_creation_cache_control.hs | bsd-3-clause | 12,465 | 0 | 8 | 2,202 | 553 | 427 | 126 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Auth
import Common
import Control.Applicative
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.State
import Data.Aeson
import Data.Aeson.Types
import qualif... | MarkJr94/sleuth | Main.hs | bsd-3-clause | 3,151 | 0 | 14 | 930 | 909 | 470 | 439 | 83 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcType]{Types used in the typechecker}
This module provides the Type interface for front-end parts of the
compiler. These parts
* treat "source types" as opaque:
newtypes, and predicates ... | oldmanmike/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | 92,459 | 0 | 16 | 25,802 | 16,765 | 8,704 | 8,061 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Geometry.Space
-- Copyright : (c) Artem M. Chirkin 2015
-- License : BSD3
--
-- Maintainer : Artem M. Chirkin <chirkin@arch.ethz.ch>
-- Stability : Experimental
--
-- The module provides mathem... | achirkin/fgeom | src/Geometry/Space.hs | bsd-3-clause | 590 | 0 | 4 | 96 | 48 | 38 | 10 | 4 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Cloud.AWS.EC2.Types.VPC
( Attachment(..)
, AttachmentState(..)
, CreateVpnGatewayType(..)
, CustomerGateway(..)
, CustomerGatewayState(..)
, DhcpConfiguration(..)
, DhcpOptions(..)
, DhcpValue(..)
, InternetGateway(..)
, InternetGatewayAtt... | worksap-ate/aws-sdk | Cloud/AWS/EC2/Types/VPC.hs | bsd-3-clause | 6,366 | 0 | 9 | 1,127 | 1,352 | 814 | 538 | 171 | 0 |
module Language.DevSurf
( module Language.DevSurf.STL
, module Language.DevSurf.SVG
, module Language.DevSurf.Types
) where
import Language.DevSurf.STL
import Language.DevSurf.SVG
import Language.DevSurf.Types
| tomahawkins/devsurf | Language/DevSurf.hs | bsd-3-clause | 220 | 0 | 5 | 29 | 47 | 32 | 15 | 7 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Luthor.Handler
-- Copyright : (c) Edward Kmett 2010,
-- License : BSD3
-- Maintainer : ekmett@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- An 'Handler' describe actions that m... | ekmett/luthor | Text/Luthor/Handler.hs | bsd-3-clause | 1,243 | 0 | 9 | 313 | 226 | 132 | 94 | 20 | 0 |
{-# LANGUAGE DeriveDataTypeable
#-}
{-| The 'UUID' datatype.
-}
module Data.UUID
( UUID()
, asWord64s
, asWord32s
) where
import Data.Word
import Data.Char
import Data.Binary
import Data.Binary.Put
import Data.Binary.Get
import Data.Bits
import qualified Data.ByteString.Lazy
import Data.Digest.Murmur32
im... | solidsnack/system-uuid | Data/UUID.hs | bsd-3-clause | 3,999 | 0 | 14 | 1,371 | 1,239 | 657 | 582 | 123 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TestsXLSX
where
import Codec.Xlsx
import Codec.Xlsx.Formatted
import qualified Data.Text as T
import Data.Map (Map)
-- import qualified Data.Map as DM
import Data.Either.Extra (fromRight)
import WriteXLSX.DataframeToSheet
import qualified Data.ByteString.Lazy as L
-- import ... | stla/jsonxlsx | src/TestsXLSX.hs | bsd-3-clause | 3,070 | 0 | 11 | 275 | 385 | 198 | 187 | 37 | 1 |
module Queries where
import Model
import Control.Monad
import Control.Monad.Trans
import Database.Esqueleto
getTotalRevenue :: MonadIO m => SqlPersistT m [Maybe Double]
getTotalRevenue =
liftM (map unValue) $
select $
from $ \(s, i, c) ->
do where_ (s ^. SaleIt... | agrafix/revenue-sample-app | src/Queries.hs | bsd-3-clause | 451 | 0 | 17 | 128 | 154 | 81 | 73 | 12 | 1 |
{-| General purpose utilities
The names in this module clash heavily with the Haskell Prelude, so I
recommend the following import scheme:
> import Pipes
> import qualified Pipes.Prelude as P -- or use any other qualifier you prefer
Note that 'String'-based 'IO' is inefficient. The 'String'-based utili... | quchen/Haskell-Pipes-Library | src/Pipes/Prelude.hs | bsd-3-clause | 20,837 | 0 | 21 | 6,426 | 5,223 | 2,645 | 2,578 | -1 | -1 |
module Language.Xi.Base.Syntax where
-- | Syntactic representation of constants.
data Constant
= ConstBool Bool -- ^ Boolean.
| ConstInt Int -- ^ Integer.
| ConstChar Char -- ^ Character.
| ConstString String -- ^ String literal.
| ConstUnit -- ^ Unit (void).
... | fizruk/xi-base | src/Language/Xi/Base/Syntax.hs | bsd-3-clause | 2,586 | 0 | 7 | 754 | 276 | 184 | 92 | 48 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Language.Haskell.Refact.Refactoring.DupDef(duplicateDef) where
import qualified Data.Generics as SYB
import qualified GHC.SYB.Utils as SYB
import qualified GHC
import... | mpickering/HaRe | src/Language/Haskell/Refact/Refactoring/DupDef.hs | bsd-3-clause | 12,860 | 3 | 24 | 3,823 | 2,434 | 1,252 | 1,182 | 171 | 5 |
step :: (Delta d, AAM aam) => d -> aam
-> StateSpace d aam -> StatSpace d aam
step d aam ss = eachInSet ss $ \ (c,e,s,t) ->
eachInSet (call d aam t c e s) $ \ (c',e',s') ->
setSingleton (c',e',s',tick aam c' t)
exec :: (Delta d, AAM aam) => d -> aam
-> Call -> StateSpace d aam
exec d aam c0 = iter (... | davdar/quals | writeup-old/sections/03AAMByExample/03AbstractSemantics/03Step.hs | bsd-3-clause | 396 | 0 | 11 | 102 | 226 | 118 | 108 | 9 | 1 |
{-# LANGUAGE RankNTypes, KindSignatures #-}
-- |
-- Module: Text.XML.Generic.ToXmlUtil
-- Copyright: 2013 Dmitry Olshansky
-- License: BSD3
--
-- Maintainer: olshanskydr@gmail.com
--
-- Parameters and some utility functions for ToXml
module Text.XML.Generic.ToXmlUtil where
import Data.Conduit
import Data.Default(Defa... | odr/xml-conduit-generic | Text/XML/Generic/ToXmlUtil.hs | bsd-3-clause | 5,559 | 0 | 16 | 2,242 | 1,419 | 789 | 630 | 86 | 1 |
module Part2.Problem44 where
import Data.List (find)
import Data.Maybe (mapMaybe)
import Part1.Problem3 (squareRoot)
--
-- Problem 44: Pentagon numbers
--
-- Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten
-- pentagonal numbers are:
--
-- 1, 5, 12, 2... | c0deaddict/project-euler | src/Part2/Problem44.hs | bsd-3-clause | 1,583 | 0 | 13 | 359 | 445 | 250 | 195 | 26 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Scratch where
import Control.Distributed.Process
import Data.Binary
import Data.Typeable
import GHC.Generics (Generic)
import Control.Distribute... | abakst/brisk-prelude | tests/pos/Data01.hs | bsd-3-clause | 1,276 | 0 | 11 | 420 | 312 | 158 | 154 | 35 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import qualified Data.Identifiers.Hashable as H
import qualified Data.Identifiers.ListLike as L
main :: IO ()
main = defaultMain tests
tests :: [Tes... | awagner83/identifiers | test/TestAll.hs | bsd-3-clause | 1,454 | 0 | 9 | 436 | 238 | 131 | 107 | 25 | 1 |
module S3Logd.Syslog (syslogLefts, consoleLefts,panic,syslog) where
import Data.Conduit
import Control.Applicative
import Control.Monad.IO.Class (liftIO)
import System.Log.Handler
import System.Log.Handler.Syslog
import System.Log
-- Nom on all the lefts:
splitLefts::(MonadResource m)=> IO st -> (st->IO ()) -> (st->... | matthewSorensen/s3-tools | S3Logd/Syslog.hs | bsd-3-clause | 1,368 | 0 | 13 | 301 | 480 | 248 | 232 | 30 | 1 |
{-# LANGUAGE TypeFamilies #-}
-- | Simple implementation of slotting.
module Pos.Infra.Slotting.Impl.Simple
( SimpleSlottingStateVar
, mkSimpleSlottingStateVar
, SimpleSlottingMode
, MonadSimpleSlotting
, getCurrentSlotSimple
, getCurrentSlotSimple'
, getCurrentSlotBl... | input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/Slotting/Impl/Simple.hs | mit | 4,182 | 0 | 14 | 830 | 756 | 393 | 363 | -1 | -1 |
module Text.XkbCommon.ParseDefines
( readHeader, getKeysymDefs, genKeysyms, genKeycodes, genModnames ) where
import Language.Haskell.TH
import Language.Preprocessor.Cpphs
import System.Process
import Data.List
import Data.Maybe (isJust)
import Data.Text (pack, unpack, toLower)
import Control.Arrow
-- this function... | tulcod/haskell-xkbcommon | Text/XkbCommon/ParseDefines.hs | mit | 3,198 | 0 | 21 | 544 | 1,200 | 615 | 585 | 52 | 2 |
module SugarScape.Core.Utils
( whenM
, ifThenElse
, ifThenElseM
, orM
, andM
, uncurry3
, uncurry4
, uncurry5
, uncurry6
, flipBoolAtIdx
, removeElemByIdx
, findFirstDiffIdx
, findMinWithIdx
, hammingDistances
) where
import Control.Monad
import Data.List
import Data.Maybe
import Dat... | thalerjonathan/phd | thesis/code/sugarscape/src/SugarScape/Core/Utils.hs | gpl-3.0 | 2,706 | 0 | 12 | 770 | 1,054 | 574 | 480 | 82 | 2 |
module HCharselect.Utils where
parseInt :: String -> Maybe Int
parseInt str = case reads str :: [(Int, String)] of
[(code,rest)] -> if rest == "" then Just code else Nothing
[] -> Nothing
| hpdeifel/hcharselect | HCharselect/Utils.hs | gpl-3.0 | 205 | 0 | 9 | 50 | 83 | 46 | 37 | 5 | 3 |
-- | Pick a random item from a list
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Pick
( handler
) where
--------------------------------------------------------------------------------
import Control.Monad.Trans (liftIO)
import qualified Data.Text as T
-------------------... | itkovian/number-six | src/NumberSix/Handlers/Pick.hs | bsd-3-clause | 682 | 0 | 9 | 119 | 86 | 54 | 32 | 11 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Control/Concurrent/STM.hs" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.STM
-- Copyright : (c) The Univ... | phischu/fragnix | tests/packages/scotty/Control.Concurrent.STM.hs | bsd-3-clause | 1,570 | 0 | 5 | 277 | 135 | 104 | 31 | 19 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-|
Functions and combinators to expose functioanlity buiding
on happstack bit is not really specific to any one area
of Hackage.
-}
module Distribution.Server.Framework.HappstackUtils (
remainingPath,
remainingPathString,
mime,
consumeRequestBody,
uriEscape,
... | agrafix/hackage-server | Distribution/Server/Framework/HappstackUtils.hs | bsd-3-clause | 9,145 | 0 | 15 | 2,073 | 1,962 | 1,057 | 905 | 148 | 5 |
{-# LANGUAGE CPP, GADTs, RankNTypes #-}
-----------------------------------------------------------------------------
--
-- Cmm utilities.
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module CmmUtils(
-- CmmType
primRepC... | oldmanmike/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | 23,885 | 0 | 18 | 5,074 | 6,118 | 3,219 | 2,899 | 384 | 6 |
{-# LANGUAGE DataKinds, DeriveFunctor, FlexibleInstances, GADTs, KindSignatures, StandaloneDeriving #-}
module T8678 where
data {- kind -} Nat = Z | S Nat
-- GADT in parameter other than the last
data NonStandard :: Nat -> * -> * -> * where
Standard :: a -> NonStandard (S n) a b
Non :: NonStandard n a b -> b ... | urbanslug/ghc | testsuite/tests/deriving/should_compile/T8678.hs | bsd-3-clause | 453 | 0 | 10 | 93 | 142 | 76 | 66 | 8 | 0 |
{-# LANGUAGE UndecidableInstances, FlexibleInstances #-}
module ContextStack1 where
class Cls a where meth :: a
instance Cls [a] => Cls a
t :: ()
t = meth
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_fail/ContextStack1.hs | bsd-3-clause | 160 | 0 | 7 | 32 | 48 | 26 | 22 | -1 | -1 |
module Main where
import Text.BraVal
import Control.Monad.Trans.Writer
import Text.BraVal.Report
main = interact (report . parser . (lexer :: String -> [Symbol]))
| kindaro/BraVal | src/Main.hs | isc | 165 | 0 | 10 | 23 | 54 | 33 | 21 | 5 | 1 |
{-# LANGUAGE CPP #-}
module Application (rippleInvoiceForm, sendRippleInvoice, classicInvoiceForm, sendClassicInvoice) where
import Prelude ()
import BasicPrelude
import Control.Error (readMay)
import Data.Either.Combinators (leftToMaybe, rightToMaybe)
import Data.Base58Address (RippleAddress)
import qualified Ripple.... | singpolyma/RippleUnion-Invoices | Application.hs | isc | 5,123 | 32 | 21 | 852 | 1,794 | 959 | 835 | 111 | 8 |
{-# LANGUAGE NamedFieldPuns, ScopedTypeVariables, FlexibleContexts, FlexibleInstances, UndecidableInstances, GeneralizedNewtypeDeriving #-}
{-
Copyright (C) 2012-2013 Jimmy Liang, Kacper Bak <http://gsd.uwaterloo.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and ... | juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Intermediate/ResolverType.hs | mit | 17,030 | 6 | 30 | 4,192 | 5,340 | 2,687 | 2,653 | 309 | 16 |
so = foldl (+) 0 (replicate 10000000 1)
-- foldl (+) 0 [1,2,3] =
-- foldl (+) (0 + 1) [2,3] =
-- foldl (+) (( 0 + 1) + 2) [3] =
-- foldl (+) ((( 0 + 1) + 2) + 3) [] =
-- (( 0 + 1) + 2) + 3 =
-- (1 + 2) + 3 =
-- 3 + 3 =
-- 6
-- foldl' (+) 0 [1,2,3] =
-- foldl' (+) 1 [2,3] =
-- foldl' (+) 3 [3] =
-- foldl' (+... | v0lkan/learning-haskell | session-archive/012-strict-folds.hs | mit | 336 | 0 | 7 | 110 | 36 | 25 | 11 | 1 | 1 |
module Text.Kindle.Clippings.Reader
( readClipping
, readClippings
) where
import Control.Applicative ((<$>), (<*>), (*>), (<*), (<|>), liftA2)
import Control.Monad (join)
import Data.Functor.Infix ((<$$>))
import Data.List (find)
import Data.Maybe (isJust, fromMaybe)
import Data.Time.LocalTime (LocalTime)
import Data... | fmap/clippings | src/Text/Kindle/Clippings/Reader.hs | mit | 3,943 | 0 | 16 | 757 | 1,283 | 685 | 598 | 78 | 1 |
import Data.Bool
mapBool :: (a -> b) -> (a -> b) -> (a -> Bool) -> [a] -> [b]
mapBool fFalse fTrue fCond xs =
map (\x -> bool (fFalse x) (fTrue x) (fCond x)) xs | candu/haskellbook | ch9/mapBool.hs | mit | 163 | 0 | 10 | 38 | 106 | 56 | 50 | 4 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Takeaway.Data.Acid.ID_v0 where
import Data.IntSet (IntSet)
import Data.SafeCopy
import Data.Typeable
type ID = Int
data IdManager = IdManager
{ allIds :: IntSet
}
deriving (Show, Typeable)
deriveSafeCopy 0 'base ''IdManager
| mcmaniac/takeaway | src/Takeaway/Data/Acid/ID_v0.hs | mit | 311 | 0 | 8 | 49 | 75 | 45 | 30 | 11 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGGlyphRefElement
(js_setGlyphRef, setGlyphRef, js_getGlyphRef, getGlyphRef,
js_setFormat, setFormat, js_getFormat, getFormat, js_setX, setX,
js_getX, getX, js_setY, setY, js_getY, getY, js... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGGlyphRefElement.hs | mit | 5,830 | 84 | 11 | 848 | 1,329 | 731 | 598 | 82 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
module Control.Monad.Trans.Counter (CounterT(), runCounterT, Counter, runCounter, MonadCounter(..)) where
import Numeric.Natural
import Exception
import HsToCoq.U... | antalsz/hs-to-coq | src/lib/Control/Monad/Trans/Counter.hs | mit | 3,507 | 0 | 10 | 810 | 919 | 523 | 396 | 60 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Bench.Network.Commons
( MsgId
, Ping (..)
, Pong (..)
, Payload (..)
, curTimeMcs
, logMeasure
, loadLogConfig
, Timestamp
, MeasureEvent (..)
, MeasureInfo (..)
, LogMessage (..)
, measureInfoParse... | serokell/time-warp | bench/Network/Common/Bench/Network/Commons.hs | mit | 4,517 | 0 | 14 | 1,351 | 1,154 | 644 | 510 | -1 | -1 |
{-# OPTIONS_HADDOCK hide, prune #-}
{-# LANGUAGE CPP #-}
module Handler.Mooc
( getMoocHomeR, postMoocHomeR
) where
import Import hiding ((/=.), (==.), (=.), on, isNothing, count)
import Handler.Mooc.BrowseProposals
#if EXPO
#else
import qualified Data.Maybe as Mb
import Database.Esqueleto
import Handler.Mooc.Ed... | achirkin/qua-kit | apps/hs/qua-server/src/Handler/Mooc.hs | mit | 9,476 | 0 | 6 | 3,264 | 101 | 66 | 35 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude, NoRecordWildCards #-}
module Tach.Manager.Impulse.PluginSpec (main,spec) where
import Tach.Manager.Impulse.Plugin
import CorePrelude
import Filesystem
import Data.Default
import Keter.Types
import Keter.Main
import Data.Yaml
import Control.Monad
import File... | smurphy8/tach | apps/tach-manager-impulse/test/Tach/Manager/Impulse/PluginSpec.hs | mit | 1,352 | 0 | 13 | 400 | 292 | 174 | 118 | 34 | 1 |
module ByteStringUtils
( byteStringToLower
) where
import Data.Word (Word8)
import qualified Data.ByteString as BS
byteStringToLower :: BS.ByteString -> BS.ByteString
byteStringToLower = BS.map toLower
toLower :: Word8 -> Word8
toLower c
| c >= fromIntegral (fromEnum 'A') && c <= fromIntegral (fromEnum '... | bitc/serverer | src/ByteStringUtils.hs | mit | 420 | 0 | 13 | 83 | 144 | 75 | 69 | 11 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Fun.Type
( Fun (..), Exp (..), Mark (..)
, RAM.Builtin.Builtin (..)
, Property (..)
)
where
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Size
import Autolib.Set
import Autolib.Xml
import qualified RAM.Builtin
import Data.Typeable
data Property = Builtins [ RA... | marcellussiegburg/autotool | collection/src/Fun/Type.hs | gpl-2.0 | 1,715 | 6 | 9 | 431 | 513 | 295 | 218 | 46 | 0 |
main= do
setHeader $ do
title $ "Accessing arguments in UI events"
meta ! name="viewport" ! content "initial-scale=1.0, user-scalable=no"
meta ! charset="utf-8"
style "\
\html, body, #map-canvas {\
\height: 100%;\
\margin: 0px;\
\padding: 0px"
script ! src "https:... | agocorona/tryhplay | examples/GoogleMaps.hs | gpl-3.0 | 978 | 26 | 16 | 223 | 335 | 175 | 160 | -1 | -1 |
-- Hmkdir, a haskell implementation of GNU mkdir.
module Main where
import System.Environment
import GUtils
main :: IO ()
main = do
args <- getArgs
let defaultConfig = ProgramData {
appName = "Hmkdir"
, appHelp = customHelp
, appVersion = customVersion
, argumentStrings = args
, configuration = custom... | PuZZleDucK/Hls | Hmkdir.hs | gpl-3.0 | 3,318 | 0 | 14 | 637 | 771 | 417 | 354 | 71 | 1 |
module QFeldspar.Expression.Conversions.ScopeWithnessing () where
import QFeldspar.MyPrelude
import qualified QFeldspar.Expression.ADTUntypedDebruijn as AUD
import qualified QFeldspar.Expression.GADTTyped as GTD
import qualified QFeldspar.Type.ADT as TA
import qualified QFeldspar.Nat.ADT as NA
import QFeldspar.Nat.G... | shayan-najd/QFeldspar | QFeldspar/Expression/Conversions/ScopeWithnessing.hs | gpl-3.0 | 1,942 | 0 | 16 | 577 | 851 | 444 | 407 | -1 | -1 |
-- | Round 1B 2010
-- https://code.google.com/codejam/contest/635101/dashboard#s=p0
module FileFixIt where
-- constant imports
import Text.ParserCombinators.Parsec
import Text.Parsec
import System.IO (openFile, hClose, hGetContents, hPutStrLn, IOMode(ReadMode), stderr)
import Debug.Trace (trace)
-- variable imports
i... | dirkz/google-code-jam-haskell | practice/src/FileFixIt.hs | mpl-2.0 | 3,330 | 0 | 14 | 794 | 1,147 | 601 | 546 | 86 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-debugger/gen/Network/Google/Resource/CloudDebugger/Debugger/Debuggees/Breakpoints/Get.hs | mpl-2.0 | 6,244 | 0 | 20 | 1,442 | 867 | 504 | 363 | 134 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Folders/Locations/List.hs | mpl-2.0 | 6,064 | 0 | 19 | 1,460 | 971 | 562 | 409 | 132 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-tracing/gen/Network/Google/Resource/Tracing/Projects/Traces/BatchWrite.hs | mpl-2.0 | 6,520 | 0 | 19 | 1,509 | 945 | 552 | 393 | 135 | 1 |
{-https://github.com/haskell-esp/ejercicios-beginning-haskell
##### 2-5. THE PERFECT MATCH FOR YOUR TIME MACHINES
1) For statistical purposes, write a function that
returns the number of clients of each gender.
* You may need to define an auxiliary data type to hold the results of this function.
2) Every yea... | haskell-esp/ejercicios-beginning-haskell | cap02/src/2-5-Q-ThePerfectMatch.hs | mpl-2.0 | 1,904 | 0 | 9 | 463 | 227 | 131 | 96 | 29 | 1 |
{-# LANGUAGE CPP, ForeignFunctionInterface, InterruptibleFFI #-}
-- | Low level FFI interface. You should rarely need to use this directly.
module Sound.Honk.Internal
(
-- * Types
BeepFd(..)
-- * Core functions
, beepOpen
, beepDo
, beepClose
-- * Convenience functions
, withBe... | lfairy/honk | Sound/Honk/Internal.hs | apache-2.0 | 1,605 | 0 | 9 | 342 | 306 | 172 | 134 | 33 | 1 |
--
-- Copyright (c) 2013, Carl Joachim Svenn
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice... | karamellpelle/MEnv | source/MEnv/Tick/IOS.hs | bsd-2-clause | 9,072 | 0 | 10 | 1,745 | 1,572 | 834 | 738 | 165 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDrag_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:18
Warning : this file is machine generated - do not m... | keera-studios/hsQt | Qtc/Gui/QDrag_h.hs | bsd-2-clause | 16,081 | 0 | 18 | 3,806 | 5,490 | 2,616 | 2,874 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
-- | Tests for the "Data.DAWG.Ord" module.
module Ord where
import qualified Control.Monad.State.Strict as E
import qualified Data.Set as S
import qualified Data.Map.Strict as M
import Test.Tasty
import qualified Test.Tasty.SmallCheck as SC
import qualified Test.SmallC... | kawu/dawg-ord | tests/Ord.hs | bsd-2-clause | 4,260 | 0 | 18 | 1,164 | 1,254 | 674 | 580 | 80 | 2 |
module My.Data.SetBy (SetBy
,empty,fromList,fromAscList
,null
,toList,toAscList
,insert,delete,deleteMany,member
,findMin
,partition
,union) where
import Prelude hiding (nu... | lih/Alpha | src/My/Data/SetBy.hs | bsd-2-clause | 1,355 | 0 | 11 | 383 | 581 | 302 | 279 | 35 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Database.Drasil.ChunkDB (ChunkDB(defTable), RefbyMap, TraceMap, UMap,
asOrderedList, cdb, collectUnits, conceptMap, conceptinsLookup,
conceptinsTable, dataDefnTable, datadefnLookup, defResolve, gendefLookup,
gendefTable, generateRefbyMap, idMap, insmodelLookup, insmodelTabl... | JacquesCarette/literate-scientific-software | code/drasil-database/Database/Drasil/ChunkDB.hs | bsd-2-clause | 7,533 | 0 | 17 | 1,514 | 1,737 | 965 | 772 | 107 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
module Nlopt.Bindings( c_nlopt_algorithm_name
, c_nlopt_srand
, c_nlopt_srand_time
, c_nlopt_version
-- * api
, c_nlopt_create
... | ghorn/nlopt-haskell | Nlopt/Bindings.hs | bsd-3-clause | 12,342 | 0 | 12 | 2,599 | 1,908 | 989 | 919 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Stripe.Card
( Card(..)
, RequestCard(..)
, rCardKV
) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Data.Aeson (FromJSON (..), Value (..), (.:))
import qualified Data.ByteStr... | dbp/hs-stripe | src/Web/Stripe/Card.hs | bsd-3-clause | 2,675 | 0 | 15 | 811 | 564 | 335 | 229 | 51 | 1 |
module Module5.Task21 where
import Control.Monad.State (State, state)
import Control.Monad.Writer (Writer, runWriter)
writerToState :: Monoid w => Writer w a -> State w a
writerToState m = let
(a, w) = runWriter m
in state $ \e -> (a, e `mappend` w)
| dstarcev/stepic-haskell | src/Module5/Task21.hs | bsd-3-clause | 255 | 0 | 10 | 46 | 110 | 61 | 49 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Test.Hspec
import Vim
import Data.Text (Text)
main :: IO ()
main = hspec $ do
describe "parseMsg" $ do
it "parses nicely" $ do
parseMsg "[1,\"Hello!\"]" `shouldBe` (1,"Hello!")
| lesguillemets/rainfall-vim-hs | test/TVim.hs | bsd-3-clause | 245 | 0 | 15 | 59 | 77 | 40 | 37 | 9 | 1 |
module Email where
-- Modification of the Email example, that leaves the validation
-- functions polymorphic.
-- This lets us choose whether to accumulate all errors, by specialising
-- to AccValidation, or abort on the first error with Validation.
-- Aside from main, the code is unchanged but the type signatures hav... | tonymorris/validation | examples/PolymorphicEmail.hs | bsd-3-clause | 2,881 | 0 | 10 | 649 | 722 | 382 | 340 | 50 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Snap.Chat.Types.Tests (tests) where
------------------------------------------------------------------------------
import Control.Applicative
import Control.Monad
import ... | snapframework/cufp2011 | test/suite/Snap/Chat/Types/Tests.hs | bsd-3-clause | 4,495 | 0 | 13 | 1,118 | 1,230 | 642 | 588 | 98 | 2 |
-- |
-- Module : Language.CFamily.C.Parser.Builtin
-- Copyright : (c) 2001 Manuel M. T. Chakravarty
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Portability : portable
--
-- This module provides information about builtin entities.
--
-- Currently, only builtin type names are supp... | micknelso/language-c | src/Language/CFamily/C/Builtin.hs | bsd-3-clause | 647 | 0 | 6 | 107 | 61 | 44 | 17 | 5 | 1 |
module SAWScript.Prover.ABC
( proveABC
, w4AbcAIGER
, w4AbcVerilog
, abcSatExternal
) where
import Control.Monad (unless)
import Control.Monad.IO.Class
import qualified Data.ByteString.Char8 as C8
import Data.Char (isSpace)
import Data.List (isPrefixOf)
import qualified Data.Map as Map
import Data.Maybe
impo... | GaloisInc/saw-script | src/SAWScript/Prover/ABC.hs | bsd-3-clause | 7,588 | 3 | 29 | 2,102 | 2,317 | 1,182 | 1,135 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
module Kalium.Pascal.Convert (convert) where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Reader
import Control.Monad.Except
import Contr... | rscprof/kalium | src/Kalium/Pascal/Convert.hs | bsd-3-clause | 19,910 | 13 | 28 | 6,287 | 6,898 | 3,374 | 3,524 | -1 | -1 |
module Write.CycleBreak
( writeHsBootFiles
) where
import Data.HashMap.Strict as M
import Spec.Graph
import Write.Module
import Write.Utils
import Control.Monad(void)
cycleBreakers :: HashMap ModuleName [String]
cycleBreakers = M.fromList [ (ModuleName "Graphics.Vulkan.Device", ["VkDevice"])
... | oldmanmike/vulkan | generate/src/Write/BreakCycle.hs | bsd-3-clause | 1,214 | 0 | 11 | 327 | 248 | 133 | 115 | 24 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
module Main where
import Lib
import Data.Aeson
import Data.List
import Debug.Trace
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Lazy as B
import GHC.Generics
import Data.Maybe
data Card = Card { name :: String,
... | JoePym/hs-deck-builder | app/Main.hs | bsd-3-clause | 2,703 | 0 | 14 | 551 | 919 | 503 | 416 | 65 | 2 |
module AERN2.Local.SineCosine where
import MixedTypesNumPrelude
-- import AERN2.RealFun.SineCosine
-- import AERN2.MP
-- import AERN2.Real
-- import AERN2.RealFun.Operations
import AERN2.Local.Basics
instance
-- (HasDomain f, CanApplyApprox f (Domain f)
-- , ConvertibleExactly (ApplyApproxType f (Domain f)) MPBal... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Local/SineCosine.hs | bsd-3-clause | 698 | 0 | 9 | 134 | 110 | 64 | 46 | 10 | 0 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.CSL.Data
-- Copyright : (c) John MacFarlane
-- License : BSD-style (see LICENSE)
--
-- Maintainer : John MacFarlane <fiddlosopher@gmail.com>
-- Stability : unstable
-- Portability ... | nickbart1980/pandoc-citeproc | src/Text/CSL/Data.hs | bsd-3-clause | 3,467 | 0 | 23 | 1,098 | 784 | 471 | 313 | 66 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE Scoped... | fpco/aws | Aws/DynamoDb/Core.hs | bsd-3-clause | 34,959 | 0 | 21 | 8,340 | 8,277 | 4,430 | 3,847 | 696 | 13 |
{-# OPTIONS_GHC -fbang-patterns #-}
module HMQ.Example.GeneratedEntities.Categories where
import Data.List
import Data.Maybe
import System.Time
import Database.HDBC
import HMQ.Metadata.TableMetadata
import HMQ.Query hiding(tableIdentifier)
import HMQ.ForeignKeyLink
import HMQ.MappedQuery
import HMQ.RowValueExtractor... | scharris/hmq | Example/GeneratedEntities/Categories.hs | bsd-3-clause | 2,020 | 0 | 16 | 540 | 434 | 251 | 183 | -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 GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.TimeGrain.NB.Rules
( rules ) where
... | facebookincubator/duckling | Duckling/TimeGrain/NB/Rules.hs | bsd-3-clause | 1,166 | 0 | 11 | 259 | 271 | 172 | 99 | 25 | 1 |
module Asteroids.UILogic.Display (
display,
idle
) where
import Asteroids.UILogic.AspectRatio
import Asteroids.UILogic.Drawable
import Control.Concurrent
import GameState
import Graphics.Rendering.OpenGL.GL.CoordTrans
import Graphics.UI.GLUT
... | trenttobler/hs-asteroids | src/Asteroids/UILogic/Display.hs | bsd-3-clause | 699 | 0 | 8 | 176 | 155 | 79 | 76 | 23 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module GithubUser where
import JSONFormat
import DTypes
import Data.Aeson ((.=), (.:))
import qualified Data.Aeson as A
import qualified Data.T... | timjb/frecords | examples/dtypes-aeson/GithubUser.hs | mit | 1,638 | 0 | 12 | 395 | 336 | 192 | 144 | 48 | 1 |
{-# OPTIONS -cpp #-}
-- HookGenerator.hs -*-haskell-*-
-- Takes a type list of possible hooks from the GTK+ distribution and produces
-- Haskell functions to connect to these callbacks.
module Main(main) where
import Data.Char (showLitChar)
import Data.List (nub, isPrefixOf)
import System.Environment (getArgs)
imp... | phischu/gtk2hs | tools/callbackGen/HookGenerator.hs | lgpl-3.0 | 22,625 | 145 | 24 | 4,773 | 7,029 | 3,558 | 3,471 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The organization members API as described on
-- <http://developer.github.com/v3/orgs/members/>.
module GitHub.Endpoints.Organizations.Members (
... | jwiegley/github | src/GitHub/Endpoints/Organizations/Members.hs | bsd-3-clause | 2,001 | 0 | 11 | 326 | 376 | 208 | 168 | -1 | -1 |
foo = doSomething 123 -- Do something important.
| ruchee/vimrc | vimfiles/bundle/vim-haskell/tests/indent/test006/test.hs | mit | 50 | 0 | 5 | 9 | 10 | 5 | 5 | 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="fa-IR">
<title>Call Graph</title>
<maps>
<homeID>callgraph</homeID>
<mapref location="m... | kingthorin/zap-extensions | addOns/callgraph/src/main/javahelp/help_fa_IR/helpset_fa_IR.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintaine... | nyson/haste-compiler | libraries/ghc-7.8/base/Control/Monad.hs | bsd-3-clause | 12,115 | 0 | 12 | 3,533 | 2,602 | 1,410 | 1,192 | 123 | 2 |
{-# LANGUAGE TypeFamilies, RankNTypes, FlexibleContexts, ScopedTypeVariables #-}
module T4494 where
type family H s
type family F v
bar :: (forall t. Maybe t -> a) -> H a -> Int
bar = error "urk"
call :: F Bool -> Int
call x = bar (\_ -> x) (undefined :: H (F Bool))
{-
[W] H (F Bool) ~ H alpha
[W] alpha ~ F B... | urbanslug/ghc | testsuite/tests/indexed-types/should_compile/T4494.hs | bsd-3-clause | 474 | 0 | 9 | 124 | 105 | 58 | 47 | 8 | 1 |
{-# LANGUAGE NoImplicitPrelude, ParallelListComp #-}
module Tak.Buffer where
import Prelude as P
import Data.Sequence ((><), (|>), (<|))
import qualified Data.Sequence as Seq
import qualified Data.Text as Text
import Data.Char (isSpace)
import Data.Foldable (toList)
import Data.Monoid (mconcat)
import Control.Monad (... | sixohsix/tak | src/Tak/Buffer.hs | mit | 7,667 | 2 | 20 | 2,087 | 3,005 | 1,564 | 1,441 | 182 | 4 |
module ALibrary() where
aFunction::Int->Int
aFunction a = a | madmaw/grunt-haste-compiler | test/fixtures/ALibrary.hs | mit | 60 | 0 | 5 | 8 | 24 | 14 | 10 | 3 | 1 |
module Language.X86.Mangling
( mangleFuncName
) where
import System.Info ( os )
mangleFuncName :: String -> String
mangleFuncName s
| os == "darwin" = '_' : s
| otherwise = s
| djeik/goto | libgoto/Language/X86/Mangling.hs | mit | 185 | 0 | 8 | 40 | 62 | 33 | 29 | 7 | 1 |
module I2C where
baseNumComv :: Int -> Int -> [Int] -> [Int]
baseNumComv x n xs
| x == 0 = xs
| x == 1 = (1:xs)
| otherwise = ss : baseNumComv ns n xs
where ss = x `mod` n
ns = x `div` n
d2b :: Int -> [Int]
d2b n = reverse $ baseNumComv n 2 []
d2h :: Int -> [Int]
d2h n = reverse $ ... | SugimotoSohei/hask4raspi | lib/I2C.hs | mit | 377 | 0 | 8 | 123 | 190 | 99 | 91 | 14 | 1 |
{-# LANGUAGE ConstrainedClassMethods #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Type classes mirroring standard typeclasses, but working with monomor... | pikajude/mono-traversable | src/Data/MonoTraversable.hs | mit | 47,288 | 1 | 19 | 10,976 | 13,053 | 6,897 | 6,156 | 1,023 | 1 |
module PolyInstance2 where
class M a where
mempty :: a
instance M [a] where
mempty = []
| antalsz/hs-to-coq | examples/tests/PolyInstance2.hs | mit | 94 | 0 | 6 | 23 | 36 | 20 | 16 | 5 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric, DuplicateRecordFields #-}
module GitHub.Api (
Repo (..), ErrorDescription (..), Commit (..), File(..), Person(..), CommitPerson(..), CommitPayload(..),
Auth (..), RepoSource (..), Error (..), CommitsCriteria (..), CommitDetailsCriteria (..),
fetchRepos, fetchC... | ysukhoverkhov/velociraptor | src/GitHub/Api.hs | mit | 7,186 | 0 | 14 | 1,496 | 1,920 | 1,066 | 854 | 159 | 3 |
{-# OPTIONS_GHC -Wall #-}
module LogAnalysis where
import Log
-- | @parseMessage s@ parses a string @s@ containing a string form of log
-- message into a LogMessage object
parseMessage :: String -> LogMessage
parseMessage s
| head s == 'I' =
LogMessage Info
(read (getParam 2 ' ' ' ' s))
... | vaibhav276/haskell_cs194_assignments | algebraic_data_types/LogAnalysis.hs | mit | 3,209 | 0 | 12 | 787 | 873 | 453 | 420 | 49 | 2 |
module Main where
import Network.Wai.Handler.Warp
import Rest.Driver.Wai
import System.Environment
import Constellation.Api
import Constellation.Types
main :: IO ()
main = do
port <- getEnv "CONSTELLATION_PORT"
let env = Environment
app = ... | ClassyCoding/constellation-server | wai/Main.hs | mit | 392 | 0 | 12 | 127 | 96 | 51 | 45 | 12 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
module Gnu.Plot.Types where
import Data.Monoid
import Data.String
import Data.Csv
data Axis = X | Y
deriving (Eq,Enum,Bounded,Read,Ord)
data Location = Point Double Double | Orientation VerticalOrientation HorizontalOrientaion
deriving (Eq,Show,Read)
data Vertical... | edwardwas/gnuPlot | src/Gnu/Plot/Types.hs | mit | 2,242 | 0 | 11 | 509 | 706 | 381 | 325 | 63 | 0 |
{-# htermination readLn :: IO () #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_readLn_2.hs | mit | 37 | 0 | 2 | 7 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Box.PlaceProxy (
-- * The PlaceProxy widget
PlaceProxy,
-- * Constructor
mkPlaceProxy) where
-- To keep `cabal repl` happy when running from t... | beni55/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/PlaceProxy.hs | mit | 1,758 | 0 | 13 | 404 | 332 | 190 | 142 | 38 | 1 |
module Board where
import System.IO (IOMode (..), withFile, hPutStrLn)
import Control.Monad.RWS.Strict (gets, modify, liftIO)
import Data.Array.IArray
import System.Random
import Graphics.UI.SDL
import Types
import Utils
randomBoard :: Int -> Int -> IO Board
randomBoard w h = do
seed <- newStdGen
return $ li... | Chase-C/Flood-Haskell | src/Board.hs | mit | 1,964 | 0 | 17 | 478 | 985 | 537 | 448 | 41 | 1 |
module ProjectEuler.Problem012
( triangleNums
, numFactors
, solve
) where
import Data.Function
import Data.List
import Data.Numbers.Primes
triangleNums :: [Int]
triangleNums = map (\n -> sum [1..n]) [1..]
groupCount :: Eq a => [a] -> [Int]
groupCount = map length . group
-- http://www.wikihow.com/Find-How-... | hachibu/project-euler | src/ProjectEuler/Problem012.hs | mit | 611 | 0 | 10 | 132 | 217 | 122 | 95 | 20 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.ApplicationCache (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.ApplicationCache
#else
module Graphics.UI.Gtk.WebKit.DOM.ApplicationCache
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIP... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/ApplicationCache.hs | mit | 465 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE TupleSections #-}
module Y2018.M12.D03.Solution where
{--
The KAYAK puzzle.
A 30 x 30 grid contains a random dispersion of the letters A, K, and Y.
1. generate this grid; print it
2. Does this grid contain the word 'KAYAK' horizontally, vertically, or
BONUS: diagonally?
3. BONUS: How many occurances... | geophf/1HaskellADay | exercises/HAD/Y2018/M12/D03/Solution.hs | mit | 6,057 | 0 | 12 | 1,841 | 1,381 | 745 | 636 | 70 | 2 |
module Imp.AST (BExpr(..), BBinOp(..), RBinOp(..), AExpr(..), ABinOp(..), Cmd(..)) where
{-
a ::= x | n | - a | a opa a
b ::= true | false | not b | b opb b | a opr a
opa ::= + | -
opb ::= and | or
opr ::= > | < | =
c ::= x := a | skip | c ; c | ( c ) | if b then c else c
| input x fro... | thinkmoore/influence-checker | src/Imp/AST.hs | mit | 1,006 | 2 | 7 | 357 | 242 | 146 | 96 | 22 | 0 |
{- |
module: Main
description: Prime natural numbers - testing
license: MIT
maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module Main
( main )
where
import qualified OpenTheory.Natural.Divides as Divides
import qualified OpenTheory.Natural.Prime as Prime
import qualifi... | gilith/opentheory | data/haskell/opentheory-prime/src/Test.hs | mit | 1,509 | 0 | 13 | 293 | 363 | 192 | 171 | 29 | 1 |
module Parser (
ident,
expr,
def,
context,
lineComment
) where
import Control.Monad (void)
import Control.Applicative hiding ((<|>), many)
import qualified Data.Map.Lazy as Map
import Data.ByteString.Char8 (ByteString, singleton, pack)
import Text.Parsec hiding (token)
import Text.Parsec.ByteString
import ... | todays-mitsui/lambda2ski | src/Parser.hs | mit | 2,234 | 0 | 10 | 384 | 649 | 337 | 312 | 58 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.